public interface OXQEntityLoader
Each OXQConnection
instance maintains one or two entity loaders depending on its configuration:
Their properties are as follows:
Property | Connection-scoped | Expression-scoped |
---|---|---|
Availability | Always | Only when the connection is created from a data source with the flag OXQDataSource.IMPORT_SHARING set to "true" |
Accessing loaded modules/schemas from XQuery | Implicitly available, no need to import in the query prolog | Must be explicitly imported by query prolog |
Supports unloading schemas/modules with the unload() method |
No | Yes |
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.String> |
list(OXQEntityKind entityKind)
Returns the set of target namespaces of all entities of the given kind currently loaded into this context.
|
void |
load(OXQEntityKind entityKind, java.lang.String namespaceURI, java.lang.String... locations)
Loads the specified entity (module or schema) into the corresponding context.
|
void |
unload(OXQEntityKind entityKind, java.lang.String namespaceURI)
Removes the loaded entity (module/schema) and transitively all other entities that depend on it.
|
void load(OXQEntityKind entityKind, java.lang.String namespaceURI, java.lang.String... locations) throws XQException
OXQEntityResolver
associated with the connection and then parsed and loaded into memory.entityKind
- OXQEntityKind.MODULE
or OXQEntityKind.SCHEMA
namespaceURI
- target namespacelocations
- locations where an entity could be foundXQException
- if namespaceURI
is not absolute, if entity was not found or couldn't be loaded for any reason, or if entityKind
is not OXQEntityKind.MODULE
or OXQEntityKind.SCHEMA
void unload(OXQEntityKind entityKind, java.lang.String namespaceURI) throws XQException
entityKind
- OXQEntityKind.MODULE
or OXQEntityKind.SCHEMA
namespaceURI
- namespace URI of the entityXQException
- namespaceURI is not absolute or if entityKind
is not OXQEntityKind.MODULE
or OXQEntityKind.SCHEMA
java.lang.UnsupportedOperationException
- if context of this loader doesn't support removal operation for this entity kindjava.util.Set<java.lang.String> list(OXQEntityKind entityKind) throws XQException
entityKind
- OXQEntityKind.MODULE
or OXQEntityKind.SCHEMA
XQException
- if entityKind
is not OXQEntityKind.MODULE
or OXQEntityKind.SCHEMA