org.deegree.feature.types
Interface AppSchema

All Known Implementing Classes:
DynamicAppSchema, GenericAppSchema, MappedAppSchema

public interface AppSchema

Defines a number of FeatureTypes and their derivation hierarchy.

Some notes:

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

Method Summary
 Map<QName,org.apache.xerces.xs.XSElementDeclaration> getAllowedChildElementDecls(org.apache.xerces.xs.XSComplexTypeDefinition type)
          Returns the child elements that the given complex type definition allows for.
 Set<String> getAppNamespaces()
          Returns the application namespaces.
 FeatureType[] getConcreteSubtypes(FeatureType ft)
          Retrieves all concrete substitutions for the given feature type.
 ObjectPropertyType getCustomElDecl(org.apache.xerces.xs.XSElementDeclaration elDecl)
          Returns the ObjectPropertyType for the given element declaration (if it defines an object property).
 FeatureType[] getDirectSubtypes(FeatureType ft)
          Retrieves the direct subtypes for the given feature type.
 FeatureType getFeatureType(QName ftName)
          Retrieves the feature type with the given name.
 FeatureType[] getFeatureTypes()
          Returns all feature types that are defined in this application schema.
 List<FeatureType> getFeatureTypes(String namespace, boolean includeCollections, boolean includeAbstracts)
          Returns all feature types that are defined in this application schema, limited by the options.
 Map<FeatureType,FeatureType> getFtToSuperFt()
           
 GMLSchemaInfoSet getGMLSchema()
          Returns the underlying GMLSchemaInfoSet
 Map<String,String> getNamespaceBindings()
          Returns the preferred namespace bindings for all namespaces.
 List<String> getNamespacesDependencies(String ns)
          Returns the namespaces that the definitions in the given namespace depend upon (excluding transitive dependencies).
 List<PropertyType> getNewPropertyDecls(FeatureType ft)
          Returns the PropertyTypes from the specified FeatureType declaration that are *not* present in the parent FeatureType or its ancestors.
 FeatureType getParent(FeatureType ft)
          Retrieves the parent feature type for the specified feature type.
 FeatureType[] getRootFeatureTypes()
          Returns all root feature types that are defined in this application schema.
 FeatureType[] getSubtypes(FeatureType ft)
          Retrieves all substitutions (abstract and non-abstract ones) for the given feature type.
 boolean isSubType(FeatureType ft, FeatureType substitution)
          Determines whether a feature type is substitutable for another feature type.
 

Method Detail

getFeatureTypes

FeatureType[] getFeatureTypes()
Returns all feature types that are defined in this application schema.

Returns:
all feature types, never null

getFeatureTypes

List<FeatureType> getFeatureTypes(String namespace,
                                  boolean includeCollections,
                                  boolean includeAbstracts)
Returns all feature types that are defined in this application schema, limited by the options.

Parameters:
namespace - may be null (include all feature types from all namespaces)
includeCollections - set to true, if feature collection types shall be included, false otherwise
includeAbstracts - set to true, if abstract types shall be included, false otherwise
Returns:
all feature types, never null

getRootFeatureTypes

FeatureType[] getRootFeatureTypes()
Returns all root feature types that are defined in this application schema.

Returns:
all root feature types, never null

getFeatureType

FeatureType getFeatureType(QName ftName)
Retrieves the feature type with the given name.

Parameters:
ftName - feature type name to look up, must not be null
Returns:
the feature type with the given name, or null if no such feature type exists

getDirectSubtypes

FeatureType[] getDirectSubtypes(FeatureType ft)
Retrieves the direct subtypes for the given feature type.

Parameters:
ft - feature type, must not be null
Returns:
the direct subtypes of the given feature type (abstract and non-abstract)

getParent

FeatureType getParent(FeatureType ft)
Retrieves the parent feature type for the specified feature type.

Parameters:
ft - feature type, must not be null
Returns:
parent feature type, can be null

getSubtypes

FeatureType[] getSubtypes(FeatureType ft)
Retrieves all substitutions (abstract and non-abstract ones) for the given feature type.

Parameters:
ft - feature type, must not be null
Returns:
all substitutions for the given feature type, never null

getConcreteSubtypes

FeatureType[] getConcreteSubtypes(FeatureType ft)
Retrieves all concrete substitutions for the given feature type.

Parameters:
ft - feature type, must not be null
Returns:
all concrete substitutions for the given feature type, never null

getGMLSchema

GMLSchemaInfoSet getGMLSchema()
Returns the underlying GMLSchemaInfoSet

Returns:
the underlying GML schema, can be null (not based on a GML schema)

isSubType

boolean isSubType(FeatureType ft,
                  FeatureType substitution)
Determines whether a feature type is substitutable for another feature type.

This is true, iff substitution is either:

Parameters:
ft - base feature type, must be part of this schema
substitution - feature type to be checked, must be part of this schema
Returns:
true, if the second feature type is a valid substitution for the first one

getNewPropertyDecls

List<PropertyType> getNewPropertyDecls(FeatureType ft)
Returns the PropertyTypes from the specified FeatureType declaration that are *not* present in the parent FeatureType or its ancestors.

Parameters:
ft - feature type, must not be null
Returns:
list of property declarations, may be empty, but never null

getFtToSuperFt

Map<FeatureType,FeatureType> getFtToSuperFt()

getNamespaceBindings

Map<String,String> getNamespaceBindings()
Returns the preferred namespace bindings for all namespaces.

Returns:
the preferred namespace bindings for all namespaces, never null

getAllowedChildElementDecls

Map<QName,org.apache.xerces.xs.XSElementDeclaration> getAllowedChildElementDecls(org.apache.xerces.xs.XSComplexTypeDefinition type)
Returns the child elements that the given complex type definition allows for.

TODO: Respect order and cardinality of child elements.

Parameters:
type - complex type definition, must not be null
Returns:
the child elements, never null

getAppNamespaces

Set<String> getAppNamespaces()
Returns the application namespaces.

NOTE: This excludes the GML core namespaces.

Returns:
the application namespaces, never null

getNamespacesDependencies

List<String> getNamespacesDependencies(String ns)
Returns the namespaces that the definitions in the given namespace depend upon (excluding transitive dependencies).

Parameters:
ns - application namespace, must not be null
Returns:
namespace dependencies, may be empty, but never null

getCustomElDecl

ObjectPropertyType getCustomElDecl(org.apache.xerces.xs.XSElementDeclaration elDecl)
Returns the ObjectPropertyType for the given element declaration (if it defines an object property).

Parameters:
elDecl - element declaration, must not be null
Returns:
property declaration or null (if the element does not declare an ObjectPropertyType)


Copyright © 2011. All Rights Reserved.