|
deegree 2.3 (2010/04/09 10:10 build-4-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.framework.xml.schema.XMLSchema
org.deegree.model.feature.schema.GMLSchema
public class GMLSchema
Represents a GML application schema document to provide easy access to it's components,
especially the FeatureType definitions.
| Field Summary | |
|---|---|
protected Map<QualifiedName,FeatureType> |
featureTypeMap
|
protected Map<FeatureType,List<FeatureType>> |
substitutionMap
|
| Constructor Summary | |
|---|---|
protected |
GMLSchema(ElementDeclaration[] elementDeclarations,
URI targetNamespace,
SimpleTypeDeclaration[] simpleTypes,
ComplexTypeDeclaration[] complexTypes)
|
|
GMLSchema(URI targetNamespace,
SimpleTypeDeclaration[] simpleTypes,
ComplexTypeDeclaration[] complexTypes,
ElementDeclaration[] elementDeclarations)
Creates a new GMLSchema instance from the given parameters. |
| Method Summary | |
|---|---|
protected FeatureType |
buildFeatureType(ElementDeclaration element)
|
protected void |
buildFeatureTypeMap(ElementDeclaration[] elementDeclarations)
Initializes the internal feature type map which is used to lookup feature types by name. |
protected PropertyType |
buildPropertyType(ElementDeclaration element)
|
protected void |
buildSubstitutionMap(ElementDeclaration[] elementDeclarations)
Initializes the internal feature type substitution map which is used to lookup substitutions for feature types. |
protected int |
determinePropertyType(ElementDeclaration element)
Heuristic method that tries to determine the type of GML property that is defined in an XSD element declaration. |
FeatureType |
getFeatureType(QualifiedName qName)
Looks up the FeatureType with the given QualifiedName. |
FeatureType |
getFeatureType(String localName)
Looks up the FeatureType with the given local name. |
FeatureType[] |
getFeatureTypes()
Returns all FeatureTypes that are defined in the schema. |
Set<FeatureType> |
getSubstitutables(FeatureType substitution)
Returns all types (abstract or concrete) that are substitutable by the given type. |
FeatureType[] |
getSubstitutions(FeatureType featureType)
Returns all non-abstract implementations of a given feature type that are defined in this schema. |
boolean |
hasSeveralImplementations(FeatureType ft)
Return whether the given feature type has more than one concrete substitution. |
boolean |
isValidSubstitution(FeatureType ft,
FeatureType substitution)
Returns whether the specified feature type is a valid substitution for the other specified feature type (according to the schema). |
String |
toString()
Returns a string representation of the object. |
| Methods inherited from class org.deegree.framework.xml.schema.XMLSchema |
|---|
getComplexTypeDeclaration, getComplexTypeDeclaration, getComplexTypeDeclarations, getElementDeclaration, getElementDeclaration, getElementDeclarations, getSimpleTypeDeclaration, getSimpleTypeDeclaration, getSimpleTypeDeclarations, getTargetNamespace, getTypeDeclaration, getTypeDeclaration |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Map<QualifiedName,FeatureType> featureTypeMap
protected Map<FeatureType,List<FeatureType>> substitutionMap
| Constructor Detail |
|---|
public GMLSchema(URI targetNamespace,
SimpleTypeDeclaration[] simpleTypes,
ComplexTypeDeclaration[] complexTypes,
ElementDeclaration[] elementDeclarations)
throws XMLParsingException,
UnknownCRSException
GMLSchema instance from the given parameters.
targetNamespace - simpleTypes - complexTypes - elementDeclarations -
XMLParsingException
UnknownCRSException
protected GMLSchema(ElementDeclaration[] elementDeclarations,
URI targetNamespace,
SimpleTypeDeclaration[] simpleTypes,
ComplexTypeDeclaration[] complexTypes)
throws XMLSchemaException
XMLSchemaException| Method Detail |
|---|
public FeatureType[] getFeatureTypes()
FeatureTypes that are defined in the schema.
public FeatureType getFeatureType(QualifiedName qName)
FeatureType with the given QualifiedName.
qName - the QualifiedName to look up
public FeatureType getFeatureType(String localName)
FeatureType with the given local name.
localName - the name to look up
public boolean hasSeveralImplementations(FeatureType ft)
Read as: Is there only one concrete feature type that all instances of this type must have? Or are there several possible concrete subtypes?
ft - feature type to check
public FeatureType[] getSubstitutions(FeatureType featureType)
featureType -
public boolean isValidSubstitution(FeatureType ft,
FeatureType substitution)
ft - substitution -
public Set<FeatureType> getSubstitutables(FeatureType substitution)
substitution -
substitution
protected void buildFeatureTypeMap(ElementDeclaration[] elementDeclarations)
throws XMLParsingException,
UnknownCRSException
elementDeclarations - element declarations to process, only element declarations that are substitutable
for "gml:_Feature" are considered
XMLParsingException
UnknownCRSExceptionprotected void buildSubstitutionMap(ElementDeclaration[] elementDeclarations)
NOTE: As this method relies on the feature type map, #initializeFeatureTypeMap(ElementDeclaration[]) must have been executed before.
elementDeclarations - element declarations of the feature types to processbuildFeatureTypeMap(ElementDeclaration[])
protected FeatureType buildFeatureType(ElementDeclaration element)
throws XMLParsingException,
UnknownCRSException
XMLParsingException
UnknownCRSException
protected PropertyType buildPropertyType(ElementDeclaration element)
throws XMLSchemaException
XMLSchemaException
protected final int determinePropertyType(ElementDeclaration element)
throws UndefinedXSDTypeException
element - ElementDeclaration that is a GML property definition
Types
UndefinedXSDTypeExceptionTypespublic String toString()
toString in class XMLSchema
|
deegree 2.3 (2010/04/09 10:10 build-4-official) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org