org.apache.xerces.dom
Class TreeWalkerImpl

java.lang.Object
  |
  +--org.apache.xerces.dom.TreeWalkerImpl
All Implemented Interfaces:
TreeWalker

public class TreeWalkerImpl
extends java.lang.Object
implements TreeWalker

This class implements the TreeWalker interface.


Constructor Summary
TreeWalkerImpl(Node root, int whatToShow, NodeFilter nodeFilter, boolean entityReferenceExpansion)
          Public constructor
 
Method Summary
 Node firstChild()
          Return the first child Node from the current node, after applying filter, whatToshow.
 Node getCurrentNode()
          Return the current Node.
 boolean getExpandEntityReferences()
          Return whether children entity references are included in the iterator.
 NodeFilter getFilter()
          Return the NodeFilter
 Node getRoot()
          The root node of the TreeWalker, as specified when it was created.
 int getWhatToShow()
          Return the whatToShow value
 Node lastChild()
          Return the last child Node from the current node, after applying filter, whatToshow.
 Node nextNode()
          Return the next Node from the current node, after applying filter, whatToshow.
 Node nextSibling()
          Return the next sibling Node from the current node, after applying filter, whatToshow.
 Node parentNode()
          Return the parent Node from the current node, after applying filter, whatToshow.
 Node previousNode()
          Return the previous Node from the current node, after applying filter, whatToshow.
 Node previousSibling()
          Return the previous sibling Node from the current node, after applying filter, whatToshow.
 void setCurrentNode(Node node)
          Return the current Node.
 void setWhatShow(int whatToShow)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeWalkerImpl

public TreeWalkerImpl(Node root,
                      int whatToShow,
                      NodeFilter nodeFilter,
                      boolean entityReferenceExpansion)
Public constructor
Method Detail

getRoot

public Node getRoot()
Description copied from interface: TreeWalker
The root node of the TreeWalker, as specified when it was created.
Specified by:
getRoot in interface TreeWalker

getWhatToShow

public int getWhatToShow()
Return the whatToShow value
Specified by:
getWhatToShow in interface TreeWalker

setWhatShow

public void setWhatShow(int whatToShow)

getFilter

public NodeFilter getFilter()
Return the NodeFilter
Specified by:
getFilter in interface TreeWalker

getExpandEntityReferences

public boolean getExpandEntityReferences()
Return whether children entity references are included in the iterator.
Specified by:
getExpandEntityReferences in interface TreeWalker

getCurrentNode

public Node getCurrentNode()
Return the current Node.
Specified by:
getCurrentNode in interface TreeWalker
Following copied from interface: org.w3c.dom.traversal.TreeWalker
Throws:
DOMException - NOT_SUPPORTED_ERR: Raised if an attempt is made to set currentNode to null.

setCurrentNode

public void setCurrentNode(Node node)
Return the current Node.
Specified by:
setCurrentNode in interface TreeWalker

parentNode

public Node parentNode()
Return the parent Node from the current node, after applying filter, whatToshow. If result is not null, set the current Node.
Specified by:
parentNode in interface TreeWalker
Following copied from interface: org.w3c.dom.traversal.TreeWalker
Returns:
The new parent node, or null if the current node has no parent in the TreeWalker's logical view.

firstChild

public Node firstChild()
Return the first child Node from the current node, after applying filter, whatToshow. If result is not null, set the current Node.
Specified by:
firstChild in interface TreeWalker
Following copied from interface: org.w3c.dom.traversal.TreeWalker
Returns:
The new node, or null if the current node has no visible children in the TreeWalker's logical view.

lastChild

public Node lastChild()
Return the last child Node from the current node, after applying filter, whatToshow. If result is not null, set the current Node.
Specified by:
lastChild in interface TreeWalker
Following copied from interface: org.w3c.dom.traversal.TreeWalker
Returns:
The new node, or null if the current node has no children in the TreeWalker's logical view.

previousSibling

public Node previousSibling()
Return the previous sibling Node from the current node, after applying filter, whatToshow. If result is not null, set the current Node.
Specified by:
previousSibling in interface TreeWalker
Following copied from interface: org.w3c.dom.traversal.TreeWalker
Returns:
The new node, or null if the current node has no previous sibling. in the TreeWalker's logical view.

nextSibling

public Node nextSibling()
Return the next sibling Node from the current node, after applying filter, whatToshow. If result is not null, set the current Node.
Specified by:
nextSibling in interface TreeWalker
Following copied from interface: org.w3c.dom.traversal.TreeWalker
Returns:
The new node, or null if the current node has no next sibling. in the TreeWalker's logical view.

previousNode

public Node previousNode()
Return the previous Node from the current node, after applying filter, whatToshow. If result is not null, set the current Node.
Specified by:
previousNode in interface TreeWalker
Following copied from interface: org.w3c.dom.traversal.TreeWalker
Returns:
The new node, or null if the current node has no previous node in the TreeWalker's logical view.

nextNode

public Node nextNode()
Return the next Node from the current node, after applying filter, whatToshow. If result is not null, set the current Node.
Specified by:
nextNode in interface TreeWalker
Following copied from interface: org.w3c.dom.traversal.TreeWalker
Returns:
The new node, or null if the current node has no next node in the TreeWalker's logical view.


Copyright © 1999-2001 Apache XML Project. All Rights Reserved.