org.basex.query.expr
Class Logical

java.lang.Object
  extended by org.basex.data.ExprInfo
      extended by org.basex.query.expr.Expr
          extended by org.basex.query.expr.ParseExpr
              extended by org.basex.query.expr.Arr
                  extended by org.basex.query.expr.Logical
Direct Known Subclasses:
And, Or

public abstract class Logical
extends Arr

Logical expression, extended by And and Or.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Nested Class Summary
 
Nested classes/interfaces inherited from class org.basex.query.expr.Expr
Expr.Flag
 
Field Summary
 
Fields inherited from class org.basex.query.expr.Arr
expr
 
Fields inherited from class org.basex.query.expr.ParseExpr
info, size, type
 
Constructor Summary
protected Logical(InputInfo ii, Expr[] e)
          Constructor.
 
Method Summary
protected  void compFlatten(QueryContext ctx)
          Flattens nested logical expressions.
 Expr compile(QueryContext ctx, VarScope scp)
          Compiles and optimizes the expression, assigns data types and cardinalities.
 
Methods inherited from class org.basex.query.expr.Arr
accept, allAreValues, checkNoUp, checkUp, copyAll, count, exprSize, has, indexEquivalent, inline, plan, removable, toString
 
Methods inherited from class org.basex.query.expr.ParseExpr
checkAdmin, checkAllUp, checkBinary, checkBln, checkColl, checkCreate, checkCtx, checkDbl, checkDBNode, checkEStr, checkEStr, checkFunc, checkItem, checkItr, checkItr, checkMap, checkNode, checkNode, checkNode, checkNoEmpty, checkNoneUp, checkNoUp, checkQNm, checkStr, checkStr, checkStrBin, checkType, checkWrite, compBln, copyType, ebv, item, iter, optPre, preEval, size, test, type, value
 
Methods inherited from class org.basex.query.expr.Expr
addText, compEbv, copy, copy, hasFreeVars, indexAccessible, inlineAll, isEmpty, isFunction, isItem, isVacuous, isValue, iterable, markTailCalls, optimize, sameAs, uses, visitAll
 
Methods inherited from class org.basex.data.ExprInfo
addPlan, addPlan, description, info, planAttr, planElem, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Logical

protected Logical(InputInfo ii,
                  Expr[] e)
Constructor.

Parameters:
ii - input info
e - expression list
Method Detail

compile

public Expr compile(QueryContext ctx,
                    VarScope scp)
             throws QueryException
Description copied from class: Expr
Compiles and optimizes the expression, assigns data types and cardinalities.

Overrides:
compile in class Arr
Parameters:
ctx - query context
scp - variable scope
Returns:
optimized expression
Throws:
QueryException - query exception

compFlatten

protected final void compFlatten(QueryContext ctx)
Flattens nested logical expressions.

Parameters:
ctx - query context