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 Details

    • GC_COLUMN_NAME

      public static String GC_COLUMN_NAME
    • GPKG_GC_COLUMN_NAME

      public static String GPKG_GC_COLUMN_NAME
    • GPKG_CONTENTS_TABLE_NAME

      public static String GPKG_CONTENTS_TABLE_NAME
  • Constructor Details

    • SpatialiteDSMetadata

      public SpatialiteDSMetadata(DataStoreConnection con)
      Parameters:
      con - a DataStoreConnection
  • Method Details

    • 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:
      getGeometryAttributes in class SpatialDatabasesDSMetadata
      Parameters:
      sql - SQL string to retrieve geometry columns
      datasetName - name of the dataset
      Returns:
      a List of GeometryColumn
    • getSpatialExtentQuery1

      public String getSpatialExtentQuery1(String schema, String table, String attributeName)
      Overrides:
      getSpatialExtentQuery1 in class SpatialDatabasesDSMetadata
    • getSpatialExtentQuery2

      public String getSpatialExtentQuery2(String schema, String table, String attributeName)
      Overrides:
      getSpatialExtentQuery2 in class SpatialDatabasesDSMetadata
    • getGeoColumnsQuery

      public String getGeoColumnsQuery(String datasetName)
      No schema in SQLite
      Overrides:
      getGeoColumnsQuery in class SpatialDatabasesDSMetadata
      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:
      getSridQuery in class SpatialDatabasesDSMetadata
    • 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 to
      gc - 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 dataset
      geoCol - the name of the geo column
      Returns:
      a GeometryColumn object