public static MappedAppSchema build( String configURL, SQLFeatureStoreJAXB config, SQLDialect dialect, Workspace workspace ) throws SQLException, FeatureStoreException { boolean deleteCascadingByDB = true; if ( config.getJoinTableDeletePropagation() != null ) { deleteCascadingByDB = config.getJoinTableDeletePropagation().equals( "db" ); } AbstractMappedSchemaBuilder builder = null; if ( config.getGMLSchema() == null || config.getGMLSchema().isEmpty() ) { LOG.debug( "Table-driven mode configuration" ); if ( config.getFeatureType() != null && !config.getFeatureType().isEmpty() ) { builder = new MappedSchemaBuilderTableOld( config.getJDBCConnId().getValue(), config.getFeatureType(), dialect, deleteCascadingByDB, workspace ); } else { builder = new MappedSchemaBuilderTable( config.getJDBCConnId().getValue(), config.getFeatureTypeMapping(), dialect, deleteCascadingByDB, workspace ); } } else { LOG.debug( "Schema-driven mode configuration" ); List<String> gmlSchemas = config.getGMLSchema(); StorageCRS storageCRS = config.getStorageCRS(); List<NamespaceHint> nsHints = config.getNamespaceHint(); BLOBMapping blobConf = config.getBLOBMapping(); List<FeatureTypeMappingJAXB> ftMappingConfs = config.getFeatureTypeMapping(); builder = new MappedSchemaBuilderGML( configURL, gmlSchemas, storageCRS, nsHints, blobConf, ftMappingConfs, deleteCascadingByDB ); } return builder.getMappedSchema(); }