jd.xml.xpath.expr.path
Class LocationStep

java.lang.Object
  extended byjd.xml.xpath.expr.ExpressionImpl
      extended byjd.xml.xpath.expr.NodeSetExpression
          extended byjd.xml.xpath.expr.path.LocationStep
All Implemented Interfaces:
Expression
Direct Known Subclasses:
FilteredLocationStep, SimpleLocationStep

public abstract class LocationStep
extends NodeSetExpression

An expression class to represent XPath location steps with and without predicate filters.


Field Summary
protected  Axis axis_
           
protected  int maxAxisResultSize_
           
protected  NodeTest nodeTest_
           
 
Fields inherited from interface jd.xml.xpath.expr.Expression
DEP_CONTEXT_NODE, DEP_CONTEXT_POSITION, DEP_CONTEXT_SIZE, DEP_CONTEXT_STATIC, DEP_NONE, DEP_UNKNOWN
 
Constructor Summary
LocationStep(Axis axis, NodeTest nodeTest)
          Create a new LocationStep.
 
Method Summary
 void accept(ExpressionVisitor visitor)
          Accept a ExpressionVisitor.
 Axis getAxis()
          Return the Axis of the LocationStep.
 int getContextDependencies()
          Return DEP_CONTEXT_NODE.
 int getMaxResultSize()
          Return the maximum size of the returned NodeSet or 0 if not known.
abstract  void getNodes(XPathContext context, XMutableNodeSet nodeSet)
          Evaluate the LocationStep.
 NodeTest getNodeTest()
          Return the NodeTest of the LocationStep.
 
Methods inherited from class jd.xml.xpath.expr.NodeSetExpression
canCreateModelWalker, getMaxResultSize, getMinResultSize, getMinResultSize, getModelWalker, getResultType, toBooleanValue, toNumberValue, toStringValue, toXObject
 
Methods inherited from class jd.xml.xpath.expr.ExpressionImpl
hasContextDependencies, isUniqueFilter, matchesFilter, toNode, toNodeSet, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

axis_

protected final Axis axis_

nodeTest_

protected final NodeTest nodeTest_

maxAxisResultSize_

protected final int maxAxisResultSize_
Constructor Detail

LocationStep

public LocationStep(Axis axis,
                    NodeTest nodeTest)
Create a new LocationStep.

Method Detail

getAxis

public final Axis getAxis()
Return the Axis of the LocationStep.


getNodeTest

public NodeTest getNodeTest()
Return the NodeTest of the LocationStep.


getMaxResultSize

public int getMaxResultSize()
Description copied from class: NodeSetExpression
Return the maximum size of the returned NodeSet or 0 if not known. The default implementation returns 0.

Overrides:
getMaxResultSize in class NodeSetExpression

getNodes

public abstract void getNodes(XPathContext context,
                              XMutableNodeSet nodeSet)
Evaluate the LocationStep.

Parameters:
context - the evaluation context
nodeSet - a NodeSet where to store the resulting nodes

getContextDependencies

public int getContextDependencies()
Return DEP_CONTEXT_NODE.


accept

public void accept(ExpressionVisitor visitor)
Description copied from interface: Expression
Accept a ExpressionVisitor.