|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.commons.xml.schema.XMLSchemaInfoSet
public class XMLSchemaInfoSet
Provides convenient methods to retrieve "relevant" element and type declarations of an XML schema infoset.
This functionality is very handy for extracting higher-level structures defined using XML schema, such as GML feature types.
GMLSchemaInfoSet| Field Summary | |
|---|---|
protected org.apache.xerces.xs.XSModel |
xmlSchema
The XML schema infoset. |
| Constructor Summary | |
|---|---|
XMLSchemaInfoSet(java.lang.String... schemaUrls)
Creates a new XMLSchemaInfoSet instance that reads the schema documents from the given URLs. |
|
XMLSchemaInfoSet(org.apache.xerces.xs.XSModel xmlSchema)
Creates a new XSModelAnalyzer for the given (Xerces) XML schema infoset. |
|
| Method Summary | |
|---|---|
java.util.List<java.lang.String> |
getComponentLocations(java.lang.String namespace)
Returns the locations of all schema files that contributed to the given namespace. |
java.util.Map<java.lang.String,java.lang.String> |
getNamespacePrefixes()
Returns the prefix to namespace bindings used in the original XML schema documents. |
org.apache.xerces.xs.XSNamespaceItemList |
getNamespaces()
|
java.util.Set<java.lang.String> |
getSchemaNamespaces()
Returns all namespaces that participate in this infoset. |
java.util.List<org.apache.xerces.xs.XSElementDeclaration> |
getSubstitutions(javax.xml.namespace.QName elementName,
java.lang.String namespace,
boolean transitive,
boolean onlyConcrete)
Returns the declarations of all elements that are substitutable for a given element name. |
java.util.List<org.apache.xerces.xs.XSElementDeclaration> |
getSubstitutions(org.apache.xerces.xs.XSElementDeclaration elementDecl,
java.lang.String namespace,
boolean transitive,
boolean onlyConcrete)
Returns the declarations of all elements that are substitutable for a given element declaration. |
java.util.List<org.apache.xerces.xs.XSTypeDefinition> |
getSubtypes(org.apache.xerces.xs.XSTypeDefinition typeDef,
java.lang.String namespace,
boolean transitive,
boolean onlyConcrete)
Returns the subtypes for the given type definition. |
org.apache.xerces.xs.XSModel |
getXSModel()
Returns the XML schema infoset (represented as a Xerces XSModel). |
static org.apache.xerces.xs.XSModel |
loadModel(java.lang.String... schemaUrls)
Creates a Xerces XSModel from the schemas at the given URLs, using the RedirectingEntityResolver,
so OGC schemas URLs are redirected to a local copy. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.xerces.xs.XSModel xmlSchema
| Constructor Detail |
|---|
public XMLSchemaInfoSet(org.apache.xerces.xs.XSModel xmlSchema)
XSModelAnalyzer for the given (Xerces) XML schema infoset.
xmlSchema - schema infoset, must not be null
public XMLSchemaInfoSet(java.lang.String... schemaUrls)
throws java.lang.ClassCastException,
java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.IllegalAccessException
XMLSchemaInfoSet instance that reads the schema documents from the given URLs.
schemaUrls - locations of the schema documents, must not be null and contain at least one entry
java.lang.ClassCastException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException| Method Detail |
|---|
public java.util.Set<java.lang.String> getSchemaNamespaces()
nullpublic java.util.Map<java.lang.String,java.lang.String> getNamespacePrefixes()
null (but does not necessarily bindings for all
namespaces)public java.util.List<java.lang.String> getComponentLocations(java.lang.String namespace)
namespace - namespace, must not be null
null if the namespace does not belong to the schemapublic org.apache.xerces.xs.XSNamespaceItemList getNamespaces()
public org.apache.xerces.xs.XSModel getXSModel()
XSModel).
public java.util.List<org.apache.xerces.xs.XSElementDeclaration> getSubstitutions(org.apache.xerces.xs.XSElementDeclaration elementDecl,
java.lang.String namespace,
boolean transitive,
boolean onlyConcrete)
elementDecl - element declaration, must not be nullnamespace - only element declarations in this namespace are returned, set to null for all namespacestransitive - if true, also substitutions for substitutions (and so on) are includedonlyConcrete - if true, only concrete (non-abstract) declarations are returned
public java.util.List<org.apache.xerces.xs.XSTypeDefinition> getSubtypes(org.apache.xerces.xs.XSTypeDefinition typeDef,
java.lang.String namespace,
boolean transitive,
boolean onlyConcrete)
typeDef - type definition, must not be nullnamespace - only type definitions in this namespace are returned, set to null for all namespacestransitive - if true, also subtypes of subtypes (and so on) are includedonlyConcrete - if true, only concrete (non-abstract) definitions are returned
public java.util.List<org.apache.xerces.xs.XSElementDeclaration> getSubstitutions(javax.xml.namespace.QName elementName,
java.lang.String namespace,
boolean transitive,
boolean onlyConcrete)
elementName - qualified name of the element, must not be nullnamespace - only element declarations in this namespace are returned, set to null for all namespacestransitive - if true, also substitutions for substitutions (and so one) are includedonlyConcrete - if true, only concrete (non-abstract) declarations are returned
public static org.apache.xerces.xs.XSModel loadModel(java.lang.String... schemaUrls)
throws java.lang.ClassCastException,
java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.IllegalAccessException
XSModel from the schemas at the given URLs, using the RedirectingEntityResolver,
so OGC schemas URLs are redirected to a local copy.
schemaUrls - locations of the schema documents, must not be null and contain at least one entry
null
java.lang.ClassCastException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||