org.exist.xquery
Class QuantifiedExpression

java.lang.Object
  extended by org.exist.xquery.AbstractExpression
      extended by org.exist.xquery.BindingExpression
          extended by org.exist.xquery.QuantifiedExpression
All Implemented Interfaces:
Expression

public class QuantifiedExpression
extends BindingExpression

Represents a quantified expression: "some ... in ... satisfies", "every ... in ... satisfies".

Author:
Wolfgang Meier (wolfgang@exist-db.org)

Field Summary
static int EVERY
           
static int SOME
           
 
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, POSITIONAL_PREDICATE, SINGLE_STEP_EXECUTION, USE_TREE_TRAVERSAL
 
Constructor Summary
QuantifiedExpression(XQueryContext context, int mode)
           
 
Method Summary
 void analyze(AnalyzeContextInfo contextInfo, OrderSpec[] orderBy, GroupSpec[] groupBy)
           
 void dump(ExpressionDumper dumper)
          Write a diagnostic dump of the expression to the passed ExpressionDumper.
 Sequence eval(Sequence contextSequence, Item contextItem, Sequence resultSequence, GroupedValueSequenceTable groupedSequence)
           
 int getDependencies()
          Returns Dependency.DEFAULT_DEPENDENCIES.
 int returnsType()
          The static return type of the expression.
 String toString()
           
 
Methods inherited from class org.exist.xquery.BindingExpression
analyze, eval, getInputSequence, getReturnExpression, getVariable, getWhereExpression, preselect, resetState, setGroupReturnExpr, setGroupSpecs, setGroupVariable, setInputSequence, setOrderSpecs, setReturnExpression, setSequenceType, setToGroupVariable, setVariable, setWhereExpression
 
Methods inherited from class org.exist.xquery.AbstractExpression
accept, eval, getCardinality, getColumn, getContext, getContextDocSet, getContextId, getExpressionId, getLine, getPrimaryAxis, getSource, setASTNode, setContextDocSet, setLocation, setPrimaryAxis
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SOME

public static final int SOME
See Also:
Constant Field Values

EVERY

public static final int EVERY
See Also:
Constant Field Values
Constructor Detail

QuantifiedExpression

public QuantifiedExpression(XQueryContext context,
                            int mode)
Parameters:
context -
Method Detail

analyze

public void analyze(AnalyzeContextInfo contextInfo,
                    OrderSpec[] orderBy,
                    GroupSpec[] groupBy)
             throws XPathException
Specified by:
analyze in class BindingExpression
Throws:
XPathException

eval

public Sequence eval(Sequence contextSequence,
                     Item contextItem,
                     Sequence resultSequence,
                     GroupedValueSequenceTable groupedSequence)
              throws XPathException
Specified by:
eval in class BindingExpression
Throws:
XPathException

dump

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

Parameters:
dumper - the expression dumper to write to

toString

public String toString()
Overrides:
toString in class Object

returnsType

public int returnsType()
Description copied from interface: Expression
The static return type of the expression. This method should return one of the type constants defined in class Type. If the return type cannot be determined statically, return Type.ITEM.

Specified by:
returnsType in interface Expression
Specified by:
returnsType in class AbstractExpression

getDependencies

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

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


Copyright (C) Wolfgang Meier. All rights reserved.