public ColumnMetadataOld( String column, int sqlType, String sqlTypeName, boolean isNullable, GeometryType geomType, CoordinateDimension dim, ICRS crs, String srid ) { this.column = column; this.sqlType = sqlType; this.sqlTypeName = sqlTypeName; this.isNullable = isNullable; this.geomType = geomType; this.geometryParams = new GeometryStorageParams( crs, srid, dim ); } }
/** * Returns the {@link MappedAppSchema} derived from configuration / tables. * * @return mapped application schema, never <code>null</code> */ public MappedAppSchema getMappedSchema() { FeatureType[] fts = ftNameToFt.values().toArray( new FeatureType[ftNameToFt.size()] ); FeatureTypeMapping[] ftMappings = ftNameToMapping.values().toArray( new FeatureTypeMapping[ftNameToMapping.size()] ); Map<FeatureType, FeatureType> ftToSuperFt = null; Map<String, String> prefixToNs = null; GMLSchemaInfoSet xsModel = null; // TODO GeometryStorageParams geometryParams = new GeometryStorageParams( CRSManager.getCRSRef( "EPSG:4326" ), dialect.getUndefinedSrid(), CoordinateDimension.DIM_2 ); return new MappedAppSchema( fts, ftToSuperFt, prefixToNs, xsModel, ftMappings, null, null, geometryParams, deleteCascadingByDB, null, null, null ); }
/** * Returns the {@link MappedAppSchema} derived from configuration / tables. * * @return mapped application schema, never <code>null</code> */ @Override public MappedAppSchema getMappedSchema() { FeatureType[] fts = ftNameToFt.values().toArray( new FeatureType[ftNameToFt.size()] ); FeatureTypeMapping[] ftMappings = ftNameToMapping.values().toArray( new FeatureTypeMapping[ftNameToMapping.size()] ); Map<FeatureType, FeatureType> ftToSuperFt = null; Map<String, String> prefixToNs = null; GMLSchemaInfoSet xsModel = null; // TODO GeometryStorageParams geometryParams = new GeometryStorageParams( CRSManager.getCRSRef( "EPSG:4326" ), dialect.getUndefinedSrid(), CoordinateDimension.DIM_2 ); return new MappedAppSchema( fts, ftToSuperFt, prefixToNs, xsModel, ftMappings, null, null, geometryParams, deleteCascadingByDB, null, null, null ); }
ValueReference path = new ValueReference( ptName ); ICRS crs = deriveCrs( md.srid ); GeometryStorageParams geomStorageParams = new GeometryStorageParams( crs, md.srid, md.dim ); GeometryMapping mapping = new GeometryMapping( path, true, dbField, md.geomType, geomStorageParams, null );
@Override public PropertyNameMapping getMapping( ValueReference propName, TableAliasManager aliasManager ) throws FilterEvaluationException, UnmappableException { GeometryStorageParams geometryParams = new GeometryStorageParams( blobMapping.getCRS(), undefinedSrid, CoordinateDimension.DIM_2 ); GeometryMapping bboxMapping = new GeometryMapping( null, false, new DBField( blobMapping.getBBoxColumn() ), GeometryType.GEOMETRY, geometryParams, null ); return new PropertyNameMapping( getGeometryConverter( bboxMapping ), null, blobMapping.getBBoxColumn(), aliasManager.getRootTableAlias() ); }
/** * Creates a new {@link SQLFeatureStoreTransaction} instance. * * @param store * corresponding feature store instance, must not be <code>null</code> * @param conn * JDBC connection associated with the transaction, must not be <code>null</code> and have * <code>autocommit</code> set to <code>false</code> * @param schema * application schema with mapping information, must not be <code>null</code> * @param inspectors * feature inspectors, must not be <code>null</code> */ SQLFeatureStoreTransaction( SQLFeatureStore store, Connection conn, MappedAppSchema schema, List<FeatureInspector> inspectors ) { this.fs = store; this.conn = conn; this.schema = schema; this.inspectors = inspectors; blobMapping = schema.getBlobMapping(); if ( blobMapping != null ) { DBField bboxColumn = new DBField( blobMapping.getBBoxColumn() ); GeometryStorageParams geometryParams = new GeometryStorageParams( blobMapping.getCRS(), null, DIM_2 ); GeometryMapping blobGeomMapping = new GeometryMapping( null, true, bboxColumn, GeometryType.GEOMETRY, geometryParams, null ); blobGeomConverter = fs.getGeometryConverter( blobGeomMapping ); } this.bboxTracker = new BBoxTracker(); }
public MappedSchemaBuilderGML( String configURL, List<String> gmlSchemas, StorageCRS storageCRS, List<NamespaceHint> nsHints, BLOBMapping blobConf, List<FeatureTypeMappingJAXB> ftMappingConfs, boolean deleteCascadingByDB ) throws FeatureStoreException { gmlSchema = buildGMLSchema( configURL, gmlSchemas ); CRSRef crs = CRSManager.getCRSRef( storageCRS.getValue() ); CoordinateDimension dim = crs.getDimension() == 3 ? DIM_3 : DIM_2; geometryParams = new GeometryStorageParams( crs, storageCRS.getSrid(), dim ); // add namespace bindings addNamespaceBindings( configURL, gmlSchema, nsHints ); schemaWalker = new XPathSchemaWalker( gmlSchema, nsBindings ); if ( blobConf != null ) { Pair<BlobMapping, BBoxTableMapping> pair = buildBlobMapping( blobConf, gmlSchema.getGMLSchema().getVersion() ); blobMapping = pair.first; bboxMapping = pair.second; } if ( ftMappingConfs != null ) { for ( FeatureTypeMappingJAXB ftMappingConf : ftMappingConfs ) { org.deegree.feature.persistence.sql.FeatureTypeMapping ftMapping = buildFtMapping( ftMappingConf ); ftNameToMapping.put( ftMapping.getFeatureType(), ftMapping ); } } this.deleteCascadingByDB = deleteCascadingByDB; }
m = new GeometryMapping( path, minOccurs == 0, mapping, type, new GeometryStorageParams( crs, srid, dim ), jc ); } else {
m = new GeometryMapping( path, minOccurs == 0, mapping, type, new GeometryStorageParams( crs, srid, dim ), jc ); } else {