|
|||||||
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,
String modulePrefix,
String moduleNamespace,
String location)
|
Method Summary | |
---|---|
void |
addDynamicOption(String qnameString,
String contents)
for dynamic run-time options i.e. |
XQueryContext |
copyContext()
|
void |
declareInScopeNamespace(String prefix,
String uri)
Declare an in-scope namespace. |
LocalVariable |
declareVariableBinding(LocalVariable var)
Declare a local variable. |
void |
expressionEnd(Expression expr)
|
void |
expressionStart(Expression expr)
|
Iterator |
getAllModules()
|
AnyURIValue |
getBaseURI()
Get the base URI of the evaluation context. |
DBBroker |
getBroker()
Get the DBBroker instance used for the current query. |
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)
|
String |
getInheritedNamespace(String prefix)
|
String |
getInheritedPrefix(String uri)
|
String |
getInScopeNamespace(String prefix)
|
String |
getInScopePrefix(String uri)
|
Module |
getModule(String namespaceURI)
Get the built-in module registered for the given namespace URI. |
String |
getPrefixForURI(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(String namespaceURI)
|
Iterator |
getRootModules()
|
DocumentSet |
getStaticallyKnownDocuments()
|
String |
getURIForPrefix(String prefix)
First checks the parent context for in-scope namespaces, then the module's static context. |
Map<QName,Variable> |
getVariables()
|
XQueryWatchDog |
getWatchDog()
|
Object |
getXQueryContextVar(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(String namespaceURI,
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)
|
Variable |
resolveVariable(QName qname)
Try to resolve a variable. |
void |
setBaseURI(AnyURIValue uri)
Set the base URI for the evaluation context. |
void |
setModule(String namespaceURI,
Module module)
|
void |
setParentContext(XQueryContext parentContext)
|
void |
setXQueryContextVar(String name,
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 |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModuleContext(XQueryContext parentContext, String modulePrefix, String moduleNamespace, String location)
parentContext
- Method Detail |
---|
public void setParentContext(XQueryContext parentContext)
public void setModule(String namespaceURI, Module module)
setModule
in class XQueryContext
public boolean hasParent()
XQueryContext
hasParent
in class XQueryContext
public XQueryContext getRootContext()
getRootContext
in class XQueryContext
public void updateContext(XQueryContext from)
XQueryContext
Eval
.
updateContext
in class XQueryContext
public XQueryContext copyContext()
copyContext
in class XQueryContext
public void addDynamicOption(String qnameString, String contents) throws XPathException
XQueryContext
addDynamicOption
in class XQueryContext
XPathException
public DocumentSet getStaticallyKnownDocuments() throws XPathException
getStaticallyKnownDocuments
in class XQueryContext
XPathException
public Module getModule(String namespaceURI)
XQueryContext
getModule
in class XQueryContext
public Iterator getRootModules()
getRootModules
in class XQueryContext
public Iterator getAllModules()
getAllModules
in class XQueryContext
public Module getRootModule(String namespaceURI)
getRootModule
in class XQueryContext
public Module loadBuiltInModule(String namespaceURI, String moduleClass)
loadBuiltInModule
in class XQueryContext
public void updateModuleRefs(XQueryContext rootContext)
public XQueryWatchDog getWatchDog()
getWatchDog
in class XQueryContext
public Profiler getProfiler()
XQueryContext
Profiler
instance of this context
if profiling is enabled.
getProfiler
in class XQueryContext
public XMLGregorianCalendar getCalendar()
getCalendar
in class XQueryContext
public AnyURIValue getBaseURI() throws XPathException
XQueryContext
getBaseURI
in class XQueryContext
XPathException
- if an error occurspublic void setBaseURI(AnyURIValue uri)
XQueryContext
setBaseURI
in class XQueryContext
public void setXQueryContextVar(String name, Object XQvar)
setXQueryContextVar
in class XQueryContext
name
- The variable nameXQvar
- The variable value, may be of any xs: typeXQueryContext.setXQueryContextVar(String, Object)
public Object getXQueryContextVar(String name)
getXQueryContextVar
in class XQueryContext
name
- The variable name
XQueryContext.getXQueryContextVar(String)
public DBBroker getBroker()
XQueryContext
getBroker
in class XQueryContext
public MemTreeBuilder getDocumentBuilder()
XQueryContext
getDocumentBuilder
in class XQueryContext
public MemTreeBuilder getDocumentBuilder(boolean explicitCreation)
getDocumentBuilder
in class XQueryContext
public void pushDocumentContext()
XQueryContext
pushDocumentContext
in class XQueryContext
public LocalVariable markLocalVariables(boolean newContext)
XQueryContext
XQueryContext.popLocalVariables(LocalVariable)
.
markLocalVariables
in class XQueryContext
public void popLocalVariables(LocalVariable var)
XQueryContext
popLocalVariables
in class XQueryContext
public LocalVariable declareVariableBinding(LocalVariable var) throws XPathException
XQueryContext
declareVariableBinding
in class XQueryContext
XPathException
public Variable resolveVariable(QName qname) throws XPathException
resolveVariable
in class XQueryContext
qname
- the qualified name of the variable
XPathException
- if the variable is unknownpublic Map<QName,Variable> getVariables()
getVariables
in class XQueryContext
public int getCurrentStackSize()
XQueryContext
getCurrentStackSize
in class XQueryContext
public void popDocumentContext()
popDocumentContext
in class XQueryContext
public String getURIForPrefix(String prefix)
getURIForPrefix
in class XQueryContext
prefix
- the prefix to look up
public String getPrefixForURI(String uri)
getPrefixForURI
in class XQueryContext
uri
- the URI to look up
public String getInScopeNamespace(String prefix)
getInScopeNamespace
in class XQueryContext
public String getInScopePrefix(String uri)
getInScopePrefix
in class XQueryContext
public String getInheritedNamespace(String prefix)
getInheritedNamespace
in class XQueryContext
public String getInheritedPrefix(String uri)
getInheritedPrefix
in class XQueryContext
public void declareInScopeNamespace(String prefix, String uri)
XQueryContext
declareInScopeNamespace
in class XQueryContext
public void pushInScopeNamespaces(boolean inherit)
XQueryContext
pushInScopeNamespaces
in class XQueryContext
public void pushInScopeNamespaces()
pushInScopeNamespaces
in class XQueryContext
public void popInScopeNamespaces()
popInScopeNamespaces
in class XQueryContext
public void registerUpdateListener(UpdateListener listener)
registerUpdateListener
in class XQueryContext
public DebuggeeJoint getDebuggeeJoint()
getDebuggeeJoint
in class XQueryContext
public boolean isDebugMode()
isDebugMode
in class XQueryContext
public void expressionStart(Expression expr) throws TerminatedException
expressionStart
in class XQueryContext
TerminatedException
public void expressionEnd(Expression expr)
expressionEnd
in class XQueryContext
public void stackEnter(Expression expr) throws TerminatedException
stackEnter
in class XQueryContext
TerminatedException
public void stackLeave(Expression expr)
stackLeave
in class XQueryContext
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |