org.basex.query.xpath
Class XPContext

java.lang.Object
  extended by org.basex.core.Progress
      extended by org.basex.query.QueryContext
          extended by org.basex.query.xpath.XPContext

public final class XPContext
extends QueryContext

Query context.

Author:
Workgroup DBIS, University of Konstanz 2005-08, ISC License, Tim Petrowsky

Field Summary
 int ftcount
          Count number of xpath fulltext query tokens.
 FTTokenizer ftitem
          Current fulltext item.
 FTPosFilter ftpos
          Current fulltext position filter.
 Nod item
          Data reference.
 boolean iu
          Flag for fulltext index use.
 boolean leaf
          Leaf flag.
 
Fields inherited from class org.basex.query.QueryContext
file, PLAN, query
 
Constructor Summary
XPContext(Expr expr, java.lang.String qu)
          Constructor.
 
Method Summary
 XPContext compile(Nodes n)
          Optimizes the expression.
 Item eval(Expr e)
          Evaluates the expression with the specified context set.
 Result eval(Nodes nodes)
          Evaluates the expression with the specified context set.
 void plan(Serializer ser)
          Recursively serializes the query plan.
 
Methods inherited from class org.basex.query.QueryContext
compInfo, det, evalInfo, info, planDot, planXML, prog, tit
 
Methods inherited from class org.basex.core.Progress
checkStop, detail, progress, progress, stop, title
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

item

public Nod item
Data reference.


leaf

public boolean leaf
Leaf flag.


ftcount

public int ftcount
Count number of xpath fulltext query tokens.


ftitem

public FTTokenizer ftitem
Current fulltext item.


ftpos

public FTPosFilter ftpos
Current fulltext position filter.


iu

public boolean iu
Flag for fulltext index use.

Constructor Detail

XPContext

public XPContext(Expr expr,
                 java.lang.String qu)
Constructor.

Parameters:
expr - root expression
qu - input query
Method Detail

compile

public XPContext compile(Nodes n)
                  throws QueryException
Description copied from class: QueryContext
Optimizes the expression.

Parameters:
n - node context
Returns:
query context
Throws:
QueryException - query exception

eval

public Result eval(Nodes nodes)
            throws QueryException
Description copied from class: QueryContext
Evaluates the expression with the specified context set.

Parameters:
nodes - initial context set
Returns:
resulting value
Throws:
QueryException - query exception

plan

public void plan(Serializer ser)
          throws java.lang.Exception
Description copied from class: QueryContext
Recursively serializes the query plan.

Parameters:
ser - serializer
Throws:
java.lang.Exception - exception

eval

public Item eval(Expr e)
          throws QueryException
Evaluates the expression with the specified context set. Additionally provides a context.

Parameters:
e - current expression
Returns:
resulting XPathValue
Throws:
QueryException - evaluation exception