org.basex.query.ft
Class FTWords

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.FTWords

public final class FTWords
extends FTExpr

FTWords 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
FTWords(Expr e, FTOpt.FTMode m, Expr[] 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()
           
 boolean usesExclude()
          Checks if sub expressions of a mild not operator do not violate the grammar.
 
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

FTWords

public FTWords(Expr e,
               FTOpt.FTMode m,
               Expr[] o)
Constructor.

Parameters:
e - expression
m - search mode
o - occurrences
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)
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

indexEquivalent

public FTExpr indexEquivalent(QueryContext ctx,
                              IndexContext ic)
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

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

usesExclude

public boolean usesExclude()
Description copied from class: FTExpr
Checks if sub expressions of a mild not operator do not violate the grammar.

Returns:
result of check