org.apache.batik.dom.traversal

Class DOMNodeIterator

public class DOMNodeIterator extends Object implements NodeIterator

This class implements the org.w3c.dom.traversal.NodeIterator interface.
Field Summary
protected static shortBACKWARD
The backward state.
protected AbstractDocumentdocument
The document which created the iterator.
protected booleanexpandEntityReferences
Whether the children of entity reference nodes are visible to the iterator.
protected NodeFilterfilter
The NodeFilter used to screen nodes.
protected static shortFORWARD
The forward state.
protected static shortINITIAL
The initial state.
protected static shortINVALID
The invalid state.
protected NodereferenceNode
The reference node.
protected Noderoot
The root node.
protected shortstate
The iterator state.
protected intwhatToShow
Which node types are presented via the iterator.
Constructor Summary
DOMNodeIterator(AbstractDocument doc, Node n, int what, NodeFilter nf, boolean exp)
Creates a new NodeIterator object.
Method Summary
voiddetach()
DOM: Implements NodeIterator#detach().
booleangetExpandEntityReferences()
DOM: Implements NodeIterator#getExpandEntityReferences().
NodeFiltergetFilter()
DOM: Implements NodeIterator#getFilter().
NodegetRoot()
DOM: Implements NodeIterator#getRoot().
intgetWhatToShow()
DOM: Implements NodeIterator#getWhatToShow().
NodenextNode()
DOM: Implements NodeIterator#nextNode().
voidnodeToBeRemoved(Node removedNode)
Called by the DOM when a node will be removed from the current document.
NodepreviousNode()
DOM: Implements NodeIterator#previousNode().
protected voidunfilteredNextNode()
Sets the reference node to the next node, unfiltered.
protected voidunfilteredPreviousNode()
Sets the reference node to the previous node, unfiltered.

Field Detail

BACKWARD

protected static final short BACKWARD
The backward state.

document

protected AbstractDocument document
The document which created the iterator.

expandEntityReferences

protected boolean expandEntityReferences
Whether the children of entity reference nodes are visible to the iterator.

filter

protected NodeFilter filter
The NodeFilter used to screen nodes.

FORWARD

protected static final short FORWARD
The forward state.

INITIAL

protected static final short INITIAL
The initial state.

INVALID

protected static final short INVALID
The invalid state.

referenceNode

protected Node referenceNode
The reference node.

root

protected Node root
The root node.

state

protected short state
The iterator state.

whatToShow

protected int whatToShow
Which node types are presented via the iterator.

Constructor Detail

DOMNodeIterator

public DOMNodeIterator(AbstractDocument doc, Node n, int what, 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

detach

public void detach()
DOM: Implements NodeIterator#detach().

getExpandEntityReferences

public boolean getExpandEntityReferences()
DOM: Implements NodeIterator#getExpandEntityReferences().

getFilter

public NodeFilter getFilter()
DOM: Implements NodeIterator#getFilter().

getRoot

public Node getRoot()
DOM: Implements NodeIterator#getRoot().

getWhatToShow

public int getWhatToShow()
DOM: Implements NodeIterator#getWhatToShow().

nextNode

public Node nextNode()
DOM: Implements NodeIterator#nextNode().

nodeToBeRemoved

public void nodeToBeRemoved(Node removedNode)
Called by the DOM when a node will be removed from the current document.

previousNode

public Node previousNode()
DOM: Implements NodeIterator#previousNode().

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.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.