com.novell.xml.xpath
Class AxisAncestor

java.lang.Object
  extended bycom.novell.xml.xpath.Axis
      extended bycom.novell.xml.xpath.AxisElement
          extended bycom.novell.xml.xpath.AxisAncestor
All Implemented Interfaces:
ContextNodeList
Direct Known Subclasses:
AxisAncestorOrSelf

public class AxisAncestor
extends AxisElement

class representing XPath "ancestor" axis


Nested Class Summary
protected  class AxisAncestor.Mark
           
 
Nested classes inherited from class com.novell.xml.xpath.Axis
Axis.AxisMark
 
Field Summary
protected  Node ancestor
           
 
Fields inherited from class com.novell.xml.xpath.Axis
stripper
 
Fields inherited from interface com.novell.xml.xpath.ContextNodeList
DOCUMENT_ORDER, REVERSE_DOCUMENT_ORDER, UNKNOWN_ORDER
 
Constructor Summary
AxisAncestor()
           
 
Method Summary
 void done()
          stop referencing resources that are no longer needed
 Node first()
          Return the first member of the axis in axis-defined order.
 ContextListMark getMark()
          Return a marker to current position in this axis This marker can be used later in a call to returnToMark() to return to the marked position
 Node next()
          Return subsequent nodes in the axis.
 int order()
          Return order in which nodes are returned from first()-next()
 Node returnToMark(ContextListMark mark)
          Go to a position in a ContextNodeList previously marked with getMark()
 String toString()
          Provide a readable description of the axis for debugging.
 
Methods inherited from class com.novell.xml.xpath.AxisElement
principalNodeType
 
Methods inherited from class com.novell.xml.xpath.Axis
count, getContextNode, incPosition, init, position, setup, stripNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ancestor

protected Node ancestor
Constructor Detail

AxisAncestor

public AxisAncestor()
Method Detail

toString

public String toString()
Provide a readable description of the axis for debugging.

Specified by:
toString in class Axis
Returns:
String representation of the axis (the axis name)

done

public void done()
stop referencing resources that are no longer needed

Overrides:
done in class Axis

first

public Node first()
Return the first member of the axis in axis-defined order. setup() must be called first

Returns:
The first node in the axis, or null if the axis is empty.

next

public Node next()
Return subsequent nodes in the axis. first() must be called before next() to setup the context. The nodes are returned in axis dependent order.

Returns:
The next node in the axis, or null if there are no more nodes in the axis.

order

public int order()
Return order in which nodes are returned from first()-next()

Specified by:
order in interface ContextNodeList
Overrides:
order in class Axis
Returns:
ContextNodeList.REVERSE_DOCUMENT_ORDER

getMark

public ContextListMark getMark()
Return a marker to current position in this axis This marker can be used later in a call to returnToMark() to return to the marked position

Returns:
an opaque marker

returnToMark

public Node returnToMark(ContextListMark mark)
Go to a position in a ContextNodeList previously marked with getMark()

Parameters:
mark - mark returned from getMark()
Returns:
The node at the mark