|
|||||||
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. |
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 XQueryContext
public void updateContext(XQueryContext from)
XQueryContext
Eval
.
updateContext
in class XQueryContext
public XQueryContext copyContext()
copyContext
in class XQueryContext
public DocumentSet getStaticallyKnownDocuments() throws XPathException
getStaticallyKnownDocuments
in class XQueryContext
XPathException
public Module getModule(String namespaceURI)
XQueryContext
getModule
in class XQueryContext
public Module loadBuiltInModule(String namespaceURI, String moduleClass)
loadBuiltInModule
in class XQueryContext
public Iterator getModules()
getModules
in class XQueryContext
public XQueryWatchDog getWatchDog()
getWatchDog
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 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 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()
XQueryContext
pushInScopeNamespaces
in class XQueryContext
public void popInScopeNamespaces()
popInScopeNamespaces
in class XQueryContext
public void registerUpdateListener(UpdateListener listener)
registerUpdateListener
in class XQueryContext
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |