org.basex.query.util
Class IndexCosts

java.lang.Object
  extended by org.basex.query.util.IndexCosts

public final class IndexCosts
extends java.lang.Object

This class contains methods for analyzing the costs of index requests.

Author:
BaseX Team 2005-13, BSD License, Christian Gruen

Field Summary
 QueryContext ctx
          Query context.
 IndexContext ictx
          Index context.
 boolean not
          Flag for ftnot expressions.
 boolean seq
          Flag for sequential processing.
 Step step
          Index Step.
 
Constructor Summary
IndexCosts(IndexContext ic, QueryContext c, Step s)
          Constructor.
 
Method Summary
 void addCosts(int c)
          Adds the estimated costs.
 int costs()
          Returns the estimated costs.
 void costs(int c)
          Sets the estimated costs.
 Expr invert(Expr ex, ParseExpr root, boolean text)
          Rewrites the specified expression for index access.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ctx

public final QueryContext ctx
Query context.


ictx

public final IndexContext ictx
Index context.


step

public final Step step
Index Step.


not

public boolean not
Flag for ftnot expressions.


seq

public boolean seq
Flag for sequential processing.

Constructor Detail

IndexCosts

public IndexCosts(IndexContext ic,
                  QueryContext c,
                  Step s)
Constructor.

Parameters:
ic - index context
c - query context
s - index step
Method Detail

invert

public Expr invert(Expr ex,
                   ParseExpr root,
                   boolean text)
Rewrites the specified expression for index access.

Parameters:
ex - expression to be rewritten
root - new root expression
text - text flag
Returns:
index access

addCosts

public void addCosts(int c)
Adds the estimated costs.

Parameters:
c - cost to be added

costs

public void costs(int c)
Sets the estimated costs.

Parameters:
c - cost to be added

costs

public int costs()
Returns the estimated costs.

Returns:
costs