|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.uniba.euromath.document.schema.SchemaPool
public final class SchemaPool
Manages list of Schemas, one for each namespace URI. This
object is Singleton; there is at most one instance in application.
Thread-safe.
| Method Summary | |
|---|---|
ISchemaFactory |
getDefaultFactory()
Returns instance of the default schema factory. |
Map<QName,IAttributeRuleP> |
getExportedAttributes(String localNamespace,
IQNameAcceptor qnAcceptor)
Returns Map of all known attributes, exported from foreign namespace, that given acceptor accepts. |
Map<QName,INewElementRuleP> |
getForeignRoots(IQNameAcceptor nameAcceptor)
Returns Map of all known root elements from foreign namespaces, that given acceptor accepts.The function returns roots of loaded schemas only! |
static SchemaPool |
getInstance()
Provides singleton instance. |
Set<String> |
getKnownNamespaces()
Computes and returns set of known namespace URIs for which a schema is loadable. |
Map<QName,INewElementRuleP> |
getRoots(String namespaceUri,
IQNameAcceptor acceptor)
Returns all possible root elements for given namespace. |
ISchema |
getSchema(String namespaceUri)
Returns the global schema with specified namespace. |
ISchema |
getSchemaNull(String namespaceUri)
Returns the global schema with specified namespace. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static SchemaPool getInstance()
public final ISchemaFactory getDefaultFactory()
public ISchema getSchemaNull(String namespaceUri)
null.
namespaceUri - the namespace
null if the
schema is not loaded for the namespace.public ISchema getSchema(String namespaceUri)
namespaceUri - the namespace
IllegalArgumentException is thrown.public Map<QName,INewElementRuleP> getForeignRoots(IQNameAcceptor nameAcceptor)
Returns Map of all known root elements from foreign namespaces, that given acceptor accepts.The function returns roots of loaded schemas only!
nameAcceptor - the QName acceptor.
public Map<QName,INewElementRuleP> getRoots(String namespaceUri,
IQNameAcceptor acceptor)
namespaceUri - the namespace of required document.acceptor - these root elements must be accepted by this acceptor. If
null then all roots are accepted.
INewElementRuleP.
public Map<QName,IAttributeRuleP> getExportedAttributes(String localNamespace,
IQNameAcceptor qnAcceptor)
AttributeRuleP.
localNamespace - selects local namespace. All other namespaces are
foreign. Only attributes from foreign namespaces are put in a result map,
regardless of the acceptor.qnAcceptor - selects qnames that can appear in the result map.
public Set<String> getKnownNamespaces()
null namespace
is represented as an empty string.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||