jd.xml.xpath.expr.path
Class PredicateExpression

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

public class PredicateExpression
extends NodeSetExpression

PredicateExpression represents a predicate that filters a nodeset resulting from another expression.


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
PredicateExpression(Expression nodeSetExpr, Expression predicateExpr, boolean useForwardProximity)
          Create a PredicateExpression.
 
Method Summary
 void accept(ExpressionVisitor visitor)
          Accept a ExpressionVisitor.
 int getContextDependencies()
          Return a bitfield indicating the expression dependencies.
 XNodeSet toNodeSet(XPathContext context, int nodeSetOrdering)
          Evaluate the Expression.
 
Methods inherited from class jd.xml.xpath.expr.NodeSetExpression
canCreateModelWalker, getMaxResultSize, getMaxResultSize, getMinResultSize, getMinResultSize, getModelWalker, 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

PredicateExpression

public PredicateExpression(Expression nodeSetExpr,
                           Expression predicateExpr,
                           boolean useForwardProximity)
Create a PredicateExpression.

Parameters:
nodeSetExpr - an expression that is filtered by the predicate
predicateExpr - the filter predicate
useForwardProximity - flag how to apply a position filter to the nodeset
Method Detail

toNodeSet

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

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

getContextDependencies

public int getContextDependencies()
Return a bitfield indicating the expression dependencies.


accept

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