org.enhydra.apache.xerces.dom
Class TreeWalkerImpl

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

public class TreeWalkerImpl
extends Object
implements TreeWalker

This class implements the TreeWalker interface.


Field Summary
(package private)  Node fCurrentNode
          The current Node.
(package private)  NodeFilter fNodeFilter
          The NodeFilter reference.
(package private)  Node fRoot
          The root Node.
(package private)  int fWhatToShow
          The whatToShow mask.
 
Constructor Summary
TreeWalkerImpl(Node root, int whatToShow, NodeFilter nodeFilter, boolean entityReferenceExpansion)
          Public constructor
 
Method Summary
(package private)  short acceptNode(Node node)
          Internal function.
 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
(package private)  Node getFirstChild(Node node)
          Internal function.
(package private)  Node getLastChild(Node node)
          Internal function.
(package private)  Node getNextSibling(Node node)
          Internal function.
(package private)  Node getNextSibling(Node node, Node root)
          Internal function.
(package private)  Node getParentNode(Node node)
          Internal function.
(package private)  Node getPreviousSibling(Node node)
          Internal function.
(package private)  Node getPreviousSibling(Node node, Node root)
          Internal function.
 Node getRoot()
           
 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
 

Field Detail

fWhatToShow

int fWhatToShow
The whatToShow mask.

fNodeFilter

NodeFilter fNodeFilter
The NodeFilter reference.

fCurrentNode

Node fCurrentNode
The current Node.

fRoot

Node fRoot
The root Node.
Constructor Detail

TreeWalkerImpl

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

getRoot

public Node getRoot()
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

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

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

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

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

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

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

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

getParentNode

Node getParentNode(Node node)
Internal function. Return the parent Node, from the input node after applying filter, whatToshow. The current node is not consulted or set.

getNextSibling

Node getNextSibling(Node node)
Internal function. Return the nextSibling Node, from the input node after applying filter, whatToshow. The current node is not consulted or set.

getNextSibling

Node getNextSibling(Node node,
                    Node root)
Internal function. Return the nextSibling Node, from the input node after applying filter, whatToshow. NEVER TRAVERSES ABOVE THE SPECIFIED ROOT NODE. The current node is not consulted or set.

getPreviousSibling

Node getPreviousSibling(Node node)
Internal function. Return the previous sibling Node, from the input node after applying filter, whatToshow. The current node is not consulted or set.

getPreviousSibling

Node getPreviousSibling(Node node,
                        Node root)
Internal function. Return the previousSibling Node, from the input node after applying filter, whatToshow. NEVER TRAVERSES ABOVE THE SPECIFIED ROOT NODE. The current node is not consulted or set.

getFirstChild

Node getFirstChild(Node node)
Internal function. Return the first child Node, from the input node after applying filter, whatToshow. The current node is not consulted or set.

getLastChild

Node getLastChild(Node node)
Internal function. Return the last child Node, from the input node after applying filter, whatToshow. The current node is not consulted or set.

acceptNode

short acceptNode(Node node)
Internal function. The node whatToShow and the filter are combined into one result.


Copyright © 1999 The Apache Software Foundation. All Rights reserved.