org.exist.xquery
Class ValueComparison

java.lang.Object
  extended byorg.exist.xquery.AbstractExpression
      extended byorg.exist.xquery.PathExpr
          extended byorg.exist.xquery.BinaryOp
              extended byorg.exist.xquery.GeneralComparison
                  extended byorg.exist.xquery.ValueComparison
All Implemented Interfaces:
CompiledXQuery, Expression

public class ValueComparison
extends GeneralComparison

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

Field Summary
 
Fields inherited from class org.exist.xquery.GeneralComparison
cached, collationArg, inWhereClause, relation, truncation
 
Fields inherited from class org.exist.xquery.PathExpr
inPredicate, keepVirtual, LOG, source, steps
 
Fields inherited from class org.exist.xquery.AbstractExpression
astNode, context, contextDocSet, contextId
 
Fields inherited from interface org.exist.xquery.Expression
EXPRESSION_ID_INVALID, IGNORE_CONTEXT, IN_PREDICATE, IN_UPDATE, IN_WHERE_CLAUSE, NO_CONTEXT_ID, SINGLE_STEP_EXECUTION
 
Constructor Summary
ValueComparison(XQueryContext context, Expression left, Expression right, int relation)
           
ValueComparison(XQueryContext context, int relation)
           
 
Method Summary
 void dump(ExpressionDumper dumper)
          Write a diagnostic dump of the expression to the passed ExpressionDumper.
protected  Sequence genericCompare(Sequence contextSequence, Item contextItem)
          Generic, slow implementation.
protected  Sequence nodeSetCompare(NodeSet nodes, Sequence contextSequence)
           
 java.lang.String toString()
           
 
Methods inherited from class org.exist.xquery.GeneralComparison
analyze, compareAtomic, compareValues, eval, getCollator, getDependencies, nodeSetCompare, quickNodeSetCompare, resetState, returnsType, setCollation, simplify, switchOperands
 
Methods inherited from class org.exist.xquery.BinaryOp
getLeft, getRight, setContextDocSet, setLeft, setRight
 
Methods inherited from class org.exist.xquery.PathExpr
add, add, addPath, addPredicate, dump, getASTNode, getContext, getDocumentSet, getExpression, getLastExpression, getLength, getLiteralValue, getSource, isValid, replaceLastExpression, reset, setContext, setPrimaryAxis, setSource
 
Methods inherited from class org.exist.xquery.AbstractExpression
eval, getCardinality, getContextDocSet, getContextId, getExpressionId, setASTNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.exist.xquery.CompiledXQuery
eval
 

Constructor Detail

ValueComparison

public ValueComparison(XQueryContext context,
                       int relation)
Parameters:
context -
relation -

ValueComparison

public ValueComparison(XQueryContext context,
                       Expression left,
                       Expression right,
                       int relation)
Parameters:
context -
left -
right -
relation -
Method Detail

genericCompare

protected Sequence genericCompare(Sequence contextSequence,
                                  Item contextItem)
                           throws XPathException
Description copied from class: GeneralComparison
Generic, slow implementation. Applied if none of the possible optimizations can be used.

Overrides:
genericCompare in class GeneralComparison
Parameters:
contextSequence -
contextItem -
Returns:
Throws:
XPathException

nodeSetCompare

protected Sequence nodeSetCompare(NodeSet nodes,
                                  Sequence contextSequence)
                           throws XPathException
Overrides:
nodeSetCompare in class GeneralComparison
Throws:
XPathException

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 GeneralComparison

toString

public java.lang.String toString()
Overrides:
toString in class GeneralComparison


<oXygen/> XML Editor provides support for editing and debugging XQuery expressions against the eXist XML Database.