|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exist.xquery.ExternalModuleImpl
public class ExternalModuleImpl
Default implementation of an ExternalModule.
| Constructor Summary | |
|---|---|
ExternalModuleImpl(java.lang.String namespaceURI,
java.lang.String prefix)
|
|
| Method Summary | |
|---|---|
void |
analyzeGlobalVars()
|
void |
declareFunction(UserDefinedFunction func)
Declare a new function. |
Variable |
declareVariable(QName qname,
java.lang.Object value)
|
void |
declareVariable(QName qname,
VariableDeclaration decl)
|
Variable |
declareVariable(Variable var)
|
XQueryContext |
getContext()
|
java.lang.String |
getDefaultPrefix()
Returns an optional default prefix (used if no prefix is supplied with the "import module" directive). |
java.lang.String |
getDescription()
Return a short description of this module to be displayed to a user. |
UserDefinedFunction |
getFunction(QName qname,
int arity)
Try to find the function identified by qname. |
java.util.Iterator<QName> |
getGlobalVariables()
Returns an iterator over all global variables in this modules, which were either declared with "declare variable" (for external modules) or set in the module implementation (internal modules). |
java.lang.String |
getNamespaceURI()
Returns the namespace URI that uniquely identifies this module. |
java.lang.String |
getReleaseVersion()
Returns the release version in which the module was firstly available. |
Expression |
getRootExpression()
Returns the root expression associated with this context. |
java.util.Iterator<FunctionSignature> |
getSignaturesForFunction(QName qname)
Try to find the signature of the function identified by its QName. |
Source |
getSource()
Get the source object this module has been read from. |
boolean |
isInternalModule()
Is this an internal module? |
boolean |
isReady()
Check if this module has been fully loaded and is ready for use. |
boolean |
isVarDeclared(QName qname)
|
FunctionSignature[] |
listFunctions()
Returns the signatures of all functions defined within this module. |
boolean |
moduleIsValid(DBBroker broker)
Is this module still valid or should it be reloaded from its source? |
void |
reset(XQueryContext xqueryContext)
Reset the module's internal state for being reused. |
Variable |
resolveVariable(QName qname)
|
void |
setContext(XQueryContext context)
Set the XQueryContext of this module. |
void |
setIsReady(boolean ready)
|
void |
setNamespace(java.lang.String prefix,
java.lang.String namespace)
|
protected void |
setRootExpression(Expression expr)
Set the root expression for this context. |
void |
setSource(Source source)
Set the source object this module has been read from. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExternalModuleImpl(java.lang.String namespaceURI,
java.lang.String prefix)
| Method Detail |
|---|
public void setNamespace(java.lang.String prefix,
java.lang.String namespace)
setNamespace in interface ExternalModulepublic void setIsReady(boolean ready)
public boolean isReady()
Module
isReady in interface Modulepublic java.lang.String getDescription()
Module
getDescription in interface Modulepublic java.lang.String getReleaseVersion()
Module
getReleaseVersion in interface Module
public UserDefinedFunction getFunction(QName qname,
int arity)
ExternalModule
getFunction in interface ExternalModulepublic void declareFunction(UserDefinedFunction func)
ExternalModule
declareFunction in interface ExternalModulepublic java.lang.String getNamespaceURI()
Module
getNamespaceURI in interface Modulepublic java.lang.String getDefaultPrefix()
Module
getDefaultPrefix in interface Modulepublic boolean isInternalModule()
Module
isInternalModule in interface Modulepublic FunctionSignature[] listFunctions()
Module
listFunctions in interface Modulepublic java.util.Iterator<FunctionSignature> getSignaturesForFunction(QName qname)
Module
getSignaturesForFunction in interface Modulepublic java.util.Iterator<QName> getGlobalVariables()
Module
getGlobalVariables in interface Module
public Variable declareVariable(QName qname,
java.lang.Object value)
throws XPathException
declareVariable in interface ModuleXPathExceptionpublic Variable declareVariable(Variable var)
declareVariable in interface Module
public void declareVariable(QName qname,
VariableDeclaration decl)
throws XPathException
declareVariable in interface ExternalModuleXPathExceptionpublic boolean isVarDeclared(QName qname)
isVarDeclared in interface Module
public Variable resolveVariable(QName qname)
throws XPathException
resolveVariable in interface ModuleXPathException
public void analyzeGlobalVars()
throws XPathException
analyzeGlobalVars in interface ExternalModuleXPathExceptionpublic Source getSource()
ExternalModule
getSource in interface ExternalModulepublic void setSource(Source source)
ExternalModule
setSource in interface ExternalModulepublic void setContext(XQueryContext context)
ExternalModule
setContext in interface ExternalModulepublic XQueryContext getContext()
getContext in interface ExternalModulepublic boolean moduleIsValid(DBBroker broker)
ExternalModule
moduleIsValid in interface ExternalModulepublic void reset(XQueryContext xqueryContext)
Module
reset in interface Moduleprotected void setRootExpression(Expression expr)
expr - public Expression getRootExpression()
getRootExpression in interface ExternalModule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||