org.apache.xml.dtm.ref
Class DTMDefaultBaseTraversers.DescendantOrSelfTraverser

java.lang.Object
  extended by org.apache.xml.dtm.DTMAxisTraverser
      extended by org.apache.xml.dtm.ref.DTMDefaultBaseTraversers.IndexedDTMAxisTraverser
          extended by org.apache.xml.dtm.ref.DTMDefaultBaseTraversers.DescendantTraverser
              extended by org.apache.xml.dtm.ref.DTMDefaultBaseTraversers.DescendantOrSelfTraverser
Direct Known Subclasses:
DTMDefaultBaseTraversers.AllFromNodeTraverser
Enclosing class:
DTMDefaultBaseTraversers

private class DTMDefaultBaseTraversers.DescendantOrSelfTraverser
extends DTMDefaultBaseTraversers.DescendantTraverser

Implements traversal of the Ancestor access, in reverse document order.


Constructor Summary
private DTMDefaultBaseTraversers.DescendantOrSelfTraverser()
           
 
Method Summary
 int first(int context)
          By the nature of the stateless traversal, the context node can not be returned or the iteration will go into an infinate loop.
protected  int getFirstPotential(int identity)
          Get the first potential identity that can be returned, which is the axis context, in this case.
 
Methods inherited from class org.apache.xml.dtm.ref.DTMDefaultBaseTraversers.DescendantTraverser
axisHasBeenProcessed, first, getSubtreeRoot, isAfterAxis, isDescendant, next, next
 
Methods inherited from class org.apache.xml.dtm.ref.DTMDefaultBaseTraversers.IndexedDTMAxisTraverser
getNextIndexed, isIndexed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DTMDefaultBaseTraversers.DescendantOrSelfTraverser

private DTMDefaultBaseTraversers.DescendantOrSelfTraverser()
Method Detail

getFirstPotential

protected int getFirstPotential(int identity)
Get the first potential identity that can be returned, which is the axis context, in this case.

Overrides:
getFirstPotential in class DTMDefaultBaseTraversers.DescendantTraverser
Parameters:
identity - The node identity of the root context of the traversal.
Returns:
The axis context.

first

public int first(int context)
By the nature of the stateless traversal, the context node can not be returned or the iteration will go into an infinate loop. To see if the self node should be processed, use this function.

Overrides:
first in class DTMAxisTraverser
Parameters:
context - The context node of this traversal.
Returns:
the first node in the traversal.