|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.commons.xml.schema.XSModelAnalyzer
public class XSModelAnalyzer
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.
GMLSchemaAnalyzer| Field Summary | |
|---|---|
protected org.apache.xerces.xs.XSModel |
xmlSchema
The XML schema infoset. |
| Constructor Summary | |
|---|---|
XSModelAnalyzer(String... schemaUrls)
Creates a new XSModelAnalyzer instance that reads the schema documents from the given URLs. |
|
XSModelAnalyzer(org.apache.xerces.xs.XSModel xmlSchema)
Creates a new XSModelAnalyzer for the given (Xerces) XML schema infoset. |
|
| Method Summary | |
|---|---|
org.apache.xerces.xs.XSNamespaceItemList |
getNamespaces()
|
List<org.apache.xerces.xs.XSElementDeclaration> |
getSubstitutions(QName elementName,
String namespace,
boolean transitive,
boolean onlyConcrete)
Returns the declarations of all elements that are substitutable for a given element name. |
List<org.apache.xerces.xs.XSElementDeclaration> |
getSubstitutions(org.apache.xerces.xs.XSElementDeclaration elementDecl,
String namespace,
boolean transitive,
boolean onlyConcrete)
Returns the declarations of all elements that are substitutable for a given element declaration. |
org.apache.xerces.xs.XSModel |
getXSModel()
Returns the XML schema infoset (represented as a Xerces XSModel). |
static org.apache.xerces.xs.XSModel |
loadModel(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 XSModelAnalyzer(org.apache.xerces.xs.XSModel xmlSchema)
XSModelAnalyzer for the given (Xerces) XML schema infoset.
xmlSchema - schema infoset, must not be null
public XSModelAnalyzer(String... schemaUrls)
throws ClassCastException,
ClassNotFoundException,
InstantiationException,
IllegalAccessException
XSModelAnalyzer 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
ClassCastException
ClassNotFoundException
InstantiationException
IllegalAccessException| Method Detail |
|---|
public org.apache.xerces.xs.XSNamespaceItemList getNamespaces()
public org.apache.xerces.xs.XSModel getXSModel()
XSModel).
public List<org.apache.xerces.xs.XSElementDeclaration> getSubstitutions(org.apache.xerces.xs.XSElementDeclaration elementDecl,
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 one) are includedonlyConcrete - if true, only concrete (non-abstract) declarations are returned
public List<org.apache.xerces.xs.XSElementDeclaration> getSubstitutions(QName elementName,
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(String... schemaUrls)
throws ClassCastException,
ClassNotFoundException,
InstantiationException,
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
ClassCastException
ClassNotFoundException
InstantiationException
IllegalAccessException
|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||