|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.query.QueryModule
public abstract class QueryModule
The XQuery import module
statement can be used to import XQuery modules
as well as Java instances, which will be treated as modules. Any class with a public,
empty constructor can be imported as module.
If a class extends the QueryModule
class, it inherits the context
variable, which provides access to all properties of the current query. E.g., it
provides access to the current context item
or the
static context
of a query. Next, the following default
properties of functions can be changed via annotations:
ADMIN
permissions.
You may annotate a function with QueryModule.Requires
(QueryModule.Permission
) to
also make it accessible to users with less privileges.QueryModule.Deterministic
if you know that it will have no side-effects and will
always yield the same result.context
, it should be annotated as
QueryModule.ContextDependent
.QueryModule.FocusDependent
.Please visit our documentation to find more details on Packaging, Java Bindings and User Management. The XQuery 3.0 specification gives more insight into function properties.
Nested Class Summary | |
---|---|
static interface |
QueryModule.ContextDependent
Java code is treated as "context-independent". |
static interface |
QueryModule.Deterministic
Java code is treated as "non-deterministic", as its behavior cannot be predicted from the XQuery processor. |
static interface |
QueryModule.FocusDependent
Java code is treated as "focus-independent". |
static class |
QueryModule.Permission
Permission required to call a function. |
static interface |
QueryModule.Requires
Java functions can only be executed by users with ADMIN permissions. |
Field Summary | |
---|---|
QueryContext |
context
Query context. |
Constructor Summary | |
---|---|
QueryModule()
|
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public QueryContext context
Constructor Detail |
---|
public QueryModule()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |