org.basex.query.xpath.expr
Class FTContains

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
              extended by org.basex.query.xpath.expr.FTContains

public final class FTContains
extends Arr

FTContains Expression; used for fulltext operations. Used for sequential processing.

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

Field Summary
 
Fields inherited from class org.basex.query.xpath.expr.Arr
expr
 
Constructor Summary
FTContains(Expr e1, Expr e2, FTOpt o, boolean indexuse)
          Constructor.
FTContains(Expr e1, FTArrayExpr e2)
          Constructor.
 
Method Summary
 Expr comp(XPContext ctx)
          Optimizes the expression.
 Item eval(XPContext ctx)
          Evaluates the expression with the specified context set.
 Expr indexEquivalent(XPContext ctx, Step curr, boolean seq)
          Returns an equivalent expression which accesses an index structure.
 int indexSizes(XPContext ctx, Step curr, int min)
          Returns the number of results if this query is evaluated by an index.
 void plan(Serializer ser)
          Recursively sends the abstract syntax of this expression to the specified serializer.
 java.lang.String toString()
           
 
Methods inherited from class org.basex.query.xpath.expr.Arr
sameAs, usesPos, usesSize
 
Methods inherited from class org.basex.query.xpath.expr.Expr
returnedValue
 
Methods inherited from class org.basex.query.ExprInfo
color, info, name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FTContains

public FTContains(Expr e1,
                  FTArrayExpr e2)
Constructor.

Parameters:
e1 - first expression
e2 - second expression to compare with first

FTContains

public FTContains(Expr e1,
                  Expr e2,
                  FTOpt o,
                  boolean indexuse)
Constructor.

Parameters:
e1 - first expression
e2 - second expression to compare with first
o - fulltext options
indexuse - flag for index use
Method Detail

comp

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

Overrides:
comp in class Arr
Parameters:
ctx - expression context
Returns:
optimized Expression
Throws:
QueryException - evaluation exception

eval

public Item eval(XPContext ctx)
          throws QueryException
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:
QueryException - evaluation exception

indexEquivalent

public Expr indexEquivalent(XPContext ctx,
                            Step curr,
                            boolean seq)
                     throws QueryException
Description copied from class: Expr
Returns an equivalent expression which accesses an index structure.

Overrides:
indexEquivalent in class Expr
Parameters:
ctx - root
curr - location step
seq - flag for sequential evaluation
Returns:
Equivalent index-expression or null
Throws:
QueryException - evaluation exception

indexSizes

public int indexSizes(XPContext ctx,
                      Step curr,
                      int min)
Description copied from class: Expr
Returns the number of results if this query is evaluated by an index. If Integer.MAX_VALUE is returned, no index access is possible.

Overrides:
indexSizes in class Expr
Parameters:
ctx - root
curr - the current location step
min - current minimum index hits
Returns:
number of expected results

toString

public java.lang.String toString()
Specified by:
toString in class ExprInfo

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.

Overrides:
plan in class Arr
Parameters:
ser - serializer
Throws:
java.io.IOException - exception