Qizx/open API

net.axyana.qizxopen.xquery
Interface EvalContext

All Superinterfaces:
FONIDataModel.Factory

public interface EvalContext
extends FONIDataModel.Factory

XQuery Evaluation Context (internal use).


Field Summary
static int DOUBLE_REGISTER
           
static int INT_REGISTER
           
static int ITEM_REGISTER
           
static int LAST_REGISTER
           
static int MAX_REGISTER
           
static int STRING_REGISTER
           
 
Method Summary
 void at(net.axyana.qizxopen.xquery.op.Expression pt)
          Notes the current evaluation point for trace & debug.
 XQValue error(net.axyana.qizxopen.xquery.op.Expression location, java.lang.String error)
           
 XQValue error(net.axyana.qizxopen.xquery.op.Expression location, XQEvalException error)
          Raises a runtime error that is located at this Expression.
 XQValue evalPath(net.axyana.qizxopen.xquery.op.PathExpr path, Focus focus)
           
 EvalContext getCallerContext()
          Returns the calling context, null if not inside a user function.
 java.text.Collator getCollator(java.lang.String uri)
          Finds a collation by its URI.
 java.util.Date getCurrentDate()
          Time at start of query evaluation.
 net.axyana.qizxopen.xquery.op.Expression getCurrentLocation()
           
 XQValue getDocument(java.lang.String uri)
          Finds a document by URI.
 DocumentManager getDocumentManager()
          Returns the document manager used by this context.
 int getImplicitTimezone()
          implicit time zone as a difference in minutes from GMT (or UTC).
 XQValue getInput()
          Returns the document or collection input.
 XQModuleManager getModuleManager()
          Returns the Module Manager which was used for compiling the expression being executed.
 java.lang.Object getProperty(java.lang.String name)
          Retrieves a named property from the context.
 java.lang.String getSignature()
           
 StaticContext getStaticContext()
          Returns the initial static context.
 XQValue loadGlobal(net.axyana.qizxopen.xquery.op.GlobalVariable var)
           
 XQValue loadLocal(int address)
           
 double loadLocalDouble(int address)
           
 long loadLocalInteger(int address)
           
 XQItem loadLocalItem(int address)
           
 java.lang.String loadLocalString(int address)
           
 void message(int type, net.axyana.qizxopen.xquery.op.Expression location, java.lang.String text)
           
 void messages(XQMessage list)
           
 net.axyana.qizxopen.xquery.impl.XQueryExprImpl newExpression()
          Returns an expression prepared with the same settings and static context as this context.
 void storeLocal(int address, net.axyana.qizxopen.xquery.op.Expression expr, XQType dynamicType, Focus focus, EvalContext calling)
           
 void storeLocal(int address, XQValue value, boolean current)
           
 void storeLocalInteger(int address, long value)
           
 EvalContext subContext(net.axyana.qizxopen.xquery.fn.UserFunction.Call called)
          Helper creating a context for the called function.
 
Methods inherited from interface net.axyana.qizxopen.dm.FONIDataModel.Factory
makeDataModel
 

Field Detail

MAX_REGISTER

public static final int MAX_REGISTER
See Also:
Constant Field Values

INT_REGISTER

public static final int INT_REGISTER
See Also:
Constant Field Values

DOUBLE_REGISTER

public static final int DOUBLE_REGISTER
See Also:
Constant Field Values

STRING_REGISTER

public static final int STRING_REGISTER
See Also:
Constant Field Values

ITEM_REGISTER

public static final int ITEM_REGISTER
See Also:
Constant Field Values

LAST_REGISTER

public static final int LAST_REGISTER
See Also:
Constant Field Values
Method Detail

getStaticContext

public StaticContext getStaticContext()
Returns the initial static context.


getCallerContext

public EvalContext getCallerContext()
Returns the calling context, null if not inside a user function.


subContext

public EvalContext subContext(net.axyana.qizxopen.xquery.fn.UserFunction.Call called)
                       throws XQEvalException
Helper creating a context for the called function.

Throws:
XQEvalException

getModuleManager

public XQModuleManager getModuleManager()
Returns the Module Manager which was used for compiling the expression being executed.


newExpression

public net.axyana.qizxopen.xquery.impl.XQueryExprImpl newExpression()
Returns an expression prepared with the same settings and static context as this context. This is meant for the eval() function.


at

public void at(net.axyana.qizxopen.xquery.op.Expression pt)
        throws XQueryException
Notes the current evaluation point for trace & debug. Can also raise an EvalException if a time limit is reached.

Throws:
XQueryException

getInput

public XQValue getInput()
Returns the document or collection input.


getDocument

public XQValue getDocument(java.lang.String uri)
                    throws XQueryException
Finds a document by URI. Ensures that a document is loaded once only.

Throws:
XQueryException

getDocumentManager

public DocumentManager getDocumentManager()
Returns the document manager used by this context.


evalPath

public XQValue evalPath(net.axyana.qizxopen.xquery.op.PathExpr path,
                        Focus focus)
                 throws XQueryException
Throws:
XQueryException

getProperty

public java.lang.Object getProperty(java.lang.String name)
Retrieves a named property from the context.


getCollator

public java.text.Collator getCollator(java.lang.String uri)
                               throws XQueryException
Finds a collation by its URI. If not found, an error is raised. The codepoint collator is represented by a null value.

Parameters:
uri - collation URI. If null, the default collation is returned.
Throws:
XQueryException

getCurrentDate

public java.util.Date getCurrentDate()
Time at start of query evaluation.


getImplicitTimezone

public int getImplicitTimezone()
implicit time zone as a difference in minutes from GMT (or UTC).


error

public XQValue error(net.axyana.qizxopen.xquery.op.Expression location,
                     XQEvalException error)
              throws XQEvalException
Raises a runtime error that is located at this Expression.

Throws:
XQEvalException

error

public XQValue error(net.axyana.qizxopen.xquery.op.Expression location,
                     java.lang.String error)
              throws XQEvalException
Throws:
XQEvalException

message

public void message(int type,
                    net.axyana.qizxopen.xquery.op.Expression location,
                    java.lang.String text)

messages

public void messages(XQMessage list)

getCurrentLocation

public net.axyana.qizxopen.xquery.op.Expression getCurrentLocation()

getSignature

public java.lang.String getSignature()

loadGlobal

public XQValue loadGlobal(net.axyana.qizxopen.xquery.op.GlobalVariable var)
                   throws XQueryException
Throws:
XQueryException

loadLocal

public XQValue loadLocal(int address)
                  throws XQueryException
Throws:
XQueryException

loadLocalInteger

public long loadLocalInteger(int address)
                      throws XQueryException
Throws:
XQueryException

loadLocalDouble

public double loadLocalDouble(int address)
                       throws XQueryException
Throws:
XQueryException

loadLocalString

public java.lang.String loadLocalString(int address)
                                 throws XQueryException
Throws:
XQueryException

loadLocalItem

public XQItem loadLocalItem(int address)
                     throws XQueryException
Throws:
XQueryException

storeLocal

public void storeLocal(int address,
                       net.axyana.qizxopen.xquery.op.Expression expr,
                       XQType dynamicType,
                       Focus focus,
                       EvalContext calling)
                throws XQueryException
Throws:
XQueryException

storeLocal

public void storeLocal(int address,
                       XQValue value,
                       boolean current)
                throws XQueryException
Throws:
XQueryException

storeLocalInteger

public void storeLocalInteger(int address,
                              long value)

© 2005 Axyana Software