|
|||||||
| 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)
|
|
| Method Summary | |
|---|---|
XQueryContext |
copyContext()
|
void |
declareInScopeNamespace(String prefix,
String uri)
Declare an in-scope namespace. |
LocalVariable |
declareVariableBinding(LocalVariable var)
Declare a local variable. |
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. |
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. |
Iterator |
getModules()
|
String |
getPrefixForURI(String uri)
First checks the parent context for in-scope namespaces, then the module's static context. |
DocumentSet |
getStaticallyKnownDocuments()
|
String |
getURIForPrefix(String prefix)
First checks the parent context for in-scope namespaces, then the module's static context. |
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). |
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()
Push all in-scope namespace declarations onto the stack. |
void |
registerUpdateListener(UpdateListener listener)
|
void |
setBaseURI(AnyURIValue uri)
Set the base URI for the evaluation context. |
void |
setXQueryContextVar(String name,
Object XQvar)
Delegate to parent context |
void |
updateContext(XQueryContext from)
Update the current dynamic context using the properties of another context. |
| 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)
parentContext - | Method Detail |
|---|
public boolean hasParent()
XQueryContext
hasParent in class XQueryContextpublic void updateContext(XQueryContext from)
XQueryContextEval.
updateContext in class XQueryContextpublic XQueryContext copyContext()
copyContext in class XQueryContext
public DocumentSet getStaticallyKnownDocuments()
throws XPathException
getStaticallyKnownDocuments in class XQueryContextXPathExceptionpublic Module getModule(String namespaceURI)
XQueryContext
getModule in class XQueryContext
public Module loadBuiltInModule(String namespaceURI,
String moduleClass)
loadBuiltInModule in class XQueryContextpublic Iterator getModules()
getModules in class XQueryContextpublic XQueryWatchDog getWatchDog()
getWatchDog in class XQueryContextpublic XMLGregorianCalendar getCalendar()
getCalendar in class XQueryContext
public AnyURIValue getBaseURI()
throws XPathException
XQueryContext
getBaseURI in class XQueryContextXPathException - if an error occurspublic void setBaseURI(AnyURIValue uri)
XQueryContext
setBaseURI in class XQueryContext
public void setXQueryContextVar(String name,
Object XQvar)
setXQueryContextVar in class XQueryContextname - The variable nameXQvar - The variable value, may be of any xs: typeXQueryContext.setXQueryContextVar(String, Object)public Object getXQueryContextVar(String name)
getXQueryContextVar in class XQueryContextname - The variable name
XQueryContext.getXQueryContextVar(String)public DBBroker getBroker()
XQueryContext
getBroker in class XQueryContextpublic MemTreeBuilder getDocumentBuilder()
XQueryContext
getDocumentBuilder in class XQueryContextpublic MemTreeBuilder getDocumentBuilder(boolean explicitCreation)
getDocumentBuilder in class XQueryContextpublic void pushDocumentContext()
XQueryContext
pushDocumentContext in class XQueryContextpublic LocalVariable markLocalVariables(boolean newContext)
XQueryContextXQueryContext.popLocalVariables(LocalVariable).
markLocalVariables in class XQueryContextpublic void popLocalVariables(LocalVariable var)
XQueryContext
popLocalVariables in class XQueryContext
public LocalVariable declareVariableBinding(LocalVariable var)
throws XPathException
XQueryContext
declareVariableBinding in class XQueryContextXPathExceptionpublic int getCurrentStackSize()
XQueryContext
getCurrentStackSize in class XQueryContextpublic void popDocumentContext()
popDocumentContext in class XQueryContextpublic String getURIForPrefix(String prefix)
getURIForPrefix in class XQueryContextprefix - the prefix to look up
public String getPrefixForURI(String uri)
getPrefixForURI in class XQueryContexturi - the URI to look up
public String getInScopeNamespace(String prefix)
getInScopeNamespace in class XQueryContextpublic String getInScopePrefix(String uri)
getInScopePrefix in class XQueryContextpublic String getInheritedNamespace(String prefix)
getInheritedNamespace in class XQueryContextpublic String getInheritedPrefix(String uri)
getInheritedPrefix in class XQueryContext
public void declareInScopeNamespace(String prefix,
String uri)
XQueryContext
declareInScopeNamespace in class XQueryContextpublic void pushInScopeNamespaces()
XQueryContext
pushInScopeNamespaces in class XQueryContextpublic void popInScopeNamespaces()
popInScopeNamespaces in class XQueryContextpublic void registerUpdateListener(UpdateListener listener)
registerUpdateListener in class XQueryContext
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||