org.apache.xpath.axes
public class AxesWalker extends PredicatedNodeTest implements Cloneable, PathComponent, ExpressionOwner
Constructor Summary | |
---|---|
AxesWalker(LocPathIterator locPathIterator, int axis)
Construct an AxesWalker using a LocPathIterator.
|
Method Summary | |
---|---|
void | callVisitors(ExpressionOwner owner, XPathVisitor visitor)
This will traverse the heararchy, calling the visitor for
each member. |
Object | clone()
Get a cloned AxesWalker.
|
boolean | deepEquals(Expression expr) |
void | detach()
Detaches the walker from the set which it iterated over, releasing
any computational resources and placing the iterator in the INVALID
state. |
int | getAnalysisBits()
Get the analysis bits for this walker, as defined in the WalkerFactory. |
int | getAxis()
Returns the axis being iterated, if it is known.
|
int | getCurrentNode()
The node at which the TreeWalker is currently positioned.
|
DTM | getDTM(int node)
Get the DTM for this walker.
|
Expression | getExpression() |
int | getLastPos(XPathContext xctxt)
Get the index of the last node that can be itterated to.
|
AxesWalker | getNextWalker()
Get the next walker in the location step chain.
|
AxesWalker | getPrevWalker()
Get the previous walker reference in the location step chain.
|
int | getRoot()
The root node of the TreeWalker, as specified in setRoot(int root).
|
void | init(Compiler compiler, int opPos, int stepType)
Initialize an AxesWalker during the parse of the XPath expression.
|
boolean | isDocOrdered()
Returns true if all the nodes in the iteration well be returned in document
order.
|
int | nextNode()
Moves the TreeWalker to the next visible node in document
order relative to the current node, and returns the new node. |
void | setDefaultDTM(DTM dtm)
Set the DTM for this walker.
|
void | setExpression(Expression exp) |
void | setNextWalker(AxesWalker walker)
Set the next walker in the location step chain.
|
void | setPrevWalker(AxesWalker walker)
Set or clear the previous walker reference in the location step chain.
|
void | setRoot(int root)
Set the root node of the TreeWalker.
|
WalkingIterator | wi() |
Parameters: locPathIterator non-null reference to the parent iterator.
Parameters: owner The owner of the visitor, where that path may be rewritten if needed. visitor The visitor whose appropriate method will be called.
Returns: A new AxesWalker that can be used without mutating this one.
Throws: CloneNotSupportedException
See Also: deepEquals
Returns: One of WalkerFactory#BIT_DESCENDANT, etc.
Returns: Axis.CHILD, etc., or -1 if the axis is not known or is of multiple types.
Returns: The node at which the TreeWalker is currently positioned, only null if setRoot has not yet been called.
Returns: Non-null reference to a DTM.
See Also: getExpression
Parameters: xctxt XPath runtime context.
Returns: the index of the last node that can be itterated to.
Returns: Reference to AxesWalker derivative, or null.
Returns: Reference to previous walker reference in the location step chain, or null.
Returns: The context node of the step.
Parameters: compiler The Compiler object that has information about this walker in the op map. opPos The op code position of this location step. stepType The type of location step.
Throws: javax.xml.transform.TransformerException
Returns: true as a default.
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.Returns: The new node, or null
if the current node has no
next node in the TreeWalker's logical view.
Parameters: dtm Non-null reference to a DTM.
See Also: setExpression
Parameters: walker Reference to AxesWalker derivative, or may be null.
Parameters: walker Reference to previous walker reference in the location step chain, or null.
Parameters: root The context node of this step.