org.deegree.gml.schema
Class GMLSchemaInfoSet

java.lang.Object
  extended by org.deegree.commons.xml.schema.XMLSchemaInfoSet
      extended by org.deegree.gml.schema.GMLSchemaInfoSet

public class GMLSchemaInfoSet
extends XMLSchemaInfoSet

Provides access to the object element declarations of a GML schema (both application and GML core schema objects).

An element declaration is an object element declaration, if it is in one or more of GML's object substitution groups. In the latest version of GML (3.2.1), eight (?) classes of GML objects exist:

Version:
$Revision:$, $Date:$
Author:
Markus Schneider , last edited by: $Author:$

Field Summary
 
Fields inherited from class org.deegree.commons.xml.schema.XMLSchemaInfoSet
xsModel
 
Constructor Summary
GMLSchemaInfoSet(GMLVersion gmlVersion, LSInput... inputs)
          Creates a new GMLSchemaInfoSet instance for the given GML version and using the specified inputs.
GMLSchemaInfoSet(GMLVersion version, String... schemaUrls)
          Creates a new GMLSchemaInfoSet instance for the given GML version and using the specified schemas.
 
Method Summary
static GMLVersion determineGMLVersion(XMLSchemaInfoSet xmlSchemaInfoSet)
          Determines the GML version of the given XMLSchemaInfoSet heuristically.
 org.apache.xerces.xs.XSElementDeclaration getAbstractCurveSegmentElementDeclaration()
          Returns the element declaration of the abstract curve segment element, i.e.
 org.apache.xerces.xs.XSElementDeclaration getAbstractFeatureElementDeclaration()
          Returns the element declaration of the abstract feature element, i.e.
 org.apache.xerces.xs.XSElementDeclaration getAbstractGeometryElementDeclaration()
          Returns the element declaration of the abstract geometry element, i.e.
 org.apache.xerces.xs.XSElementDeclaration getAbstractGMLElementDeclaration()
          Returns the element declaration of the abstract GML element, i.e.
 org.apache.xerces.xs.XSElementDeclaration getAbstractObjectElementDeclaration()
          Returns the element declaration of the abstract object element, i.e.
 org.apache.xerces.xs.XSElementDeclaration getAbstractSurfacePatchElementDeclaration()
          Returns the element declaration of the abstract surface patch element, i.e.
 SortedSet<String> getAppNamespaces()
          Returns all application namespaces that participate in this infoset.
 List<org.apache.xerces.xs.XSElementDeclaration> getCoverageElementDeclarations(String namespace, boolean onlyConcrete)
           
 List<org.apache.xerces.xs.XSElementDeclaration> getCRSElementDeclarations(String namespace, boolean onlyConcrete)
           
 List<org.apache.xerces.xs.XSElementDeclaration> getFeatureCollectionElementDeclarations(String namespace, boolean onlyConcrete)
           
 List<org.apache.xerces.xs.XSElementDeclaration> getFeatureElementDeclarations(String namespace, boolean onlyConcrete)
           
 List<org.apache.xerces.xs.XSTypeDefinition> getFeatureTypeDefinitions(String namespace, boolean onlyConcrete)
           
 org.apache.xerces.xs.XSElementDeclaration getGeometryElement(QName elName)
           
 List<org.apache.xerces.xs.XSElementDeclaration> getGeometryElementDeclarations(String namespace, boolean onlyConcrete)
           
 List<org.apache.xerces.xs.XSElementDeclaration> getGmlElementDeclarations(String namespace, boolean onlyConcrete)
           
 ObjectPropertyType getGMLPropertyDecl(org.apache.xerces.xs.XSElementDeclaration elDecl, QName ptName, int minOccurs, int maxOccurs, List<PropertyType> ptSubstitutions)
          Checks the given element declaration and returns a ObjectPropertyType if it defines a GML object property or GML reference property.
 List<org.apache.xerces.xs.XSElementDeclaration> getObjectElementDeclarations(String namespace, boolean onlyConcrete)
           
 List<org.apache.xerces.xs.XSElementDeclaration> getStyleElementDeclarations(String namespace, boolean onlyConcrete)
           
 List<org.apache.xerces.xs.XSElementDeclaration> getTimeObjectElementDeclarations(String namespace, boolean onlyConcrete)
           
 List<org.apache.xerces.xs.XSElementDeclaration> getTopologyElementDeclarations(String namespace, boolean onlyConcrete)
           
 List<org.apache.xerces.xs.XSElementDeclaration> getValueElementDeclarations(String namespace, boolean onlyConcrete)
           
 GMLVersion getVersion()
          Returns the GML version used for the infoset.
static boolean isGMLNamespace(String ns)
          Returns whether the given namespace is a GML core namespace.
 
Methods inherited from class org.deegree.commons.xml.schema.XMLSchemaInfoSet
getComponentLocations, getElementDecl, getElementDecl, getNamespacePrefixes, getNamespaces, getSchemaNamespaces, getSubstitutions, getSubstitutions, getSubtypes, getTypeDef, getTypeDef, getXSModel, loadModel, loadModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GMLSchemaInfoSet

public GMLSchemaInfoSet(GMLVersion version,
                        String... schemaUrls)
                 throws ClassCastException,
                        ClassNotFoundException,
                        InstantiationException,
                        IllegalAccessException
Creates a new GMLSchemaInfoSet instance for the given GML version and using the specified schemas.

Parameters:
version - gml version of the schema files, can be null (auto-detect GML version)
schemaUrls - URLs of the schema files to load, must not be null
Throws:
ClassCastException
ClassNotFoundException
InstantiationException
IllegalAccessException

GMLSchemaInfoSet

public GMLSchemaInfoSet(GMLVersion gmlVersion,
                        LSInput... inputs)
                 throws ClassCastException,
                        ClassNotFoundException,
                        InstantiationException,
                        IllegalAccessException
Creates a new GMLSchemaInfoSet instance for the given GML version and using the specified inputs.

Parameters:
version - gml version of the schema files, can be null (auto-detect GML version)
inputs - input objects forthe schema files to load, must not be null
Throws:
ClassCastException
ClassNotFoundException
InstantiationException
IllegalAccessException
Method Detail

determineGMLVersion

public static GMLVersion determineGMLVersion(XMLSchemaInfoSet xmlSchemaInfoSet)
                                      throws IllegalArgumentException
Determines the GML version of the given XMLSchemaInfoSet heuristically.

Parameters:
xmlSchemaInfoSet - XML schema, must not be null
Returns:
gml version, never null
Throws:
IllegalArgumentException - if the GML version cannot be determined

getVersion

public GMLVersion getVersion()
Returns the GML version used for the infoset.

Returns:
the GML version used for the infoset, never null

isGMLNamespace

public static boolean isGMLNamespace(String ns)
Returns whether the given namespace is a GML core namespace.

Parameters:
ns - namespace to check, may be null
Returns:
true, if it is a GML core namespace, false otherwise

getAppNamespaces

public SortedSet<String> getAppNamespaces()
Returns all application namespaces that participate in this infoset.

This excludes all namespaces that are imported by the GML core schemas.

Returns:
all application namespaces, never null

getAbstractObjectElementDeclaration

public org.apache.xerces.xs.XSElementDeclaration getAbstractObjectElementDeclaration()
Returns the element declaration of the abstract object element, i.e. {http://www.opengis.net/gml}_Object (GML 3.0 to 3.1) or {http://www.opengis.net/gml/3.2}AbstractObject (GML 3.2).

Returns:
declaration object of the abstract object element, may be null (for GML 2)

getAbstractGMLElementDeclaration

public org.apache.xerces.xs.XSElementDeclaration getAbstractGMLElementDeclaration()
Returns the element declaration of the abstract GML element, i.e. {http://www.opengis.net/gml}_GML (GML 3.0 to 3.1) or {http://www.opengis.net/gml/3.2}AbstractGML (GML 3.2).

Returns:
declaration object of the abstract GML element, may be null (for GML 2)

getAbstractFeatureElementDeclaration

public org.apache.xerces.xs.XSElementDeclaration getAbstractFeatureElementDeclaration()
Returns the element declaration of the abstract feature element, i.e. {http://www.opengis.net/gml}_Feature (GML 2 to 3.1) or {http://www.opengis.net/gml/3.2}AbstractFeature (GML 3.2).

Returns:
declaration object of the abstract feature element

getAbstractGeometryElementDeclaration

public org.apache.xerces.xs.XSElementDeclaration getAbstractGeometryElementDeclaration()
Returns the element declaration of the abstract geometry element, i.e. {http://www.opengis.net/gml}_Geometry (GML 2 to 3.1) or {http://www.opengis.net/gml/3.2}AbstractGeometry (GML 3.2).

Returns:
declaration object of the abstract geometry element

getAbstractCurveSegmentElementDeclaration

public org.apache.xerces.xs.XSElementDeclaration getAbstractCurveSegmentElementDeclaration()
Returns the element declaration of the abstract curve segment element, i.e. {http://www.opengis.net/gml}_CurveSegment (GML 3 to 3.1) or {http://www.opengis.net/gml/3.2}AbstractCurveSegment (GML 3.2).

Returns:
declaration object of the abstract curve segment element, may be null (for GML 2)

getAbstractSurfacePatchElementDeclaration

public org.apache.xerces.xs.XSElementDeclaration getAbstractSurfacePatchElementDeclaration()
Returns the element declaration of the abstract surface patch element, i.e. {http://www.opengis.net/gml}_SurfacePatch (GML 3 to 3.1) or {http://www.opengis.net/gml/3.2}AbstractSurfacePatch (GML 3.2).

Returns:
element declaration object of the abstract geometry element, may be null (for GML 2)

getObjectElementDeclarations

public List<org.apache.xerces.xs.XSElementDeclaration> getObjectElementDeclarations(String namespace,
                                                                                    boolean onlyConcrete)

getGmlElementDeclarations

public List<org.apache.xerces.xs.XSElementDeclaration> getGmlElementDeclarations(String namespace,
                                                                                 boolean onlyConcrete)

getFeatureElementDeclarations

public List<org.apache.xerces.xs.XSElementDeclaration> getFeatureElementDeclarations(String namespace,
                                                                                     boolean onlyConcrete)

getFeatureTypeDefinitions

public List<org.apache.xerces.xs.XSTypeDefinition> getFeatureTypeDefinitions(String namespace,
                                                                             boolean onlyConcrete)

getFeatureCollectionElementDeclarations

public List<org.apache.xerces.xs.XSElementDeclaration> getFeatureCollectionElementDeclarations(String namespace,
                                                                                               boolean onlyConcrete)

getGeometryElementDeclarations

public List<org.apache.xerces.xs.XSElementDeclaration> getGeometryElementDeclarations(String namespace,
                                                                                      boolean onlyConcrete)

getValueElementDeclarations

public List<org.apache.xerces.xs.XSElementDeclaration> getValueElementDeclarations(String namespace,
                                                                                   boolean onlyConcrete)

getTopologyElementDeclarations

public List<org.apache.xerces.xs.XSElementDeclaration> getTopologyElementDeclarations(String namespace,
                                                                                      boolean onlyConcrete)

getCRSElementDeclarations

public List<org.apache.xerces.xs.XSElementDeclaration> getCRSElementDeclarations(String namespace,
                                                                                 boolean onlyConcrete)

getTimeObjectElementDeclarations

public List<org.apache.xerces.xs.XSElementDeclaration> getTimeObjectElementDeclarations(String namespace,
                                                                                        boolean onlyConcrete)

getCoverageElementDeclarations

public List<org.apache.xerces.xs.XSElementDeclaration> getCoverageElementDeclarations(String namespace,
                                                                                      boolean onlyConcrete)

getStyleElementDeclarations

public List<org.apache.xerces.xs.XSElementDeclaration> getStyleElementDeclarations(String namespace,
                                                                                   boolean onlyConcrete)

getGeometryElement

public org.apache.xerces.xs.XSElementDeclaration getGeometryElement(QName elName)

getGMLPropertyDecl

public ObjectPropertyType getGMLPropertyDecl(org.apache.xerces.xs.XSElementDeclaration elDecl,
                                             QName ptName,
                                             int minOccurs,
                                             int maxOccurs,
                                             List<PropertyType> ptSubstitutions)
Checks the given element declaration and returns a ObjectPropertyType if it defines a GML object property or GML reference property.

Parameters:
elDecl -
ptName -
minOccurs -
maxOccurs -
ptSubstitutions -
Returns:
corresponding ObjectPropertyType or null if it's not a GML object property


Copyright © 2011. All Rights Reserved.