Package org.apache.batik.dom.traversal
Class DOMNodeIterator
- java.lang.Object
-
- org.apache.batik.dom.traversal.DOMNodeIterator
-
- All Implemented Interfaces:
org.w3c.dom.traversal.NodeIterator
public class DOMNodeIterator extends java.lang.Object implements org.w3c.dom.traversal.NodeIterator
This class implements theNodeIterator
interface.- Version:
- $Id: DOMNodeIterator.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Field Summary
Fields Modifier and Type Field Description protected static short
BACKWARD
The backward state.protected AbstractDocument
document
The document which created the iterator.protected boolean
expandEntityReferences
Whether the children of entity reference nodes are visible to the iterator.protected org.w3c.dom.traversal.NodeFilter
filter
The NodeFilter used to screen nodes.protected static short
FORWARD
The forward state.protected static short
INITIAL
The initial state.protected static short
INVALID
The invalid state.protected org.w3c.dom.Node
referenceNode
The reference node.protected org.w3c.dom.Node
root
The root node.protected short
state
The iterator state.protected int
whatToShow
Which node types are presented via the iterator.
-
Constructor Summary
Constructors Constructor Description DOMNodeIterator(AbstractDocument doc, org.w3c.dom.Node n, int what, org.w3c.dom.traversal.NodeFilter nf, boolean exp)
Creates a new NodeIterator object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
detach()
DOM: ImplementsNodeIterator.detach()
.boolean
getExpandEntityReferences()
DOM: ImplementsNodeIterator.getExpandEntityReferences()
.org.w3c.dom.traversal.NodeFilter
getFilter()
DOM: ImplementsNodeIterator.getFilter()
.org.w3c.dom.Node
getRoot()
DOM: ImplementsNodeIterator.getRoot()
.int
getWhatToShow()
DOM: ImplementsNodeIterator.getWhatToShow()
.org.w3c.dom.Node
nextNode()
DOM: ImplementsNodeIterator.nextNode()
.void
nodeToBeRemoved(org.w3c.dom.Node removedNode)
Called by the DOM when a node will be removed from the current document.org.w3c.dom.Node
previousNode()
DOM: ImplementsNodeIterator.previousNode()
.protected void
unfilteredNextNode()
Sets the reference node to the next node, unfiltered.protected void
unfilteredPreviousNode()
Sets the reference node to the previous node, unfiltered.
-
-
-
Field Detail
-
INITIAL
protected static final short INITIAL
The initial state.- See Also:
- Constant Field Values
-
INVALID
protected static final short INVALID
The invalid state.- See Also:
- Constant Field Values
-
FORWARD
protected static final short FORWARD
The forward state.- See Also:
- Constant Field Values
-
BACKWARD
protected static final short BACKWARD
The backward state.- See Also:
- Constant Field Values
-
document
protected AbstractDocument document
The document which created the iterator.
-
root
protected org.w3c.dom.Node root
The root node.
-
whatToShow
protected int whatToShow
Which node types are presented via the iterator.
-
filter
protected org.w3c.dom.traversal.NodeFilter filter
The NodeFilter used to screen nodes.
-
expandEntityReferences
protected boolean expandEntityReferences
Whether the children of entity reference nodes are visible to the iterator.
-
state
protected short state
The iterator state.
-
referenceNode
protected org.w3c.dom.Node referenceNode
The reference node.
-
-
Constructor Detail
-
DOMNodeIterator
public DOMNodeIterator(AbstractDocument doc, org.w3c.dom.Node n, int what, org.w3c.dom.traversal.NodeFilter nf, boolean exp)
Creates a new NodeIterator object.- Parameters:
doc
- The document which created the tree walker.n
- The root node.what
- Which node types are presented via the iterator.nf
- The NodeFilter used to screen nodes.exp
- Whether the children of entity reference nodes are visible to the iterator.
-
-
Method Detail
-
getRoot
public org.w3c.dom.Node getRoot()
DOM: ImplementsNodeIterator.getRoot()
.- Specified by:
getRoot
in interfaceorg.w3c.dom.traversal.NodeIterator
-
getWhatToShow
public int getWhatToShow()
DOM: ImplementsNodeIterator.getWhatToShow()
.- Specified by:
getWhatToShow
in interfaceorg.w3c.dom.traversal.NodeIterator
-
getFilter
public org.w3c.dom.traversal.NodeFilter getFilter()
DOM: ImplementsNodeIterator.getFilter()
.- Specified by:
getFilter
in interfaceorg.w3c.dom.traversal.NodeIterator
-
getExpandEntityReferences
public boolean getExpandEntityReferences()
DOM: ImplementsNodeIterator.getExpandEntityReferences()
.- Specified by:
getExpandEntityReferences
in interfaceorg.w3c.dom.traversal.NodeIterator
-
nextNode
public org.w3c.dom.Node nextNode()
DOM: ImplementsNodeIterator.nextNode()
.- Specified by:
nextNode
in interfaceorg.w3c.dom.traversal.NodeIterator
-
previousNode
public org.w3c.dom.Node previousNode()
DOM: ImplementsNodeIterator.previousNode()
.- Specified by:
previousNode
in interfaceorg.w3c.dom.traversal.NodeIterator
-
detach
public void detach()
DOM: ImplementsNodeIterator.detach()
.- Specified by:
detach
in interfaceorg.w3c.dom.traversal.NodeIterator
-
nodeToBeRemoved
public void nodeToBeRemoved(org.w3c.dom.Node removedNode)
Called by the DOM when a node will be removed from the current document.
-
unfilteredNextNode
protected void unfilteredNextNode()
Sets the reference node to the next node, unfiltered.
-
unfilteredPreviousNode
protected void unfilteredPreviousNode()
Sets the reference node to the previous node, unfiltered.
-
-