Modifier and Type | Field and Description |
---|---|
protected boolean | _includeSelf
True if the start node should be considered part of the iteration. |
protected boolean | _isRestartable
True if this iteration can be restarted. |
protected int | _last
The position of the last node within the iteration, as defined by XPath. |
protected int | _markedNode
The position of the marked node within the iteration; a saved itaration state that we may want to come back to. |
protected int | _position
The position of the current node within the iteration, as defined by XPath. |
protected int | _startNode
The handle to the start, or root, of the iteration. |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public DTMAxisIterator | Returns: a deep copy of this iterator.Implements com. Returns a deep copy of this iterator. |
public int | Returns: Axis.CHILD, etc., or -1 if the axis is not known or is of multiple types.Returns the axis being iterated, if it is known. |
public int | Returns: The number of nodes in this iterator (forward) or 1 (reverse).Implements com. Returns the position of the last node within the iteration, as defined by XPath. |
public int | Returns: The node at the given position.The position position)Implements com. Return the node at the given position. |
public int | Returns: The position of the current node within the set, as defined by XPath. Note that this is one-based, not zero-based.Implements com.
|
public int | Returns: The root node of the iteration.Implements com. Get start to END should 'close' the iterator, i.e. subsequent call to next() should return END. |
public DTMAxisIterator | Returns: This default method returns just returns this DTMAxisIterator, after setting the flag. (Returning "this" permits C++-style chaining of method calls into a single expression.)Set the flag to include the start node in the iteration. |
public boolean | Returns: true as a default.Returns true if all the nodes in the iteration well be returned in document order. |
public boolean | Returns: true if this iterator has a reversed axis, else falseImplements com.
|
public DTMAxisIterator | Returns: A DTMAxisIterator which has been reset to the start node, which may or may not be the same as this iterator.Implements com. Resets the iterator to the last start node. |
protected final DTMAxisIterator | |
protected final int | Returns: The node handle passed in.Node handle which iteration is about to yield. node)Do any final cleanup that is required before returning the node that was passed in, and then return it. |
public void | setRestartable(boolean isRestartable)
Implements com. Set if restartable. |
_includeSelf | back to summary |
---|---|
protected boolean _includeSelf True if the start node should be considered part of the iteration. False will cause it to be skipped. |
_isRestartable | back to summary |
---|---|
protected boolean _isRestartable True if this iteration can be restarted. False otherwise (eg, if we are iterating over a stream that can not be re-scanned, or if the iterator was produced by cloning another iterator.) |
_last | back to summary |
---|---|
protected int _last The position of the last node within the iteration, as defined by XPath. Note that this is _not_ the node's handle within the DTM. Also, don't confuse it with the current (most recently returned) position. |
_markedNode | back to summary |
---|---|
protected int _markedNode The position of the marked node within the iteration; a saved itaration state that we may want to come back to. Note that only one mark is maintained; there is no stack. |
_position | back to summary |
---|---|
protected int _position The position of the current node within the iteration, as defined by XPath. Note that this is _not_ the node's handle within the DTM! |
_startNode | back to summary |
---|---|
protected int _startNode The handle to the start, or root, of the iteration. Set this to END to construct an empty iterator. |
DTMAxisIteratorBase | back to summary |
---|---|
public DTMAxisIteratorBase() |
cloneIterator | back to summary |
---|---|
public DTMAxisIterator cloneIterator() Implements com. Returns a deep copy of this iterator. Cloned iterators may not be restartable. The iterator being cloned may or may not become non-restartable as a side effect of this operation.
|
getAxis | back to summary |
---|---|
public int getAxis() Returns the axis being iterated, if it is known.
|
getLast | back to summary |
---|---|
public int getLast() Implements com. Returns the position of the last node within the iteration, as defined by XPath. In a forward iterator, I believe this equals the number of nodes which this iterator will yield. In a reverse iterator, I believe it should return 1 (since the "last" is the first produced.) This may be an expensive operation when called the first time, since it may have to iterate through a large part of the document to produce its answer.
|
getNodeByPosition | back to summary |
---|---|
public int getNodeByPosition(int position) Implements com. Return the node at the given position.
|
getPosition | back to summary |
---|---|
public int getPosition() Implements com.
|
getStartNode | back to summary |
---|---|
public int getStartNode() Implements com. Get start to END should 'close' the iterator, i.e. subsequent call to next() should return END.
|
includeSelf | back to summary |
---|---|
public DTMAxisIterator includeSelf() Set the flag to include the start node in the iteration.
|
isDocOrdered | back to summary |
---|---|
public boolean isDocOrdered() Returns true if all the nodes in the iteration well be returned in document order.
|
isReverse | back to summary |
---|---|
public boolean isReverse() Implements com.
|
reset | back to summary |
---|---|
public DTMAxisIterator reset() Implements com. Doc from com. Resets the iterator to the last start node.
|
resetPosition | back to summary |
---|---|
protected final DTMAxisIterator resetPosition() Reset the position to zero. NOTE that this does not change the iteration state, only the position number associated with that state. %REVIEW% Document when this would be used?
|
returnNode | back to summary |
---|---|
protected final int returnNode(final int node) Do any final cleanup that is required before returning the node that was
passed in, and then return it. The intended use is
|
setRestartable | back to summary |
---|---|
public void setRestartable(boolean isRestartable) Implements com. Doc from com. Set if restartable. |