| org.apache.xpath.axes.PredicatedNodeTest org.apache.xpath.axes.AxesWalker
All known Subclasses: org.apache.xpath.axes.ReverseAxesWalker, org.apache.xpath.axes.FilterExprWalker,
Constructor Summary | |
public | AxesWalker(LocPathIterator locPathIterator, int axis) Construct an AxesWalker using a LocPathIterator. |
Method Summary | |
public void | callVisitors(ExpressionOwner owner, XPathVisitor visitor) This will traverse the heararchy, calling the visitor for
each member. | public Object | clone() Get a cloned AxesWalker. | AxesWalker | cloneDeep(WalkingIterator cloneOwner, Vector cloneList) Do a deep clone of this walker, including next and previous walkers.
If the this AxesWalker is on the clone list, don't clone but
return the already cloned version.
Parameters: cloneOwner - non-null reference to the cloned location path iterator to which this clone will be added. Parameters: cloneList - non-null vector of sources in odd elements, and the corresponding clones in even vectors. | public boolean | deepEquals(Expression expr) | public void | detach() Detaches the walker from the set which it iterated over, releasing
any computational resources and placing the iterator in the INVALID
state. | static AxesWalker | findClone(AxesWalker key, Vector cloneList) Find a clone that corresponds to the key argument.
Parameters: key - The original AxesWalker for which there may be a clone. Parameters: cloneList - vector of sources in odd elements, and the corresponding clones in even vectors, may be null. | public int | getAnalysisBits() Get the analysis bits for this walker, as defined in the WalkerFactory. | public int | getAxis() Returns the axis being iterated, if it is known. | final public int | getCurrentNode() The node at which the TreeWalker is currently positioned.
The value must not be null. | public DTM | getDTM(int node) Get the DTM for this walker. | public Expression | getExpression() | public int | getLastPos(XPathContext xctxt) Get the index of the last node that can be itterated to.
Parameters: xctxt - XPath runtime context. | protected int | getNextNode() Get the next node in document order on the axes. | public AxesWalker | getNextWalker() Get the next walker in the location step chain. | public AxesWalker | getPrevWalker() Get the previous walker reference in the location step chain. | public int | getRoot() The root node of the TreeWalker, as specified in setRoot(int root). | public void | init(Compiler compiler, int opPos, int stepType) Initialize an AxesWalker during the parse of the XPath expression. | public boolean | isDocOrdered() Returns true if all the nodes in the iteration well be returned in document
order. | public int | nextNode() Moves the TreeWalker to the next visible node in document
order relative to the current node, and returns the new node. | public void | setDefaultDTM(DTM dtm) Set the DTM for this walker. | public void | setExpression(Expression exp) | public void | setNextWalker(AxesWalker walker) Set the next walker in the location step chain. | public void | setPrevWalker(AxesWalker walker) Set or clear the previous walker reference in the location step chain. | public void | setRoot(int root) Set the root node of the TreeWalker. | final public WalkingIterator | wi() |
m_axis | protected int m_axis(Code) | | The traversal axis from where the nodes will be filtered.
|
m_isFresh | transient boolean m_isFresh(Code) | | True if an itteration has not begun.
|
m_nextWalker | protected AxesWalker m_nextWalker(Code) | | The next walker in the location step chain.
|
m_prevWalker | AxesWalker m_prevWalker(Code) | | The previous walker in the location step chain, or null.
|
m_root | transient int m_root(Code) | | The root node of the TreeWalker, as specified when it was created.
|
m_traverser | protected DTMAxisTraverser m_traverser(Code) | | The DTM inner traversal class, that corresponds to the super axis.
|
serialVersionUID | final static long serialVersionUID(Code) | | |
AxesWalker | public AxesWalker(LocPathIterator locPathIterator, int axis)(Code) | | Construct an AxesWalker using a LocPathIterator.
Parameters: locPathIterator - non-null reference to the parent iterator. |
callVisitors | public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)(Code) | | This will traverse the heararchy, calling the visitor for
each member. If the called visitor method returns
false, the subtree should not be called.
Parameters: owner - The owner of the visitor, where that path may be rewritten if needed. Parameters: visitor - The visitor whose appropriate method will be called. |
cloneDeep | AxesWalker cloneDeep(WalkingIterator cloneOwner, Vector cloneList) throws CloneNotSupportedException(Code) | | Do a deep clone of this walker, including next and previous walkers.
If the this AxesWalker is on the clone list, don't clone but
return the already cloned version.
Parameters: cloneOwner - non-null reference to the cloned location path iterator to which this clone will be added. Parameters: cloneList - non-null vector of sources in odd elements, and the corresponding clones in even vectors. non-null clone, which may be a new clone, or may be a clone contained on the cloneList. |
detach | public void detach()(Code) | | Detaches the walker from the set which it iterated over, releasing
any computational resources and placing the iterator in the INVALID
state.
|
findClone | static AxesWalker findClone(AxesWalker key, Vector cloneList)(Code) | | Find a clone that corresponds to the key argument.
Parameters: key - The original AxesWalker for which there may be a clone. Parameters: cloneList - vector of sources in odd elements, and the corresponding clones in even vectors, may be null. A clone that corresponds to the key, or null if key not found. |
getAnalysisBits | public int getAnalysisBits()(Code) | | Get the analysis bits for this walker, as defined in the WalkerFactory.
One of WalkerFactory#BIT_DESCENDANT, etc. |
getAxis | public int getAxis()(Code) | | Returns the axis being iterated, if it is known.
Axis.CHILD, etc., or -1 if the axis is not known or is of multiple types. |
getCurrentNode | final public int getCurrentNode()(Code) | | The node at which the TreeWalker is currently positioned.
The value must not be null. Alterations to the DOM tree may cause
the current node to no longer be accepted by the TreeWalker's
associated filter. currentNode may also be explicitly set to any node,
whether or not it is within the subtree specified by the root node or
would be accepted by the filter and whatToShow flags. Further
traversal occurs relative to currentNode even if it is not part of the
current view by applying the filters in the requested direction (not
changing currentNode where no traversal is possible).
The node at which the TreeWalker is currently positioned, only null if setRoot has not yet been called. |
getDTM | public DTM getDTM(int node)(Code) | | Get the DTM for this walker.
Non-null reference to a DTM. |
getLastPos | public int getLastPos(XPathContext xctxt)(Code) | | Get the index of the last node that can be itterated to.
Parameters: xctxt - XPath runtime context. the index of the last node that can be itterated to. |
getNextNode | protected int getNextNode()(Code) | | Get the next node in document order on the axes.
the next node in document order on the axes, or null. |
getNextWalker | public AxesWalker getNextWalker()(Code) | | Get the next walker in the location step chain.
Reference to AxesWalker derivative, or null. |
getPrevWalker | public AxesWalker getPrevWalker()(Code) | | Get the previous walker reference in the location step chain.
Reference to previous walker reference in the location step chain, or null. |
getRoot | public int getRoot()(Code) | | The root node of the TreeWalker, as specified in setRoot(int root).
Note that this may actually be below the current node.
The context node of the step. |
isDocOrdered | public boolean isDocOrdered()(Code) | | Returns true if all the nodes in the iteration well be returned in document
order.
Warning: This can only be called after setRoot has been called!
true as a default. |
nextNode | public int nextNode()(Code) | | Moves the TreeWalker to the next visible node in document
order relative to the current node, and returns the new node. If the
current node has no next node, or if the search for nextNode attempts
to step upward from the TreeWalker's root node, returns
null , and retains the current node.
The new node, or null if the current node has nonext node in the TreeWalker's logical view. |
setDefaultDTM | public void setDefaultDTM(DTM dtm)(Code) | | Set the DTM for this walker.
Parameters: dtm - Non-null reference to a DTM. |
setNextWalker | public void setNextWalker(AxesWalker walker)(Code) | | Set the next walker in the location step chain.
Parameters: walker - Reference to AxesWalker derivative, or may be null. |
setPrevWalker | public void setPrevWalker(AxesWalker walker)(Code) | | Set or clear the previous walker reference in the location step chain.
Parameters: walker - Reference to previous walker reference in the location step chain, or null. |
setRoot | public void setRoot(int root)(Code) | | Set the root node of the TreeWalker.
(Not part of the DOM2 TreeWalker interface).
Parameters: root - The context node of this step. |
|
|