|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.document.schema.SchemaReferences
public final class SchemaReferences
Manages list of Schema
s, one for each namespace URI, for a
single document. Thread-safe. Class is not intended for subclassing nor
instantiating by clients.
Method Summary | |
---|---|
ISchema |
getSchema(String namespaceURI)
For given namespace URI returns appropriate Schema object,
that validates elements with this namespace URI. |
SchemaAvailabilityEnum |
getSchemaAvailability(String namespaceURI)
Determines availability of schema for the namespace. |
ISchema |
getSchemaNull(String namespaceURI)
For given namespace URI returns appropriate Schema object,
that validates elements with this namespace URI. |
void |
loadSchema(String namespaceURI)
Loads schema for given namespace. |
void |
loadSchemata(Collection<String> namespaces)
Loads schemas for all given namespaces. |
void |
preserve(Set<? extends String> namespaces)
Preserves only the schemas contained in the given set, but unregisters all other schemas. |
void |
unloadSchema(String namespaceURI)
Removes the schema from the reference. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public ISchema getSchema(String namespaceURI)
For given namespace URI returns appropriate Schema
object,
that validates elements with this namespace URI.
If no local Schema for given URI exists for given document, then try to get appropriate global Schema (it won't attempt to load the schema if not present).
namespaceURI
- namespace URI.
IllegalStateException
- if Schema with given URI cannot be found.public ISchema getSchemaNull(String namespaceURI)
For given namespace URI returns appropriate Schema
object,
that validates elements with this namespace URI.
If no local Schema for given URI exists for given document, then try to get appropriate global Schema (it won't attempt to load the schema if not present).
namespaceURI
- namespace URI.
null
if no such schema has been loaded.public void loadSchemata(Collection<String> namespaces) throws SchemaException, IOException
namespaces
- collection of String
namespaces.
SchemaException
- if error happens during loading of schemas.
IOException
- if i/o error occurs during the schema files
deserialization.public void unloadSchema(String namespaceURI)
namespaceURI
- the namespace.public void loadSchema(String namespaceURI) throws SchemaException, IOException
namespaceURI
- the namespace
SchemaException
- if error happens during loading of schemas.
IOException
- if i/o error occurs during the schema files
deserialization.public SchemaAvailabilityEnum getSchemaAvailability(String namespaceURI)
namespaceURI
- the namespace to check
public void preserve(Set<? extends String> namespaces)
namespaces
- set of namespaces that shall be preserved.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |