jd.xml.xpath.expr.path
Class SimpleLocationStep

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

public class SimpleLocationStep
extends LocationStep

An LocationStep without predicate filters-


Field Summary
 
Fields inherited from class jd.xml.xpath.expr.path.LocationStep
axis_, maxAxisResultSize_, 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
SimpleLocationStep(Axis axis, NodeTest nodeTest)
          Create a new SimpleLocationStep.
 
Method Summary
 boolean canCreateModelWalker()
          Return true.
 int getMinResultSize()
          Return the minimum size of the returned NodeSet or 0 if not known.
 ModelWalker getModelWalker()
          Return a ModelWalker.
 void getNodes(XPathContext context, XMutableNodeSet nodeSet)
          Evaluate the LocationStep.
 boolean toBooleanValue(XPathContext context)
          Evaluate the Expression to a number.
 XPathNode toNode(XPathContext context)
          Evaluate the Expression to a XPathNode.
 XNodeSet toNodeSet(XPathContext context, int nodeSetOrdering)
          Evaluate the LocationStep.
 double toNumberValue(XPathContext context)
          Evaluate the Expression to a number.
 String toStringValue(XPathContext context)
          Evaluate the Expression to a number.
 
Methods inherited from class jd.xml.xpath.expr.path.LocationStep
accept, getAxis, getContextDependencies, getMaxResultSize, getNodeTest
 
Methods inherited from class jd.xml.xpath.expr.NodeSetExpression
getMaxResultSize, getMinResultSize, getResultType, toXObject
 
Methods inherited from class jd.xml.xpath.expr.ExpressionImpl
hasContextDependencies, isUniqueFilter, matchesFilter, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleLocationStep

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

Method Detail

getMinResultSize

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

Overrides:
getMinResultSize in class NodeSetExpression

toNumberValue

public double toNumberValue(XPathContext context)
Evaluate the Expression to a number.

Specified by:
toNumberValue in interface Expression
Overrides:
toNumberValue in class NodeSetExpression

toStringValue

public String toStringValue(XPathContext context)
Evaluate the Expression to a number.

Specified by:
toStringValue in interface Expression
Overrides:
toStringValue in class NodeSetExpression

toBooleanValue

public boolean toBooleanValue(XPathContext context)
Evaluate the Expression to a number.

Specified by:
toBooleanValue in interface Expression
Overrides:
toBooleanValue in class NodeSetExpression

toNodeSet

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

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

toNode

public XPathNode toNode(XPathContext context)
Evaluate the Expression to a XPathNode.

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

getNodes

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

Specified by:
getNodes in class LocationStep
Parameters:
context - the evaluation context
nodeSet - a NodeSet where to store the resulting nodes

getModelWalker

public ModelWalker getModelWalker()
Return a ModelWalker.

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

canCreateModelWalker

public boolean canCreateModelWalker()
Return true.

Overrides:
canCreateModelWalker in class NodeSetExpression