jd.xml.xpath.axis
Class AncestorAxis

java.lang.Object
  extended byjd.xml.xpath.axis.Axis
      extended byjd.xml.xpath.axis.AncestorAxis
All Implemented Interfaces:
ModelWalker
Direct Known Subclasses:
AncestorOrSelfAxis

public class AncestorAxis
extends Axis
implements ModelWalker

AncestorAxis represents the ancestor axis. It is a ModelWalker for the ancestor nodes in reverse document order.


Field Summary
static Axis INSTANCE
          The axis instance.
 
Constructor Summary
protected AncestorAxis(String name, boolean includeSelf)
           
 
Method Summary
 ModelWalker getModelWalker()
          Return this.
 void getNodes(XPathNode contextNode, NodeTest nodeTest, XMutableNodeSet result)
          Get the nodes of the axis, filtered by the NodeTest.
 ModelWalker getProximityModelWalker()
          Return this.
protected  XPathNode getStartNode(XPathNode contextNode)
           
 XPathNode gotoFirstNode(XPathNode contextNode)
          Return the getStartNode(contextNode).
 XPathNode gotoNextNode(XPathNode lastNode)
          Return the parent.
 
Methods inherited from class jd.xml.xpath.axis.Axis
getFirstNode, getMaxResultSize, getMinResultSize, getName, getPrincipalNodeType, isDistinctAxis, isForwardAxis, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final Axis INSTANCE
The axis instance.

Constructor Detail

AncestorAxis

protected AncestorAxis(String name,
                       boolean includeSelf)
Method Detail

getNodes

public void getNodes(XPathNode contextNode,
                     NodeTest nodeTest,
                     XMutableNodeSet result)
Get the nodes of the axis, filtered by the NodeTest.

Overrides:
getNodes in class Axis
Parameters:
contextNode - the context node
nodeTest - the node test
result - a nodeset for the matching nodes.

getModelWalker

public ModelWalker getModelWalker()
Return this.

Specified by:
getModelWalker in class Axis

getProximityModelWalker

public ModelWalker getProximityModelWalker()
Return this.

Overrides:
getProximityModelWalker in class Axis

gotoFirstNode

public XPathNode gotoFirstNode(XPathNode contextNode)
Return the getStartNode(contextNode).

Specified by:
gotoFirstNode in interface ModelWalker
Returns:
the first node of the path represented by this ModelWalker.- If null the path is empty.

gotoNextNode

public XPathNode gotoNextNode(XPathNode lastNode)
Return the parent.

Specified by:
gotoNextNode in interface ModelWalker
Parameters:
lastNode - a XPathNode obtained from the last call to gotoFirstNode or gotoNextNode. If the node is another node the behaviour is not determined.
Returns:
the next node of the path represented by this ModelWalker.- If null then the path ended.

getStartNode

protected XPathNode getStartNode(XPathNode contextNode)