org.basex.query.xpath.expr
Class FTWords

java.lang.Object
  extended by org.basex.query.ExprInfo
      extended by org.basex.query.xpath.expr.Expr
          extended by org.basex.query.xpath.expr.FTArrayExpr
              extended by org.basex.query.xpath.expr.FTWords

public final class FTWords
extends FTArrayExpr

Fulltext primary expression and FTTimes.

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

Field Summary
 
Fields inherited from class org.basex.query.xpath.expr.FTArrayExpr
fto
 
Constructor Summary
FTWords(byte[] t, FTOpt.FTMode m, long[] o)
          Constructor.
 
Method Summary
 FTArrayExpr comp(XPContext ctx)
          Optimizes the expression.
 Item eval(XPContext ctx)
          Evaluates the expression with the specified context set.
 FTArrayExpr indexEquivalent(XPContext ctx, Step curr, boolean seq)
          Returns an equivalent expression which accesses an index structure.
 boolean indexOptions(MetaData meta)
          Verifies if the fulltext query options comply with the index defaults.
 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.FTArrayExpr
more, next, pos, usesPos, usesSize
 
Methods inherited from class org.basex.query.xpath.expr.Expr
returnedValue, sameAs
 
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

FTWords

public FTWords(byte[] t,
               FTOpt.FTMode m,
               long[] o)
Constructor.

Parameters:
t - token
m - search mode
o - occurrences
Method Detail

eval

public Item eval(XPContext ctx)
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

comp

public FTArrayExpr comp(XPContext ctx)
Description copied from class: FTArrayExpr
Optimizes the expression.

Overrides:
comp in class FTArrayExpr
Parameters:
ctx - expression context
Returns:
optimized Expression

indexOptions

public boolean indexOptions(MetaData meta)
Description copied from class: FTArrayExpr
Verifies if the fulltext query options comply with the index defaults. Check where this method is overwritten to get more info.

Overrides:
indexOptions in class FTArrayExpr
Parameters:
meta - meta data
Returns:
result of check

indexEquivalent

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

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

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

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

toString

public java.lang.String toString()
Overrides:
toString in class FTArrayExpr