org.deegree.feature.persistence.mapping
Class MappedApplicationSchema

java.lang.Object
  extended by org.deegree.feature.types.ApplicationSchema
      extended by org.deegree.feature.persistence.mapping.MappedApplicationSchema

public class MappedApplicationSchema
extends ApplicationSchema

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

Version:
$Revision: 27796 $, $Date: 2010-11-04 16:44:48 +0100 (Do, 04. Nov 2010) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

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

Constructor Detail

MappedApplicationSchema

public MappedApplicationSchema(FeatureType[] fts,
                               java.util.Map<FeatureType,FeatureType> ftToSuperFt,
                               java.util.Map<java.lang.String,java.lang.String> prefixToNs,
                               GMLSchemaInfoSet xsModel,
                               FeatureTypeMapping[] ftMappings,
                               CRS storageSRS,
                               BBoxTableMapping bboxMapping,
                               BlobMapping blobMapping)
Creates a new MappedApplicationSchema 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 XML schema, may be null
ftMappings - relational mapping information for the feature types, can be null (for BLOB-only mappings)
storageSRS - CRS used for storing geometries (BLOB mode), must not be null
bboxMapping - BBOX mapping parameters, may be null (for relational-only mappings)
blobMapping - BLOB mapping parameters, may be null (for relational-only mappings)
Throws:
java.lang.IllegalArgumentException - if a feature type cannot be resolved (i.e. it is referenced in a property type, but not defined)
Method Detail

getMappings

public java.util.Map<javax.xml.namespace.QName,FeatureTypeMapping> getMappings()
Returns all relational feature type mappings.

Returns:
relational mappings, never null

getMapping

public FeatureTypeMapping getMapping(javax.xml.namespace.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(javax.xml.namespace.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 javax.xml.namespace.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)

getStorageCRS

public CRS getStorageCRS()
Returns the CRS used for storing geometries in the backend.

Returns:
the storage CRS, never null

getIdLookupTable

public java.lang.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(java.lang.String featureOrGeomId)
                     throws java.lang.IllegalArgumentException
Returns an analysis of the given feature or geometry id.

Parameters:
featureOrGeomId -
Returns:
Throws:
java.lang.IllegalArgumentException - if the id does not denote a feature or geometry id


Copyright © 2011. All Rights Reserved.