org.basex.query.ft
Class FTOptions

java.lang.Object
  extended by org.basex.query.ExprInfo
      extended by org.basex.query.expr.Expr
          extended by org.basex.query.ft.FTExpr
              extended by org.basex.query.ft.FTOptions

public final class FTOptions
extends FTExpr

FTOptions expression.

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

Field Summary
 
Fields inherited from class org.basex.query.ft.FTExpr
expr
 
Constructor Summary
FTOptions(FTExpr e, FTOpt o)
          Constructor.
 
Method Summary
 FTExpr comp(QueryContext ctx)
          Optimizes and compiles the expression.
 void indexAccessible(QueryContext ctx, IndexContext ic)
          Checks if an index can be used for query evaluation.
 FTExpr indexEquivalent(QueryContext ctx, IndexContext ic)
          Returns an equivalent expression which accesses an index structure.
 FTNodeIter iter(QueryContext ctx)
          Evaluates the expression and returns an iterator on the resulting items.
 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.ft.FTExpr
color, remove, returned, uses
 
Methods inherited from class org.basex.query.expr.Expr
addText, atomic, checkCtx, checkDbl, checkItr, duplicates, e, ebv, i, removable, sameAs, size, test
 
Methods inherited from class org.basex.query.ExprInfo
info, name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FTOptions

public FTOptions(FTExpr e,
                 FTOpt o)
Constructor.

Parameters:
e - expression
o - ft options
Method Detail

comp

public FTExpr comp(QueryContext ctx)
            throws QueryException
Description copied from class: Expr
Optimizes and compiles the expression.

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

iter

public FTNodeIter iter(QueryContext ctx)
                throws QueryException
Description copied from class: Expr
Evaluates the expression and returns an iterator on the resulting items. If this method is not overwritten, Expr.atomic(org.basex.query.QueryContext) must be implemented.

Specified by:
iter in class FTExpr
Parameters:
ctx - query context
Returns:
resulting item
Throws:
QueryException - evaluation exception

indexAccessible

public void indexAccessible(QueryContext ctx,
                            IndexContext ic)
                     throws QueryException
Description copied from class: Expr
Checks if an index can be used for query evaluation.

Overrides:
indexAccessible in class Expr
Parameters:
ctx - query context
ic - index context
Throws:
QueryException - Exception

indexEquivalent

public FTExpr indexEquivalent(QueryContext ctx,
                              IndexContext ic)
                       throws QueryException
Description copied from class: Expr
Returns an equivalent expression which accesses an index structure. Must be called if Expr.indexAccessible(org.basex.query.QueryContext, org.basex.query.IndexContext) is implemented for an expression.

Overrides:
indexEquivalent in class FTExpr
Parameters:
ctx - query context
ic - index context
Returns:
Equivalent index-expression or null
Throws:
QueryException - Exception

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 FTExpr
Parameters:
ser - serializer
Throws:
java.io.IOException - exception

toString

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