Package com.itextpdf.xmp.impl
Class XMPIteratorImpl
- java.lang.Object
-
- com.itextpdf.xmp.impl.XMPIteratorImpl
-
- All Implemented Interfaces:
XMPIterator
,java.util.Iterator
public class XMPIteratorImpl extends java.lang.Object implements XMPIterator
TheXMPIterator
implementation. Iterates the XMP Tree according to a set of options. During the iteration the XMPMeta-object must not be changed. Calls toskipSubtree()
/skipSiblings()
will affect the iteration.- Since:
- 29.06.2006
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
XMPIteratorImpl.NodeIterator
TheXMPIterator
implementation.private class
XMPIteratorImpl.NodeIteratorChildren
This iterator is derived from the defaultNodeIterator
, and is only used for the optionIteratorOptions.JUST_CHILDREN
.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
baseNS
the base namespace of the property path, will be changed during the iterationprivate java.util.Iterator
nodeIterator
the node iterator doing the workprivate IteratorOptions
options
stores the iterator optionsprotected boolean
skipSiblings
flag to indicate that skipSiblings() has been called.protected boolean
skipSubtree
flag to indicate that skipSiblings() has been called.
-
Constructor Summary
Constructors Constructor Description XMPIteratorImpl(XMPMetaImpl xmp, java.lang.String schemaNS, java.lang.String propPath, IteratorOptions options)
Constructor with optionsl initial values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getBaseNS()
protected IteratorOptions
getOptions()
boolean
hasNext()
java.lang.Object
next()
void
remove()
protected void
setBaseNS(java.lang.String baseNS)
void
skipSiblings()
Skip the subtree below and remaining siblings of the current node whennext()
is called.void
skipSubtree()
Skip the subtree below the current node whennext()
is called.
-
-
-
Field Detail
-
options
private IteratorOptions options
stores the iterator options
-
baseNS
private java.lang.String baseNS
the base namespace of the property path, will be changed during the iteration
-
skipSiblings
protected boolean skipSiblings
flag to indicate that skipSiblings() has been called.
-
skipSubtree
protected boolean skipSubtree
flag to indicate that skipSiblings() has been called.
-
nodeIterator
private java.util.Iterator nodeIterator
the node iterator doing the work
-
-
Constructor Detail
-
XMPIteratorImpl
public XMPIteratorImpl(XMPMetaImpl xmp, java.lang.String schemaNS, java.lang.String propPath, IteratorOptions options) throws XMPException
Constructor with optionsl initial values. IfpropName
is provided,schemaNS
has also be provided.- Parameters:
xmp
- the iterated metadata object.schemaNS
- the iteration is reduced to this schema (optional)propPath
- the iteration is redurce to this property within theschemaNS
options
- advanced iteration options, seeIteratorOptions
- Throws:
XMPException
- If the node defined by the paramters is not existing.
-
-
Method Detail
-
skipSubtree
public void skipSubtree()
Description copied from interface:XMPIterator
Skip the subtree below the current node whennext()
is called.- Specified by:
skipSubtree
in interfaceXMPIterator
- See Also:
XMPIterator.skipSubtree()
-
skipSiblings
public void skipSiblings()
Description copied from interface:XMPIterator
Skip the subtree below and remaining siblings of the current node whennext()
is called.- Specified by:
skipSiblings
in interfaceXMPIterator
- See Also:
XMPIterator.skipSiblings()
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator
- See Also:
Iterator.hasNext()
-
next
public java.lang.Object next()
- Specified by:
next
in interfacejava.util.Iterator
- See Also:
Iterator.next()
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator
- See Also:
Iterator.remove()
-
getOptions
protected IteratorOptions getOptions()
- Returns:
- Exposes the options for inner class.
-
getBaseNS
protected java.lang.String getBaseNS()
- Returns:
- Exposes the options for inner class.
-
setBaseNS
protected void setBaseNS(java.lang.String baseNS)
- Parameters:
baseNS
- sets the baseNS from the inner class.
-
-