org.exist.xquery
Class AnalyzeContextInfo

java.lang.Object
  extended by org.exist.xquery.AnalyzeContextInfo

public class AnalyzeContextInfo
extends java.lang.Object

Holds context information and execution hints for XQuery expressions. Instances of this class are passed to Expression.analyze(AnalyzeContextInfo) during the analysis phase of the query.


Constructor Summary
AnalyzeContextInfo()
           
AnalyzeContextInfo(AnalyzeContextInfo other)
          Create a new object as a clone of other.
AnalyzeContextInfo(Expression parent, int flags)
          Create a new AnalyzeContextInfo using the given parent and flags.
AnalyzeContextInfo(XQueryContext context)
           
 
Method Summary
 void addFlag(int flag)
           
 XQueryContext getContext()
           
 int getContextId()
          Returns the current context id.
 Expression getContextStep()
           
 int getFlags()
          Returns the processing flags.
 Expression getParent()
          Returns the parent of the current expression.
 int getStaticReturnType()
           
 int getStaticType()
           
 void removeFlag(int flag)
           
 void setContextId(int contextId)
           
 void setContextStep(Expression step)
           
 void setFlags(int flags)
          Sets the processing flags to be passed to a child expression.
 void setParent(Expression parent)
           
 void setStaticReturnType(int type)
           
 void setStaticType(int staticType)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnalyzeContextInfo

public AnalyzeContextInfo()

AnalyzeContextInfo

public AnalyzeContextInfo(Expression parent,
                          int flags)
Create a new AnalyzeContextInfo using the given parent and flags.

Parameters:
parent - the parent expression which calls this method
flags - int value containing a set of flags. See the constants defined in this class.

AnalyzeContextInfo

public AnalyzeContextInfo(AnalyzeContextInfo other)
Create a new object as a clone of other.

Parameters:
other -

AnalyzeContextInfo

public AnalyzeContextInfo(XQueryContext context)
Method Detail

getContext

public XQueryContext getContext()

getContextId

public int getContextId()
Returns the current context id. The context id is used to keep track of the context node set within a predicate expression or where-clause. The id identifies the ancestor expression to which the context applies.

Returns:
current context id.

setContextId

public void setContextId(int contextId)

getFlags

public int getFlags()
Returns the processing flags. Every expression may pass execution hints to its child expressions, encoded as bit flags.

Returns:
processing flags

setFlags

public void setFlags(int flags)
Sets the processing flags to be passed to a child expression.

Parameters:
flags -

addFlag

public void addFlag(int flag)

removeFlag

public void removeFlag(int flag)

getParent

public Expression getParent()
Returns the parent of the current expression.


setParent

public void setParent(Expression parent)

getStaticType

public int getStaticType()

setStaticType

public void setStaticType(int staticType)

getStaticReturnType

public int getStaticReturnType()

setStaticReturnType

public void setStaticReturnType(int type)

setContextStep

public void setContextStep(Expression step)

getContextStep

public Expression getContextStep()

toString

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