org.exist.xpath
Class Predicate
java.lang.Object
org.exist.xpath.PathExpr
org.exist.xpath.Predicate
- All Implemented Interfaces:
- Expression
- public class Predicate
- extends PathExpr
Handles predicate expressions.
- Author:
- Wolfgang Meier
Field Summary |
protected static org.apache.log4j.Logger |
LOG
|
Methods inherited from class org.exist.xpath.PathExpr |
add, add, addDocument, addPath, addPredicate, getDocumentSet, getExpression, getLength, pprint, preselect, returnsType, setDocumentSet, setFirstExpression, setInPredicate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected static org.apache.log4j.Logger LOG
Predicate
public Predicate(BrokerPool pool)
eval
public Value eval(DocumentSet docs,
NodeSet context,
NodeProxy node)
- Description copied from interface:
Expression
- Evaluate the expression represented by this object.
Depending on the context in which this expression is executed,
either context, node or both of them may be set. An implementing
class should know how to handle this. Most classes only expect
context to contain a list of nodes which represents the current
context of this expression.
- Specified by:
eval
in interface Expression
- Overrides:
eval
in class PathExpr
preselect
public DocumentSet preselect(DocumentSet in_docs)
- Description copied from interface:
Expression
- Determine the documents, taken from in_docs, for which this expression
will possibly yield a result. An expression does not have to do
anything here. It may simply return in_docs.
This method is used to restrict the range of documents in question for
a given xpath-expression. It is called before the xpath-expression is
actually executed.
- Specified by:
preselect
in interface Expression
- Overrides:
preselect
in class PathExpr
evalBody
public Value evalBody(DocumentSet docs,
NodeSet context,
NodeProxy node)
Copyright (C) Wolfgang Meier. All rights reserved.