Class H2DSMetadata
- java.lang.Object
-
- com.vividsolutions.jump.datastore.spatialdatabases.SpatialDatabasesDSMetadata
-
- com.vividsolutions.jump.datastore.h2.H2DSMetadata
-
- All Implemented Interfaces:
DataStoreMetadata
public class H2DSMetadata extends SpatialDatabasesDSMetadata
Metadata for a H2 Database
-
-
Field Summary
-
Fields inherited from class com.vividsolutions.jump.datastore.spatialdatabases.SpatialDatabasesDSMetadata
conn, coordDimQuery, datasetInfoQuery, datasetNameQuery, dataStoreLayers, defaultSchemaName, geoColumnsQuery, reader, spatialDbName, spatialExtentQuery1, spatialExtentQuery2, sridMap, sridQuery, txtReader
-
-
Constructor Summary
Constructors Constructor Description H2DSMetadata(DataStoreConnection con)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAddGeometryColumnStatement(String schemaName, String tableName, String geometryColumn, int srid, String geometryType, int dim)Creates the query String to add a GeometryColumn.StringgetAddSpatialIndexStatement(String schemaName, String tableName, String geometryColumn)Create statement to add a spatial index on the specified geometry column.StringgetGeoColumnsQuery(String datasetName)List<GeometryColumn>getGeometryAttributes(String datasetName)Retrieves list of geometric tables from a custom DB Query: Should use OGC metadata geoemtry_columns or equivalent mechanism according to target DB.StringgetSpatialExtentQuery1(String schema, String table, String attributeName)StringgetSpatialExtentQuery2(String schema, String table, String attributeName)StringgetSridQuery(String schemaName, String tableName, String colName)-
Methods inherited from class com.vividsolutions.jump.datastore.spatialdatabases.SpatialDatabasesDSMetadata
createColumnList, getColumnNames, getCoordinateDimension, getCoordinateDimensionQuery, getCreateTableStatement, getDatasetInfoQuery, getDatasetNameQuery, getDatasetNames, getDataStoreConnection, getDataStoreLayers, getDbTypeName, getDefaultSchemaName, getExtents, getGeometryAttributes, getPrimaryKeyColumns, getSchemaName, getSpatialDbName, getSRID, getTableName, isIndexed, missingGeoException, querySRID
-
-
-
-
Constructor Detail
-
H2DSMetadata
public H2DSMetadata(DataStoreConnection con)
-
-
Method Detail
-
getSpatialExtentQuery1
public String getSpatialExtentQuery1(String schema, String table, String attributeName)
- Overrides:
getSpatialExtentQuery1in classSpatialDatabasesDSMetadata
-
getSpatialExtentQuery2
public String getSpatialExtentQuery2(String schema, String table, String attributeName)
- Overrides:
getSpatialExtentQuery2in classSpatialDatabasesDSMetadata
-
getGeoColumnsQuery
public String getGeoColumnsQuery(String datasetName)
- Overrides:
getGeoColumnsQueryin classSpatialDatabasesDSMetadata
-
getSridQuery
public String getSridQuery(String schemaName, String tableName, String colName)
- Overrides:
getSridQueryin classSpatialDatabasesDSMetadata
-
getGeometryAttributes
public List<GeometryColumn> getGeometryAttributes(String datasetName)
Description copied from class:SpatialDatabasesDSMetadataRetrieves list of geometric tables from a custom DB Query: Should use OGC metadata geoemtry_columns or equivalent mechanism according to target DB.- Specified by:
getGeometryAttributesin interfaceDataStoreMetadata- Overrides:
getGeometryAttributesin classSpatialDatabasesDSMetadata- Parameters:
datasetName- name of a dataset- Returns:
- list of GeometryColumn's referenced in this dataset
-
getAddGeometryColumnStatement
public String getAddGeometryColumnStatement(String schemaName, String tableName, String geometryColumn, int srid, String geometryType, int dim)
Description copied from class:SpatialDatabasesDSMetadataCreates the query String to add a GeometryColumn.Note 1 : In PostGIS 2.x, srid=-1 is automatically converted to srid=0 by AddGeometryColumn function.
Note 2 : To stay compatible with PostGIS 1.x, last argument of AddGeometryColumn is omitted. As a consequence, geometry type uses type modifier rather than constraints (new default behaviour in 2.x)
The geometry column name must have its final form. Attribute name normalization is the responsability of the calling method.
- Overrides:
getAddGeometryColumnStatementin classSpatialDatabasesDSMetadata- Parameters:
schemaName- the name of the SchematableName- the name of the TablegeometryColumn- the name of the geometry columnsrid- the SRID for the geometry columngeometryType- the (SQL) geometry type as a Stringdim- the coordinate dimension (2 or 3)- Returns:
- a SQL query string to add a geometry column to a table
-
getAddSpatialIndexStatement
public String getAddSpatialIndexStatement(String schemaName, String tableName, String geometryColumn)
Description copied from class:SpatialDatabasesDSMetadataCreate statement to add a spatial index on the specified geometry column. The geometry column name must have its final form. Attribute name normalization is the responsability of the calling method.- Overrides:
getAddSpatialIndexStatementin classSpatialDatabasesDSMetadata- Parameters:
schemaName- unquoted schema name or null if default schema is usedtableName- unquoted table namegeometryColumn- unquoted geometry column name- Returns:
- a sql string to add a spatial index
-
-