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

java.lang.Object
  extended byorg.apache.xml.dtm.DTMAxisTraverser
      extended byorg.apache.xml.dtm.ref.DTMDefaultBaseTraversers.SelfTraverser
Enclosing class:
DTMDefaultBaseTraversers

private class DTMDefaultBaseTraversers.SelfTraverser
extends DTMAxisTraverser

Implements traversal of the Self axis.


Constructor Summary
private DTMDefaultBaseTraversers.SelfTraverser()
           
 
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.
 int next(int context, int current)
          Traverse to the next node after the current node.
 int next(int context, int current, int expandedTypeID)
          Traverse to the next node after the current node that is matched by the expanded type ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DTMDefaultBaseTraversers.SelfTraverser

private DTMDefaultBaseTraversers.SelfTraverser()
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.

next

public int next(int context,
                int current)
Traverse to the next node after the current node.

Specified by:
next in class DTMAxisTraverser
Parameters:
context - The context node of this iteration.
current - The current node of the iteration.
Returns:
Always return NULL for this axis.
See Also:
DTMAxisTraverser.first(int)

next

public int next(int context,
                int current,
                int expandedTypeID)
Traverse to the next node after the current node that is matched by the expanded type ID.

Specified by:
next in class DTMAxisTraverser
Parameters:
context - The context node of this iteration.
current - The current node of the iteration.
expandedTypeID - The expanded type ID that must match.
Returns:
the next node in the iteration, or DTM.NULL.
See Also:
DTMAxisTraverser.first(int,int)