org.exist.xquery
Interface ExternalModule

All Superinterfaces:
Module
All Known Implementing Classes:
ExternalModuleImpl

public interface ExternalModule
extends Module

An external library module implemented in XQuery and loaded through the "import module" directive.

Author:
Wolfgang Meier (wolfgang@exist-db.org)

Method Summary
 void declareFunction(UserDefinedFunction func)
          Declare a new function.
 void declareVariable(QName qname, VariableDeclaration decl)
           
 UserDefinedFunction getFunction(QName qname, int arity)
          Try to find the function identified by qname.
 Source getSource()
          Get the source object this module has been read from.
 boolean moduleIsValid()
          Is this module still valid or should it be reloaded from its source?
 void setContext(XQueryContext context)
          Set the XQueryContext of this module.
 void setSource(Source source)
          Set the source object this module has been read from.
 
Methods inherited from interface org.exist.xquery.Module
declareVariable, declareVariable, getDefaultPrefix, getDescription, getNamespaceURI, getSignaturesForFunction, isInternalModule, isVarDeclared, listFunctions, reset, resolveVariable
 

Method Detail

declareFunction

void declareFunction(UserDefinedFunction func)
Declare a new function. Called by the XQuery compiler when parsing a library module for every function declaration.

Parameters:
func -

getFunction

UserDefinedFunction getFunction(QName qname,
                                int arity)
Try to find the function identified by qname. Returns null if the function is undefined.

Parameters:
qname -

declareVariable

void declareVariable(QName qname,
                     VariableDeclaration decl)
                     throws XPathException
Throws:
XPathException

getSource

Source getSource()
Get the source object this module has been read from. This is required for query access control.

Returns:
The source object this module has been read from.

setSource

void setSource(Source source)
Set the source object this module has been read from. This is required to check the validity of a compiled expression.

Parameters:
source -

setContext

void setContext(XQueryContext context)
Set the XQueryContext of this module. This will be a sub-context of the main context as parts of the static context are shared.

Parameters:
context -

moduleIsValid

boolean moduleIsValid()
Is this module still valid or should it be reloaded from its source?



Copyright (C) Wolfgang Meier. All rights reserved.