|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exist.xquery.XQueryContext
org.exist.xquery.ModuleContext
public class ModuleContext
Subclass of XQueryContext for
imported modules.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
ModuleContext(XQueryContext parentContext,
java.lang.String modulePrefix,
java.lang.String moduleNamespace,
java.lang.String location)
|
|
| Method Summary | |
|---|---|
void |
addDynamicOption(java.lang.String qnameString,
java.lang.String contents)
for dynamic run-time options i.e. |
protected void |
clearUpdateListeners()
|
XQueryContext |
copyContext()
|
void |
declareInScopeNamespace(java.lang.String prefix,
java.lang.String uri)
Declare an in-scope namespace. |
LocalVariable |
declareVariableBinding(LocalVariable var)
Declare a local variable. |
void |
expressionEnd(Expression expr)
|
void |
expressionStart(Expression expr)
|
java.util.Iterator<Module> |
getAllModules()
|
AnyURIValue |
getBaseURI()
Get the base URI of the evaluation context. |
javax.xml.datatype.XMLGregorianCalendar |
getCalendar()
|
int |
getCurrentStackSize()
Returns the current size of the stack. |
DebuggeeJoint |
getDebuggeeJoint()
|
MemTreeBuilder |
getDocumentBuilder()
Get the document builder currently used for creating temporary document fragments. |
MemTreeBuilder |
getDocumentBuilder(boolean explicitCreation)
|
java.util.Map<QName,Variable> |
getGlobalVariables()
|
java.lang.String |
getInheritedNamespace(java.lang.String prefix)
|
java.lang.String |
getInheritedPrefix(java.lang.String uri)
|
java.lang.String |
getInScopeNamespace(java.lang.String prefix)
|
java.lang.String |
getInScopePrefix(java.lang.String uri)
|
java.util.Map<QName,Variable> |
getLocalVariables()
|
Module |
getModule(java.lang.String namespaceURI)
Get the built-in module registered for the given namespace URI. |
java.lang.String |
getPrefixForURI(java.lang.String uri)
First checks the parent context for in-scope namespaces, then the module's static context. |
Profiler |
getProfiler()
Returns the Profiler instance of this context if profiling is enabled. |
XQueryContext |
getRootContext()
|
Module |
getRootModule(java.lang.String namespaceURI)
|
java.util.Iterator<Module> |
getRootModules()
Get root modules |
DocumentSet |
getStaticallyKnownDocuments()
Get statically known documents |
java.lang.String |
getURIForPrefix(java.lang.String prefix)
First checks the parent context for in-scope namespaces, then the module's static context. |
java.util.Map<QName,Variable> |
getVariables()
|
XQueryWatchDog |
getWatchDog()
|
java.lang.Object |
getXQueryContextVar(java.lang.String name)
Delegate to parent context |
boolean |
hasParent()
Returns true if this context has a parent context (means it is a module context). |
boolean |
isDebugMode()
|
Module |
loadBuiltInModule(java.lang.String namespaceURI,
java.lang.String moduleClass)
Overwritten method: the module will be loaded by the parent context, but we need to declare its namespace in the module context. |
LocalVariable |
markLocalVariables(boolean newContext)
Returns the last variable on the local variable stack. |
void |
popDocumentContext()
|
void |
popInScopeNamespaces()
|
void |
popLocalVariables(LocalVariable var)
Restore the local variable stack to the position marked by variable var. |
void |
pushDocumentContext()
Push any document fragment created within the current execution context on the stack. |
void |
pushInScopeNamespaces()
|
void |
pushInScopeNamespaces(boolean inherit)
Push all in-scope namespace declarations onto the stack. |
void |
registerUpdateListener(UpdateListener listener)
|
protected Variable |
resolveLocalVariable(QName qname)
|
Variable |
resolveVariable(QName qname)
Try to resolve a variable. |
void |
saveState()
Before a dynamic import, make sure relevant parts of the current context a saved to the stack. |
void |
setBaseURI(AnyURIValue uri)
Set the base URI for the evaluation context. |
void |
setModule(java.lang.String namespaceURI,
Module module)
|
void |
setParentContext(XQueryContext parentContext)
|
protected void |
setRootModule(java.lang.String namespaceURI,
Module module)
|
void |
setXQueryContextVar(java.lang.String name,
java.lang.Object XQvar)
Delegate to parent context |
void |
stackEnter(Expression expr)
|
void |
stackLeave(Expression expr)
|
void |
updateContext(XQueryContext from)
Update the current dynamic context using the properties of another context. |
void |
updateModuleRefs(XQueryContext rootContext)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ModuleContext(XQueryContext parentContext,
java.lang.String modulePrefix,
java.lang.String moduleNamespace,
java.lang.String location)
parentContext - | Method Detail |
|---|
public void setParentContext(XQueryContext parentContext)
public void setModule(java.lang.String namespaceURI,
Module module)
setModule in interface ContextsetModule in class XQueryContextpublic boolean hasParent()
XQueryContext
hasParent in interface ContexthasParent in class XQueryContextpublic XQueryContext getRootContext()
getRootContext in interface ContextgetRootContext in class XQueryContextpublic void updateContext(XQueryContext from)
XQueryContextEval.
updateContext in interface ContextupdateContext in class XQueryContextpublic XQueryContext copyContext()
copyContext in interface ContextcopyContext in class XQueryContext
public void addDynamicOption(java.lang.String qnameString,
java.lang.String contents)
throws XPathException
XQueryContext
addDynamicOption in interface ContextaddDynamicOption in class XQueryContextXPathException
public DocumentSet getStaticallyKnownDocuments()
throws XPathException
XQueryContext
getStaticallyKnownDocuments in interface ContextgetStaticallyKnownDocuments in class XQueryContextXPathExceptionpublic Module getModule(java.lang.String namespaceURI)
XQueryContext
getModule in interface ContextgetModule in class XQueryContext
protected void setRootModule(java.lang.String namespaceURI,
Module module)
setRootModule in class XQueryContextpublic java.util.Iterator<Module> getRootModules()
XQueryContext
getRootModules in interface ContextgetRootModules in class XQueryContextpublic java.util.Iterator<Module> getAllModules()
getAllModules in interface ContextgetAllModules in class XQueryContextpublic Module getRootModule(java.lang.String namespaceURI)
getRootModule in interface ContextgetRootModule in class XQueryContext
public Module loadBuiltInModule(java.lang.String namespaceURI,
java.lang.String moduleClass)
loadBuiltInModule in interface ContextloadBuiltInModule in class XQueryContextpublic void updateModuleRefs(XQueryContext rootContext)
public XQueryWatchDog getWatchDog()
getWatchDog in interface ContextgetWatchDog in class XQueryContextpublic Profiler getProfiler()
XQueryContextProfiler instance of this context if profiling is enabled.
getProfiler in interface ContextgetProfiler in class XQueryContextpublic javax.xml.datatype.XMLGregorianCalendar getCalendar()
getCalendar in interface ContextgetCalendar in class XQueryContext
public AnyURIValue getBaseURI()
throws XPathException
XQueryContextThis is the URI returned by the fn:base-uri() function.
getBaseURI in interface ContextgetBaseURI in class XQueryContextXPathException - if an error occurspublic void setBaseURI(AnyURIValue uri)
XQueryContextThis is the URI returned by the fn:base-uri() function.
setBaseURI in interface ContextsetBaseURI in class XQueryContext
public void setXQueryContextVar(java.lang.String name,
java.lang.Object XQvar)
setXQueryContextVar in interface ContextsetXQueryContextVar in class XQueryContextname - The variable nameXQvar - The variable value, may be of any xs: typeXQueryContext.setXQueryContextVar(String, Object)public java.lang.Object getXQueryContextVar(java.lang.String name)
getXQueryContextVar in interface ContextgetXQueryContextVar in class XQueryContextname - The variable name
XQueryContext.getXQueryContextVar(String)public MemTreeBuilder getDocumentBuilder()
XQueryContext
getDocumentBuilder in interface ContextgetDocumentBuilder in class XQueryContextpublic MemTreeBuilder getDocumentBuilder(boolean explicitCreation)
getDocumentBuilder in interface ContextgetDocumentBuilder in class XQueryContextpublic void pushDocumentContext()
XQueryContext
pushDocumentContext in interface ContextpushDocumentContext in class XQueryContextpublic LocalVariable markLocalVariables(boolean newContext)
XQueryContextXQueryContext.popLocalVariables(LocalVariable).
markLocalVariables in interface ContextmarkLocalVariables in class XQueryContextpublic void popLocalVariables(LocalVariable var)
XQueryContext
popLocalVariables in interface ContextpopLocalVariables in class XQueryContext
public LocalVariable declareVariableBinding(LocalVariable var)
throws XPathException
XQueryContext
declareVariableBinding in interface ContextdeclareVariableBinding in class XQueryContextXPathException
protected Variable resolveLocalVariable(QName qname)
throws XPathException
resolveLocalVariable in class XQueryContextXPathException
public Variable resolveVariable(QName qname)
throws XPathException
resolveVariable in interface ContextresolveVariable in class XQueryContextqname - the qualified name of the variable
XPathException - if the variable is unknownpublic java.util.Map<QName,Variable> getVariables()
getVariables in interface ContextgetVariables in class XQueryContextpublic java.util.Map<QName,Variable> getLocalVariables()
getLocalVariables in interface ContextgetLocalVariables in class XQueryContextpublic java.util.Map<QName,Variable> getGlobalVariables()
getGlobalVariables in interface ContextgetGlobalVariables in class XQueryContextpublic int getCurrentStackSize()
XQueryContext
getCurrentStackSize in interface ContextgetCurrentStackSize in class XQueryContextpublic void popDocumentContext()
popDocumentContext in interface ContextpopDocumentContext in class XQueryContextpublic java.lang.String getURIForPrefix(java.lang.String prefix)
getURIForPrefix in interface ContextgetURIForPrefix in class XQueryContextprefix - the prefix to look up
public java.lang.String getPrefixForURI(java.lang.String uri)
getPrefixForURI in interface ContextgetPrefixForURI in class XQueryContexturi - the URI to look up
public java.lang.String getInScopeNamespace(java.lang.String prefix)
getInScopeNamespace in interface ContextgetInScopeNamespace in class XQueryContextpublic java.lang.String getInScopePrefix(java.lang.String uri)
getInScopePrefix in interface ContextgetInScopePrefix in class XQueryContextpublic java.lang.String getInheritedNamespace(java.lang.String prefix)
getInheritedNamespace in interface ContextgetInheritedNamespace in class XQueryContextpublic java.lang.String getInheritedPrefix(java.lang.String uri)
getInheritedPrefix in interface ContextgetInheritedPrefix in class XQueryContext
public void declareInScopeNamespace(java.lang.String prefix,
java.lang.String uri)
XQueryContext
declareInScopeNamespace in interface ContextdeclareInScopeNamespace in class XQueryContextpublic void pushInScopeNamespaces(boolean inherit)
XQueryContext
pushInScopeNamespaces in interface ContextpushInScopeNamespaces in class XQueryContextpublic void pushInScopeNamespaces()
pushInScopeNamespaces in interface ContextpushInScopeNamespaces in class XQueryContextpublic void popInScopeNamespaces()
popInScopeNamespaces in interface ContextpopInScopeNamespaces in class XQueryContextpublic void registerUpdateListener(UpdateListener listener)
registerUpdateListener in interface ContextregisterUpdateListener in class XQueryContextprotected void clearUpdateListeners()
clearUpdateListeners in class XQueryContextpublic DebuggeeJoint getDebuggeeJoint()
getDebuggeeJoint in interface ContextgetDebuggeeJoint in class XQueryContextpublic boolean isDebugMode()
isDebugMode in interface ContextisDebugMode in class XQueryContext
public void expressionStart(Expression expr)
throws TerminatedException
expressionStart in interface ContextexpressionStart in class XQueryContextTerminatedExceptionpublic void expressionEnd(Expression expr)
expressionEnd in interface ContextexpressionEnd in class XQueryContext
public void stackEnter(Expression expr)
throws TerminatedException
stackEnter in interface ContextstackEnter in class XQueryContextTerminatedExceptionpublic void stackLeave(Expression expr)
stackLeave in interface ContextstackLeave in class XQueryContextpublic void saveState()
XQueryContextXQueryContext.reset().
saveState in class XQueryContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||