org.exist.xquery
Class Predicate

java.lang.Object
  extended by org.exist.xquery.AbstractExpression
      extended by org.exist.xquery.PathExpr
          extended by org.exist.xquery.Predicate
All Implemented Interfaces:
CompiledXQuery, Expression, CompiledExpression

public class Predicate
extends PathExpr

Handles predicate expressions.

Author:
Wolfgang Meier

Field Summary
 
Fields inherited from interface org.exist.xquery.Expression
DOT_TEST, EXPRESSION_ID_INVALID, IGNORE_CONTEXT, IN_NODE_CONSTRUCTOR, IN_PREDICATE, IN_UPDATE, IN_WHERE_CLAUSE, NEED_INDEX_INFO, NO_CONTEXT_ID, SINGLE_STEP_EXECUTION, USE_TREE_TRAVERSAL
 
Constructor Summary
Predicate(XQueryContext context)
           
 
Method Summary
 void accept(ExpressionVisitor visitor)
          Start traversing the expression tree using the specified ExpressionVisitor.
 void analyze(AnalyzeContextInfo contextInfo)
          Statically analyze the expression and its subexpressions.
 void dump(ExpressionDumper dumper)
          Write a diagnostic dump of the expression to the passed ExpressionDumper.
 Sequence evalPredicate(Sequence outerSequence, Sequence contextSequence, int mode)
           
 int getDependencies()
          Returns Dependency.DEFAULT_DEPENDENCIES.
 Expression getParent()
           
 void resetState(boolean postOptimization)
          Called to inform an expression that it should reset to its initial state.
 void setContextDocSet(DocumentSet contextSet)
           
 String toString()
           
 
Methods inherited from class org.exist.xquery.PathExpr
add, add, addPath, addPredicate, dump, eval, getASTNode, getCardinality, getContext, getDocumentSet, getExpression, getLastExpression, getLength, getLiteralValue, getSource, isValid, replaceExpression, replaceLastExpression, reset, returnsType, setContext, setPrimaryAxis, setSource
 
Methods inherited from class org.exist.xquery.AbstractExpression
eval, getContextDocSet, getContextId, getExpressionId, setASTNode
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.exist.xquery.CompiledXQuery
eval
 

Constructor Detail

Predicate

public Predicate(XQueryContext context)
Method Detail

getDependencies

public int getDependencies()
Description copied from class: AbstractExpression
Returns Dependency.DEFAULT_DEPENDENCIES.

Specified by:
getDependencies in interface Expression
Overrides:
getDependencies in class PathExpr
Returns:
set of bit-flags
See Also:
Expression.getDependencies()

analyze

public void analyze(AnalyzeContextInfo contextInfo)
             throws XPathException
Description copied from interface: Expression
Statically analyze the expression and its subexpressions. During the static analysis phase, the query engine can detect unknown variables and some type errors.

Specified by:
analyze in interface Expression
Overrides:
analyze in class PathExpr
Throws:
XPathException

evalPredicate

public Sequence evalPredicate(Sequence outerSequence,
                              Sequence contextSequence,
                              int mode)
                       throws XPathException
Throws:
XPathException

setContextDocSet

public void setContextDocSet(DocumentSet contextSet)
Specified by:
setContextDocSet in interface Expression
Overrides:
setContextDocSet in class AbstractExpression

resetState

public void resetState(boolean postOptimization)
Description copied from interface: Expression
Called to inform an expression that it should reset to its initial state. All cached data in the expression object should be dropped. For example, the xmldb:document() function calls this method whenever the input document set has changed.

Specified by:
resetState in interface Expression
Overrides:
resetState in class PathExpr

getParent

public Expression getParent()
Overrides:
getParent in class PathExpr

accept

public void accept(ExpressionVisitor visitor)
Description copied from interface: Expression
Start traversing the expression tree using the specified ExpressionVisitor.

Specified by:
accept in interface Expression
Overrides:
accept in class PathExpr

dump

public void dump(ExpressionDumper dumper)
Description copied from interface: Expression
Write a diagnostic dump of the expression to the passed ExpressionDumper.

Specified by:
dump in interface Expression
Overrides:
dump in class PathExpr
Parameters:
dumper - the expression dumper to write to

toString

public String toString()
Overrides:
toString in class PathExpr


Copyright (C) Wolfgang Meier. All rights reserved.