Class SpatialiteDSMetadata
- java.lang.Object
-
- com.vividsolutions.jump.datastore.spatialdatabases.SpatialDatabasesDSMetadata
-
- com.vividsolutions.jump.datastore.spatialite.SpatialiteDSMetadata
-
- All Implemented Interfaces:
DataStoreMetadata
public class SpatialiteDSMetadata extends SpatialDatabasesDSMetadata
Spatialite connexion metadata. Some extra processing occurs here: telling if spatialite extension is loaded and what type of geo metatada are present:- Author:
- nicolas Ribot
-
-
Field Summary
Fields Modifier and Type Field Description static StringGC_COLUMN_NAMEstatic StringGPKG_GC_COLUMN_NAME-
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 SpatialiteDSMetadata(DataStoreConnection con)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,GeometricColumnType>getGeoColTypesdMap()StringgetGeoColumnsQuery(String datasetName)No schema in SQLiteprotected List<GeometryColumn>getGeometryAttributes(String sql, String datasetName)Overridden to deal with indexed geometry columns, as queries to get features are different if spatial index is detected on the column.GeometryColumngetGeometryColumn(String datasetName, String geoCol)Convenience method to get a geometryColumn object from this metadataGeometryColumnsLayoutgetGeometryColumnsLayout()StringgetSpatialExtentQuery1(String schema, String table, String attributeName)StringgetSpatialExtentQuery2(String schema, String table, String attributeName)StringgetSpatialiteVersion()StringgetSridQuery(String schemaName, String tableName, String colName)booleanisSpatialiteLoaded()protected voidsetIndexInfo(String datasetName, GeometryColumn gc)set if given gc column is spatially indexed (true/false) according to spatialite DB typevoidsetSpatialiteVersion(String spatialiteVersion)-
Methods inherited from class com.vividsolutions.jump.datastore.spatialdatabases.SpatialDatabasesDSMetadata
createColumnList, getAddGeometryColumnStatement, getAddSpatialIndexStatement, getColumnNames, getCoordinateDimension, getCoordinateDimensionQuery, getCreateTableStatement, getDatasetInfoQuery, getDatasetNameQuery, getDatasetNames, getDataStoreConnection, getDataStoreLayers, getDbTypeName, getDefaultSchemaName, getExtents, getGeometryAttributes, getPrimaryKeyColumns, getSchemaName, getSpatialDbName, getSRID, getTableName, isIndexed, missingGeoException, querySRID
-
-
-
-
Constructor Detail
-
SpatialiteDSMetadata
public SpatialiteDSMetadata(DataStoreConnection con)
- Parameters:
con- a DataStoreConnection
-
-
Method Detail
-
getGeometryAttributes
protected List<GeometryColumn> getGeometryAttributes(String sql, String datasetName)
Overridden to deal with indexed geometry columns, as queries to get features are different if spatial index is detected on the column. Builds a GeometryColumn object with 5 params constructor.- Overrides:
getGeometryAttributesin classSpatialDatabasesDSMetadata- Parameters:
sql- SQL string to retrieve geometry columnsdatasetName- name of the dataset- Returns:
- a List of GeometryColumn
-
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)
No schema in SQLite- Overrides:
getGeoColumnsQueryin classSpatialDatabasesDSMetadata- Parameters:
datasetName- name of the Dataset- Returns:
- the SQL string to retrieve the geometry columns
-
getSridQuery
public String getSridQuery(String schemaName, String tableName, String colName)
- Overrides:
getSridQueryin classSpatialDatabasesDSMetadata
-
isSpatialiteLoaded
public boolean isSpatialiteLoaded()
-
getSpatialiteVersion
public String getSpatialiteVersion()
-
setSpatialiteVersion
public void setSpatialiteVersion(String spatialiteVersion)
-
getGeometryColumnsLayout
public GeometryColumnsLayout getGeometryColumnsLayout()
-
getGeoColTypesdMap
public Map<String,GeometricColumnType> getGeoColTypesdMap()
-
setIndexInfo
protected void setIndexInfo(String datasetName, GeometryColumn gc)
set if given gc column is spatially indexed (true/false) according to spatialite DB type- Parameters:
datasetName- the name of the dataset this column belongs togc- the geometry column to set
-
getGeometryColumn
public GeometryColumn getGeometryColumn(String datasetName, String geoCol)
Convenience method to get a geometryColumn object from this metadata- Parameters:
datasetName- the name of the datasetgeoCol- the name of the geo column- Returns:
- a GeometryColumn object
-
-