|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exist.xquery.AbstractInternalModule
Abstract base class for an InternalModule.
Functions are defined in an array of FunctionDef, which
is passed to the constructor. A single implementation class
can be registered for more than one function signature, given that the signatures differ
in name or the number of expected arguments. It is thus possible to implement
similar XQuery functions in one single class.
| Field Summary | |
protected java.util.TreeMap |
mFunctionMap
|
protected FunctionDef[] |
mFunctions
|
protected java.util.TreeMap |
mGlobalVariables
|
| Fields inherited from interface org.exist.xquery.Module |
REQUEST_FUNCTION_NS, TEXT_FUNCTION_NS, TRANSFORM_FUNCTION_NS, UTIL_FUNCTION_NS, XMLDB_FUNCTION_NS |
| Constructor Summary | |
AbstractInternalModule(FunctionDef[] functions)
|
|
| Method Summary | |
Variable |
declareVariable(QName qname,
java.lang.Object value)
|
Variable |
declareVariable(Variable var)
|
abstract java.lang.String |
getDefaultPrefix()
Returns an optional default prefix (used if no prefix is supplied with the "import module" directive). |
FunctionDef |
getFunctionDef(QName qname,
int arity)
Returns the implementing class for the function identified by qname or null if it is not defined. |
java.util.List |
getFunctionsByName(QName qname)
Returns all functions defined in this module matching the specified qname. |
abstract java.lang.String |
getNamespaceURI()
Returns the namespace URI that uniquely identifies this module. |
java.util.Iterator |
getSignaturesForFunction(QName qname)
Try to find the signature of the function identified by its QName. |
boolean |
isInternalModule()
Is this an internal module? |
boolean |
isVarDeclared(QName qname)
|
FunctionSignature[] |
listFunctions()
Returns the signatures of all functions defined within this module. |
void |
reset()
Reset the module's internal state for being reused. |
Variable |
resolveVariable(QName qname)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.exist.xquery.Module |
getDescription |
| Field Detail |
protected final java.util.TreeMap mFunctionMap
protected FunctionDef[] mFunctions
protected final java.util.TreeMap mGlobalVariables
| Constructor Detail |
public AbstractInternalModule(FunctionDef[] functions)
| Method Detail |
public boolean isInternalModule()
Module
isInternalModule in interface Modulepublic abstract java.lang.String getNamespaceURI()
Module
getNamespaceURI in interface Modulepublic abstract java.lang.String getDefaultPrefix()
Module
getDefaultPrefix in interface Modulepublic FunctionSignature[] listFunctions()
Module
listFunctions in interface Modulepublic java.util.Iterator getSignaturesForFunction(QName qname)
Module
getSignaturesForFunction in interface Moduleqname -
public FunctionDef getFunctionDef(QName qname,
int arity)
InternalModuleFunctionFactory.
getFunctionDef in interface InternalModuleqname -
public java.util.List getFunctionsByName(QName qname)
InternalModule
getFunctionsByName in interface InternalModuleqname -
public Variable declareVariable(QName qname,
java.lang.Object value)
throws XPathException
declareVariable in interface ModuleXPathExceptionpublic Variable declareVariable(Variable var)
declareVariable in interface Module
public Variable resolveVariable(QName qname)
throws XPathException
resolveVariable in interface ModuleXPathExceptionpublic boolean isVarDeclared(QName qname)
isVarDeclared in interface Modulepublic void reset()
Module
reset in interface Module
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||