org.basex.query.xpath.expr
Class FTUnaryNot

java.lang.Object
  extended by org.basex.query.xpath.expr.Expr
      extended by org.basex.query.xpath.expr.ArrayExpr
          extended by org.basex.query.xpath.expr.FTUnaryNot

public final class FTUnaryNot
extends ArrayExpr

Logical FTUnaryNot expression.

Author:
Workgroup DBIS, University of Konstanz 2005-07, ISC License, Sebastian Gath

Field Summary
 
Fields inherited from class org.basex.query.xpath.expr.ArrayExpr
exprs
 
Constructor Summary
FTUnaryNot(Expr[] e)
          Constructor.
 
Method Summary
 Expr compile(XPContext ctx)
          Tries to optimize the Expression.
 Bool eval(XPContext ctx)
          Evaluates the expression with the specified context set.
 Expr indexEquivalent(XPContext ctx, Step curr)
          For predicate optimization.
 int indexSizes(XPContext ctx, Step curr, int min)
          For predicate optimization.
 
Methods inherited from class org.basex.query.xpath.expr.ArrayExpr
sameAs, toString, usesPos, usesSize
 
Methods inherited from class org.basex.query.xpath.expr.Expr
returnedValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FTUnaryNot

public FTUnaryNot(Expr[] e)
Constructor.

Parameters:
e - expressions
Method Detail

compile

public Expr compile(XPContext ctx)
             throws EvalException
Description copied from class: Expr
Tries to optimize the Expression.

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

eval

public Bool eval(XPContext ctx)
          throws EvalException
Description copied from class: Expr
Evaluates the expression with the specified context set. Additionally provides a context

Specified by:
eval in class Expr
Parameters:
ctx - query context
Returns:
resulting XPathValue
Throws:
EvalException - evaluation exception

indexEquivalent

public Expr indexEquivalent(XPContext ctx,
                            Step curr)
                     throws EvalException
Description copied from class: Expr
For predicate optimization. If possible return an expression yielding the same results using the index. This may not do any changes to the current expression.

Overrides:
indexEquivalent in class Expr
Parameters:
ctx - root
curr - the LocationStep this Expression is a predicate of
Returns:
Equivalent index-expression or null
Throws:
EvalException - evaluation exception

indexSizes

public int indexSizes(XPContext ctx,
                      Step curr,
                      int min)
Description copied from class: Expr
For predicate optimization. If possible return the number of entries an index returns. This may not do any changes to the current expression.

Overrides:
indexSizes in class Expr
Parameters:
ctx - root
curr - the LocationStep this Expression is a predicate of
min - current minimum size
Returns:
Equivalent index-expression or null