org.basex.query
Class QueryContext

java.lang.Object
  extended by org.basex.core.Progress
      extended by org.basex.query.QueryContext
Direct Known Subclasses:
XPContext, XQContext

public abstract class QueryContext
extends Progress

This abstract query expression provides the architecture for a compiled query.

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

Constructor Summary
QueryContext()
           
 
Method Summary
abstract  void compile(Nodes nodes)
          Optimizes the expression.
 void compInfo(java.lang.String string, java.lang.Object... ext)
          Adds some optimization info.
 java.lang.String det()
          Returns detailed information on this progress.
abstract  Result eval(Nodes nodes)
          Evaluates the expression with the specified context set.
 void evalInfo(java.lang.String string, java.lang.Object... ext)
          Adds some evaluation info.
 java.lang.String head()
          Returns short information on this process.
 java.lang.String info()
          Returns query background information.
 double prog()
          Returns progress information.
 
Methods inherited from class org.basex.core.Progress
detail, header, progress, progress, stop, stopped
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryContext

public QueryContext()
Method Detail

compile

public abstract void compile(Nodes nodes)
                      throws EvalException
Optimizes the expression.

Parameters:
nodes - node context
Throws:
EvalException - evaluation exception

compInfo

public final void compInfo(java.lang.String string,
                           java.lang.Object... ext)
Adds some optimization info.

Parameters:
string - evaluation info
ext - text text extensions

det

public final java.lang.String det()
Description copied from class: Progress
Returns detailed information on this progress.

Returns:
information in detail

eval

public abstract Result eval(Nodes nodes)
                     throws EvalException
Evaluates the expression with the specified context set.

Parameters:
nodes - initial context set
Returns:
resulting value
Throws:
EvalException - evaluation exception

evalInfo

public final void evalInfo(java.lang.String string,
                           java.lang.Object... ext)
Adds some evaluation info.

Parameters:
string - evaluation info
ext - text text extensions

head

public final java.lang.String head()
Description copied from class: Progress
Returns short information on this process.

Returns:
header information

info

public final java.lang.String info()
Returns query background information.

Returns:
warning

prog

public final double prog()
Description copied from class: Progress
Returns progress information.

Returns:
header information