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

java.lang.Object
  extended by org.apache.xml.dtm.DTMAxisTraverser
      extended by org.apache.xml.dtm.ref.DTMDefaultBaseTraversers.AncestorTraverser
          extended by org.apache.xml.dtm.ref.DTMDefaultBaseTraversers.AncestorOrSelfTraverser
Enclosing class:
DTMDefaultBaseTraversers

private class DTMDefaultBaseTraversers.AncestorOrSelfTraverser
extends DTMDefaultBaseTraversers.AncestorTraverser

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


Constructor Summary
private DTMDefaultBaseTraversers.AncestorOrSelfTraverser()
           
 
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.
 int first(int context, int expandedTypeID)
          By the nature of the stateless traversal, the context node can not be returned or the iteration will go into an infinate loop.
 
Methods inherited from class org.apache.xml.dtm.ref.DTMDefaultBaseTraversers.AncestorTraverser
next, next
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DTMDefaultBaseTraversers.AncestorOrSelfTraverser

private DTMDefaultBaseTraversers.AncestorOrSelfTraverser()
Method Detail

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.

first

public int first(int context,
                 int expandedTypeID)
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. If the context node does not match the expanded type ID, this function will return false.

Overrides:
first in class DTMAxisTraverser
Parameters:
context - The context node of this traversal.
expandedTypeID - The expanded type ID that must match.
Returns:
the first node in the traversal.