org.deegree.feature.persistence.sql
Class MappedAppSchema

java.lang.Object
  extended by org.deegree.feature.types.GenericAppSchema
      extended by org.deegree.feature.persistence.sql.MappedAppSchema
All Implemented Interfaces:
AppSchema

public class MappedAppSchema
extends GenericAppSchema

An AppSchema augmented with relational and / or BLOB mapping information.

Version:
$Revision: 31572 $, $Date: 2011-08-18 11:11:21 +0200 (Thu, 18 Aug 2011) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Constructor Summary
MappedAppSchema(FeatureType[] fts, Map<FeatureType,FeatureType> ftToSuperFt, Map<String,String> prefixToNs, GMLSchemaInfoSet xsModel, FeatureTypeMapping[] ftMappings, BBoxTableMapping bboxMapping, BlobMapping blobMapping, GeometryStorageParams geometryParams)
          Creates a new MappedAppSchema from the given parameters.
 
Method Summary
 IdAnalysis analyzeId(String featureOrGeomId)
          Returns an analysis of the given feature or geometry id.
 BBoxTableMapping getBBoxMapping()
           
 BlobMapping getBlobMapping()
          Returns the BLOB mapping parameters.
 short getFtId(QName ftName)
          Returns the id of the specified (non-abstract) feature type.
 FeatureTypeMapping getFtMapping(QName ftName)
          Returns the relational mapping for the specified feature type.
 Map<QName,FeatureTypeMapping> getFtMappings()
          Returns all relational feature type mappings.
 QName getFtName(short ftId)
          Returns the name of the (non-abstract) feature type with the given id.
 short getFts()
           
 GeometryStorageParams getGeometryParams()
          Returns the parameters used for storing geometries in the backend.
 String getIdLookupTable()
          Returns the name of the global id lookup table (that allows the lookup of features / geometries by id).
 
Methods inherited from class org.deegree.feature.types.GenericAppSchema
getAllowedChildElementDecls, getAppNamespaces, getConcreteSubtypes, getCustomElDecl, getDirectSubtypes, getFeatureType, getFeatureTypes, getFeatureTypes, getFtToSuperFt, getGMLSchema, getNamespaceBindings, getNamespacesDependencies, getNewPropertyDecls, getParent, getRootFeatureTypes, getSubtypes, isSubType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappedAppSchema

public MappedAppSchema(FeatureType[] fts,
                       Map<FeatureType,FeatureType> ftToSuperFt,
                       Map<String,String> prefixToNs,
                       GMLSchemaInfoSet xsModel,
                       FeatureTypeMapping[] ftMappings,
                       BBoxTableMapping bboxMapping,
                       BlobMapping blobMapping,
                       GeometryStorageParams geometryParams)
Creates a new MappedAppSchema from the given parameters.

Parameters:
fts - all application feature types (abstract and non-abstract), this must not include the GML base feature types (e.g. gml:_Feature or gml:FeatureCollection), must not be null
ftToSuperFt - key: feature type A, value: feature type B (A extends B), this must not include any GML base feature types (e.g. gml:_Feature or gml:FeatureCollection), can be null
prefixToNs - preferred namespace prefixes to use, key: prefix, value: namespace, may be null
xsModel - the underlying GML schema infoset, may be null
ftMappings - relational mapping information for feature types, can be null (for BLOB-only mappings)
bboxMapping - BBOX mapping parameters, may be null (for relational-only mappings)
blobMapping - BLOB mapping parameters, may be null (for relational-only mappings)
Throws:
IllegalArgumentException - if a feature type cannot be resolved (i.e. it is referenced in a property type, but not defined)
Method Detail

getFtMappings

public Map<QName,FeatureTypeMapping> getFtMappings()
Returns all relational feature type mappings.

Returns:
relational mappings, never null

getFtMapping

public FeatureTypeMapping getFtMapping(QName ftName)
Returns the relational mapping for the specified feature type.

Parameters:
ftName - name of the feature type, must not be null
Returns:
the corresponding mapping, may be null (if the feature type does not have a relational mapping)

getFtId

public short getFtId(QName ftName)
Returns the id of the specified (non-abstract) feature type.

Parameters:
ftName - name of the feature type, must denote a non-abstract feature type that's part of the schema and not null
Returns:
id of the feature type

getFtName

public QName getFtName(short ftId)
Returns the name of the (non-abstract) feature type with the given id.

Parameters:
ftId - id of the feature type
Returns:
name of the feature type, denotes a non-abstract feature type that's part of the schema

getFts

public short getFts()
Returns:

getBBoxMapping

public BBoxTableMapping getBBoxMapping()

getBlobMapping

public BlobMapping getBlobMapping()
Returns the BLOB mapping parameters.

Returns:
the BLOB mapping parameters, may be null (for RELATIONAL-only mappings)

getGeometryParams

public GeometryStorageParams getGeometryParams()
Returns the parameters used for storing geometries in the backend.

Returns:
the storage parameters, never null

getIdLookupTable

public String getIdLookupTable()
Returns the name of the global id lookup table (that allows the lookup of features / geometries by id).

Returns:
the name of the lookup table, can be null (no global lookup table, only per feature type)

analyzeId

public IdAnalysis analyzeId(String featureOrGeomId)
                     throws IllegalArgumentException
Returns an analysis of the given feature or geometry id.

Parameters:
featureOrGeomId - id to be analyzed, must not be null
Returns:
id analysis, never null
Throws:
IllegalArgumentException - if the id does not denote a feature or geometry id


Copyright © 2011. All Rights Reserved.