org.basex.query.xpath.expr
Class Arr

java.lang.Object
  extended by org.basex.query.ExprInfo
      extended by org.basex.query.xpath.expr.Expr
          extended by org.basex.query.xpath.expr.Arr
Direct Known Subclasses:
And, Clc, Cmp, FTContains, FTContainsNS, InterSect, Or, Path, Union

public abstract class Arr
extends Expr

Abstract array expression.

Author:
Workgroup DBIS, University of Konstanz 2005-08, ISC License, Christian Gruen

Field Summary
 Expr[] expr
          Expression list.
 
Method Summary
 Expr comp(XPContext ctx)
          Optimizes the expression.
 void plan(Serializer ser)
          Recursively sends the abstract syntax of this expression to the specified serializer.
 boolean sameAs(Expr cmp)
          Checks current and specified expression for equivalence.
 boolean usesPos()
          Checks whether this Expression (or its children) make use of the position parameter.
 boolean usesSize()
          Checks whether this Expression (or its children) make use of the setsize parameter.
 
Methods inherited from class org.basex.query.xpath.expr.Expr
eval, indexEquivalent, indexSizes, returnedValue
 
Methods inherited from class org.basex.query.ExprInfo
color, info, name, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

expr

public Expr[] expr
Expression list.

Method Detail

comp

public Expr comp(XPContext ctx)
          throws QueryException
Description copied from class: Expr
Optimizes the expression.

Specified by:
comp in class Expr
Parameters:
ctx - expression context
Returns:
optimized Expression
Throws:
QueryException - evaluation exception

usesPos

public final boolean usesPos()
Description copied from class: Expr
Checks whether this Expression (or its children) make use of the position parameter. If not this allows some nice optimizations.

Specified by:
usesPos in class Expr
Returns:
whether position is used

usesSize

public final boolean usesSize()
Description copied from class: Expr
Checks whether this Expression (or its children) make use of the setsize parameter. If not this allows early predicate evaluation.

Specified by:
usesSize in class Expr
Returns:
whether setsize is used

sameAs

public boolean sameAs(Expr cmp)
Description copied from class: Expr
Checks current and specified expression for equivalence.

Overrides:
sameAs in class Expr
Parameters:
cmp - expression to be compared
Returns:
result of check

plan

public void plan(Serializer ser)
          throws java.io.IOException
Description copied from class: ExprInfo
Recursively sends the abstract syntax of this expression to the specified serializer.

Specified by:
plan in class ExprInfo
Parameters:
ser - serializer
Throws:
java.io.IOException - exception