jd.xml.xpath.expr.path
Class LocationStepChain

java.lang.Object
  extended byjd.xml.xpath.expr.ExpressionImpl
      extended byjd.xml.xpath.expr.NodeSetExpression
          extended byjd.xml.xpath.expr.path.LocationStepChain
All Implemented Interfaces:
Expression

public class LocationStepChain
extends NodeSetExpression

A LocationStepChain is a sequence of single location steps, chained together by the '/' operator. A LocationStepChain could be represented by a series of ComposedPath objects, but allows a more optimized evaluation.


Field Summary
 
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
LocationStepChain(LocationStep[] steps)
          Create a LocationStepChain.
 
Method Summary
 void accept(ExpressionVisitor visitor)
          Accept a ExpressionVisitor.
 boolean canCreateModelWalker()
          Return true if all steps create a ModelWalker.
static LocationStepChain create(Expression lhs, LocationStep rhs)
           
 int getContextDependencies()
          Return DEP_CONTEXT_NODE.
 ModelWalker getModelWalker()
          Return a ModelWalker.
 XNodeSet toNodeSet(XPathContext context, int nodeSetOrdering)
          Evaluate the LocationStep.
 
Methods inherited from class jd.xml.xpath.expr.NodeSetExpression
getMaxResultSize, getMaxResultSize, getMinResultSize, getMinResultSize, getResultType, toBooleanValue, toNumberValue, toStringValue, toXObject
 
Methods inherited from class jd.xml.xpath.expr.ExpressionImpl
hasContextDependencies, isUniqueFilter, matchesFilter, toNode, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocationStepChain

public LocationStepChain(LocationStep[] steps)
Create a LocationStepChain.

Method Detail

create

public static LocationStepChain create(Expression lhs,
                                       LocationStep rhs)

toNodeSet

public XNodeSet toNodeSet(XPathContext context,
                          int nodeSetOrdering)
Evaluate the LocationStep.

Specified by:
toNodeSet in interface Expression
Overrides:
toNodeSet in class ExpressionImpl

getContextDependencies

public int getContextDependencies()
Return DEP_CONTEXT_NODE.


getModelWalker

public ModelWalker getModelWalker()
Return a ModelWalker.

Overrides:
getModelWalker in class NodeSetExpression
See Also:
NodeSetExpression.canCreateModelWalker()

canCreateModelWalker

public boolean canCreateModelWalker()
Return true if all steps create a ModelWalker.

Overrides:
canCreateModelWalker in class NodeSetExpression

accept

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