com.novell.xml.xpath
Class FilterExpr

java.lang.Object
  extended bycom.novell.xml.xpath.NodeSetExpr
      extended bycom.novell.xml.xpath.FilterExpr
All Implemented Interfaces:
Expression

public class FilterExpr
extends NodeSetExpr
implements Expression

This class implements the functionality of an XPath FilterExpr production.


Constructor Summary
FilterExpr(Expression expr, Predicate predicate)
          Construct a FilterExpr from an arbitrary node-set expression and a predicate
 
Method Summary
 ExpressionValue evaluate(Node contextNode, ExpressionContext context)
          Evaluate the expression with repect to the passed context
 String toString()
          Provide a readable description for debugging.
 
Methods inherited from class com.novell.xml.xpath.NodeSetExpr
dump, getResultType, isConstant, registerForReset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.novell.xml.xpath.Expression
dump, getResultType, isConstant, registerForReset
 

Constructor Detail

FilterExpr

public FilterExpr(Expression expr,
                  Predicate predicate)
Construct a FilterExpr from an arbitrary node-set expression and a predicate

Parameters:
expr - An arbitrary expression that results in a node-set
predicate - A predicate to filter the expression node-set
Method Detail

toString

public String toString()
Provide a readable description for debugging.

Returns:
String representation

evaluate

public ExpressionValue evaluate(Node contextNode,
                                ExpressionContext context)
                         throws XPathEvaluationException
Evaluate the expression with repect to the passed context

Specified by:
evaluate in interface Expression
Parameters:
contextNode - context node for expression evaluation
context - expression context for expression evaluation
Returns:
result of evaluating expression
Throws:
XPathEvaluationException