Package org.apache.xerces.dom
Class NodeIteratorImpl
- java.lang.Object
-
- org.apache.xerces.dom.NodeIteratorImpl
-
- All Implemented Interfaces:
org.w3c.dom.traversal.NodeIterator
public class NodeIteratorImpl extends java.lang.Object implements org.w3c.dom.traversal.NodeIteratorDefaultNodeIterator implements a NodeIterator, which iterates a DOM tree in the expected depth first way.The whatToShow and filter functionality is implemented as expected.
This class also has method removeNode to enable iterator "fix-up" on DOM remove. It is expected that the DOM implementation call removeNode right before the actual DOM transformation. If not called by the DOM, the client could call it before doing the removal.
INTERNAL:
- Usage of this class is not supported. It may be altered or removed at any time.
- Version:
- $Id: NodeIteratorImpl.java 447266 2006-09-18 05:57:49Z mrglavas $
-
-
Constructor Summary
Constructors Constructor Description NodeIteratorImpl(DocumentImpl document, org.w3c.dom.Node root, int whatToShow, org.w3c.dom.traversal.NodeFilter nodeFilter, boolean entityReferenceExpansion)Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddetach()booleangetExpandEntityReferences()Return whether children entity references are included in the iterator.org.w3c.dom.traversal.NodeFiltergetFilter()Return the filterorg.w3c.dom.NodegetRoot()intgetWhatToShow()Return the whatToShow valueorg.w3c.dom.NodenextNode()Return the next Node in the Iterator.org.w3c.dom.NodepreviousNode()Return the previous Node in the Iterator.voidremoveNode(org.w3c.dom.Node node)Fix-up the iterator on a remove.
-
-
-
Constructor Detail
-
NodeIteratorImpl
public NodeIteratorImpl(DocumentImpl document, org.w3c.dom.Node root, int whatToShow, org.w3c.dom.traversal.NodeFilter nodeFilter, boolean entityReferenceExpansion)
Public constructor
-
-
Method Detail
-
getRoot
public org.w3c.dom.Node getRoot()
- Specified by:
getRootin interfaceorg.w3c.dom.traversal.NodeIterator
-
getWhatToShow
public int getWhatToShow()
Return the whatToShow value- Specified by:
getWhatToShowin interfaceorg.w3c.dom.traversal.NodeIterator
-
getFilter
public org.w3c.dom.traversal.NodeFilter getFilter()
Return the filter- Specified by:
getFilterin interfaceorg.w3c.dom.traversal.NodeIterator
-
getExpandEntityReferences
public boolean getExpandEntityReferences()
Return whether children entity references are included in the iterator.- Specified by:
getExpandEntityReferencesin interfaceorg.w3c.dom.traversal.NodeIterator
-
nextNode
public org.w3c.dom.Node nextNode()
Return the next Node in the Iterator. The node is the next node in depth-first order which also passes the filter, and whatToShow. If there is no next node which passes these criteria, then return null.- Specified by:
nextNodein interfaceorg.w3c.dom.traversal.NodeIterator
-
previousNode
public org.w3c.dom.Node previousNode()
Return the previous Node in the Iterator. The node is the next node in _backwards_ depth-first order which also passes the filter, and whatToShow.- Specified by:
previousNodein interfaceorg.w3c.dom.traversal.NodeIterator
-
removeNode
public void removeNode(org.w3c.dom.Node node)
Fix-up the iterator on a remove. Called by DOM or otherwise, before an actual DOM remove.
-
detach
public void detach()
- Specified by:
detachin interfaceorg.w3c.dom.traversal.NodeIterator
-
-