public interface GeoPackageCore extends Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
beginTransaction()
Begin a transaction
|
<T> T |
callInTransaction(Callable<T> callable)
Execute the
Callable class inside an ORMLite transaction |
void |
close()
Close the GeoPackage connection
|
void |
commit()
Commit changes on the connection
|
void |
copyTable(String tableName,
String newTableName)
Copy the table with transferred contents and extensions
|
void |
copyTableAsEmpty(String tableName,
String newTableName)
Copy the table but leave the user table empty and without extensions
|
void |
copyTableNoExtensions(String tableName,
String newTableName)
Copy the table with transferred contents but no extensions
|
void |
createAttributesTable(AttributesTable table)
Create a new attributes table (only the attributes table is created, no
Contents entry is created)
|
AttributesTable |
createAttributesTable(String tableName,
List<AttributesColumn> columns)
Create a new attributes table and a new Contents
The attributes table will be created with columns.size() columns and must
include an integer id column
|
AttributesTable |
createAttributesTable(String tableName,
List<AttributesColumn> columns,
Collection<Constraint> constraints)
Create a new attributes table and a new Contents
The attributes table will be created with columns.size() columns and must
include an integer id column
|
AttributesTable |
createAttributesTable(String tableName,
String idColumnName,
List<AttributesColumn> additionalColumns)
Create a new attributes table and a new Contents
The attributes table will be created with 1 + additionalColumns.size()
columns, an id column with the provided name and the provided additional
columns.
|
AttributesTable |
createAttributesTable(String tableName,
String idColumnName,
List<AttributesColumn> additionalColumns,
Collection<Constraint> constraints)
Create a new attributes table and a new Contents
The attributes table will be created with 1 + additionalColumns.size()
columns, an id column with the provided name and the provided additional
columns.
|
AttributesTable |
createAttributesTableWithId(String tableName,
List<AttributesColumn> additionalColumns)
Create a new attributes table and a new Contents
The attributes table will be created with 1 + additionalColumns.size()
columns, an id column named "id" and the provided additional columns.
|
AttributesTable |
createAttributesTableWithId(String tableName,
List<AttributesColumn> additionalColumns,
Collection<Constraint> constraints)
Create a new attributes table and a new Contents
The attributes table will be created with 1 + additionalColumns.size()
columns, an id column named "id" and the provided additional columns.
|
boolean |
createContentsIdTable()
Create the Contents Id Table if it does not exist
|
<T,S extends BaseDaoImpl<T,?>> |
createDao(Class<T> type)
Create a dao
|
boolean |
createDataColumnConstraintsTable()
Create the Data Column Constraints table if it does not already exist
|
boolean |
createDataColumnsTable()
Create the Data Columns table if it does not already exist
|
boolean |
createExtendedRelationsTable()
Create the Extended Relations Table if it does not exist
|
boolean |
createExtensionsTable()
Create the Extensions table if it does not already exist
|
void |
createFeatureTable(FeatureTable table)
Create a new feature table
|
GeometryColumns |
createFeatureTableWithMetadata(GeometryColumns geometryColumns,
BoundingBox boundingBox,
long srsId)
Create a new feature table with GeoPackage metadata.
|
GeometryColumns |
createFeatureTableWithMetadata(GeometryColumns geometryColumns,
BoundingBox boundingBox,
long srsId,
List<FeatureColumn> columns)
Create a new feature table with GeoPackage metadata.
|
GeometryColumns |
createFeatureTableWithMetadata(GeometryColumns geometryColumns,
List<FeatureColumn> additionalColumns,
BoundingBox boundingBox,
long srsId)
Create a new feature table with GeoPackage metadata.
|
GeometryColumns |
createFeatureTableWithMetadata(GeometryColumns geometryColumns,
String idColumnName,
BoundingBox boundingBox,
long srsId)
Create a new feature table with GeoPackage metadata.
|
GeometryColumns |
createFeatureTableWithMetadata(GeometryColumns geometryColumns,
String idColumnName,
List<FeatureColumn> additionalColumns,
BoundingBox boundingBox,
long srsId)
Create a new feature table with GeoPackage metadata.
|
boolean |
createFeatureTileLinkTable()
Create the Feature Tile Link Table if it does not exist
|
boolean |
createGeometryColumnsTable()
Create the Geometry Columns table if it does not already exist
|
boolean |
createGeometryIndexTable()
Create Geometry Index Table if it does not exist and index it
|
boolean |
createGriddedCoverageTable()
Create the 2D Gridded Coverage Table if it does not exist
|
boolean |
createGriddedTileTable()
Create the 2D Gridded Tile Table if it does not exist
|
boolean |
createMetadataReferenceTable()
Create the Metadata Reference table if it does not already exist
|
boolean |
createMetadataTable()
Create the Metadata table if it does not already exist
|
boolean |
createTableIndexTable()
Create the Table Index Table if it does not exist
|
boolean |
createTileMatrixSetTable()
Create the Tile Matrix Set table if it does not already exist
|
boolean |
createTileMatrixTable()
Create the Tile Matrix table if it does not already exist
|
boolean |
createTileScalingTable()
Create the Tile Scaling Table if it does not exist
|
void |
createTileTable(TileTable table)
Create a new tile table
|
TileMatrixSet |
createTileTableWithMetadata(ContentsDataType dataType,
String tableName,
BoundingBox contentsBoundingBox,
long contentsSrsId,
BoundingBox tileMatrixSetBoundingBox,
long tileMatrixSetSrsId)
Create a new tile table of the specified type and the GeoPackage metadata
|
TileMatrixSet |
createTileTableWithMetadata(String tableName,
BoundingBox contentsBoundingBox,
long contentsSrsId,
BoundingBox tileMatrixSetBoundingBox,
long tileMatrixSetSrsId)
Create a new tile table and the GeoPackage metadata
|
void |
createUserTable(UserTable<? extends UserColumn> table)
Create a new user table
|
void |
deleteTable(String table)
Delete the user table (a feature or tile table) and all GeoPackage
metadata
|
void |
deleteTableQuietly(String tableName)
Attempt to delete the user table (a feature or tile table) and all
GeoPackage metadata quietly
|
void |
dropTable(String table)
Drop the table if it exists.
|
boolean |
enableForeignKeys()
If foreign keys is disabled and there are no foreign key violations,
enables foreign key checks, else logs violations
|
void |
endAndBeginTransaction()
End a transaction as successful and begin a new transaction
|
void |
endTransaction()
End a transaction successfully
|
void |
endTransaction(boolean successful)
End a transaction
|
void |
execSQL(String sql)
Execute the sql on the GeoPackage database
|
void |
failTransaction()
Fail a transaction
|
boolean |
foreignKeys()
Query for the foreign keys value
|
boolean |
foreignKeys(boolean on)
Change the foreign keys state
|
String |
getApplicationId()
Get the application id
|
List<String> |
getAttributesTables()
Get the attributes tables
|
BoundingBox |
getBoundingBox(Projection projection)
Get the bounding box for all tables in the provided projection, including
contents and table metadata
|
BoundingBox |
getBoundingBox(Projection projection,
boolean manual)
Get the bounding box for all tables in the provided projection, including
contents, table metadata, and manual queries if enabled
|
BoundingBox |
getBoundingBox(Projection projection,
String table)
Get the bounding box for the table in the provided projection, including
contents and table metadata
|
BoundingBox |
getBoundingBox(Projection projection,
String table,
boolean manual)
Get the bounding box for the table in the provided projection, including
contents, table metadata, and manual queries if enabled
|
BoundingBox |
getBoundingBox(String table)
Get the bounding box for the table in the table's projection, including
contents and table metadata
|
BoundingBox |
getBoundingBox(String table,
boolean manual)
Get the bounding box for the table in the table's projection, including
contents, table metadata, and manual queries if enabled
|
BoundingBox |
getContentsBoundingBox(Projection projection)
Get the bounding box for all table contents in the provided projection
|
BoundingBox |
getContentsBoundingBox(Projection projection,
String table)
Get the bounding box from the contents for the table in the provided
projection
|
BoundingBox |
getContentsBoundingBox(String table)
Get the bounding box from the contents for the table in the table's
projection
|
ContentsDao |
getContentsDao()
Get a Contents DAO
|
ContentsIdDao |
getContentsIdDao()
Get a Contents Id DAO
|
GeoPackageCoreConnection |
getDatabase()
Get the SQLite database
|
DataColumnConstraintsDao |
getDataColumnConstraintsDao()
Get a Data Column Constraints DAO
|
DataColumnsDao |
getDataColumnsDao()
Get a Data Columns DAO
|
ExtendedRelationsDao |
getExtendedRelationsDao()
Get a Extended Relations DAO
|
ExtensionsDao |
getExtensionsDao()
Get an Extensions DAO
|
List<String> |
getFeatureAndTileTables()
Get the feature and tile tables
|
List<String> |
getFeatureTables()
Get the feature tables
|
FeatureTileLinkDao |
getFeatureTileLinkDao()
Get a Feature Tile Link DAO
|
GeometryColumnsDao |
getGeometryColumnsDao()
Get a Geometry Columns DAO
|
GeometryColumnsSfSqlDao |
getGeometryColumnsSfSqlDao()
Get a SF/SQL Geometry Columns DAO
|
GeometryColumnsSqlMmDao |
getGeometryColumnsSqlMmDao()
Get a SQL/MM Geometry Columns DAO
|
GeometryIndexDao |
getGeometryIndexDao()
Get a Geometry Index DAO
|
GriddedCoverageDao |
getGriddedCoverageDao()
Get a 2D Gridded Coverage DAO
|
GriddedTileDao |
getGriddedTileDao()
Get a 2D Gridded Tile DAO
|
MetadataDao |
getMetadataDao()
Get a Metadata DAO
|
MetadataReferenceDao |
getMetadataReferenceDao()
Get a Metadata Reference DAO
|
String |
getName()
Get the GeoPackage name
|
String |
getPath()
Get the GeoPackage path
|
SpatialReferenceSystemDao |
getSpatialReferenceSystemDao()
Get a Spatial Reference System DAO
|
SpatialReferenceSystemSfSqlDao |
getSpatialReferenceSystemSfSqlDao()
Get a SF/SQL Spatial Reference System DAO
|
SpatialReferenceSystemSqlMmDao |
getSpatialReferenceSystemSqlMmDao()
Get a SQL/MM Spatial Reference System DAO
|
Contents |
getTableContents(String table)
Get the contents of the user table
|
ContentsDataType |
getTableDataType(String table)
Get the contents data type of the user table
|
TableIndexDao |
getTableIndexDao()
Get a Table Index DAO
|
List<String> |
getTables()
Get all tables
|
List<String> |
getTables(ContentsDataType type)
Get the tables for the contents data type
|
List<String> |
getTables(String type)
Get the tables for the contents data type
|
String |
getTableType(String table)
Get the contents data type of the user table
|
TileMatrixDao |
getTileMatrixDao()
Get a Tile Matrix DAO
|
TileMatrixSetDao |
getTileMatrixSetDao()
Get a Tile Matrix Set DAO
|
TileScalingDao |
getTileScalingDao()
Get a Tile Scaling DAO
|
List<String> |
getTileTables()
Get the tile tables
|
int |
getUserVersion()
Get the user version
|
int |
getUserVersionMajor()
Get the major user version
|
int |
getUserVersionMinor()
Get the minor user version
|
int |
getUserVersionPatch()
Get the patch user version
|
boolean |
indexGeometryIndexTable()
Index the Geometry Index Table if needed
|
boolean |
inTransaction()
Determine if currently within a transaction
|
boolean |
isAttributeTable(String table)
Check if the table is an attribute table
|
boolean |
isContentsTable(String table)
Check if the table exists as a user contents table
|
boolean |
isFeatureOrTileTable(String table)
Check if the table exists as a feature or tile table
|
boolean |
isFeatureTable(String table)
Check if the table is a feature table
|
boolean |
isTable(String table)
Check if the table exists
|
boolean |
isTableType(ContentsDataType type,
String table)
Check if the table is the provided type
|
boolean |
isTableType(String type,
String table)
Check if the table is the provided type
|
boolean |
isTileTable(String table)
Check if the table is a tile table
|
boolean |
isWritable()
Is the GeoPackage writable
|
void |
renameTable(String tableName,
String newTableName)
Rename the table
|
boolean |
unindexGeometryIndexTable()
Un-index the Geometry Index Table if needed
|
void |
vacuum()
Rebuild the GeoPackage, repacking it into a minimal amount of disk space
|
void |
verifyWritable()
Verify the GeoPackage is writable and throw an exception if it is not
|
void close()
close in interface AutoCloseableclose in interface CloseableString getName()
String getPath()
GeoPackageCoreConnection getDatabase()
boolean isWritable()
String getApplicationId()
int getUserVersion()
int getUserVersionMajor()
int getUserVersionMinor()
int getUserVersionPatch()
List<String> getAttributesTables()
List<String> getTables(ContentsDataType type)
type - data typeList<String> getTables(String type)
type - data typeList<String> getFeatureAndTileTables()
boolean isFeatureTable(String table)
table - table nameboolean isTileTable(String table)
table - table nameboolean isAttributeTable(String table)
table - table nameboolean isTableType(ContentsDataType type, String table)
type - data typetable - table nameboolean isTableType(String type, String table)
type - data typetable - table nameboolean isFeatureOrTileTable(String table)
table - table nameboolean isContentsTable(String table)
table - table nameboolean isTable(String table)
table - table nameContents getTableContents(String table)
table - table nameString getTableType(String table)
table - table nameContentsDataType getTableDataType(String table)
table - table nameBoundingBox getContentsBoundingBox(Projection projection)
projection - desired bounding box projectionBoundingBox getBoundingBox(Projection projection)
projection - desired bounding box projectionBoundingBox getBoundingBox(Projection projection, boolean manual)
projection - desired bounding box projectionmanual - manual query flag, true to determine missing bounds manuallyBoundingBox getContentsBoundingBox(String table)
table - table nameBoundingBox getContentsBoundingBox(Projection projection, String table)
projection - desired bounding box projectiontable - table nameBoundingBox getBoundingBox(String table)
table - table nameBoundingBox getBoundingBox(Projection projection, String table)
projection - desired bounding box projectiontable - table nameBoundingBox getBoundingBox(String table, boolean manual)
table - table namemanual - manual query flag, true to determine missing bounds manuallyBoundingBox getBoundingBox(Projection projection, String table, boolean manual)
projection - desired bounding box projectiontable - table namemanual - manual query flag, true to determine missing bounds manuallySpatialReferenceSystemDao getSpatialReferenceSystemDao()
SpatialReferenceSystemSqlMmDao getSpatialReferenceSystemSqlMmDao()
SpatialReferenceSystemSfSqlDao getSpatialReferenceSystemSfSqlDao()
ContentsDao getContentsDao()
GeometryColumnsDao getGeometryColumnsDao()
GeometryColumnsSqlMmDao getGeometryColumnsSqlMmDao()
GeometryColumnsSfSqlDao getGeometryColumnsSfSqlDao()
boolean createGeometryColumnsTable()
void createFeatureTable(FeatureTable table)
table - feature tableGeometryColumns createFeatureTableWithMetadata(GeometryColumns geometryColumns, BoundingBox boundingBox, long srsId)
GeometryColumns.getColumnName().geometryColumns - geometry columns to createboundingBox - contents bounding boxsrsId - spatial reference system idGeometryColumns createFeatureTableWithMetadata(GeometryColumns geometryColumns, String idColumnName, BoundingBox boundingBox, long srsId)
GeometryColumns.getColumnName().geometryColumns - geometry columns to createidColumnName - id column nameboundingBox - contents bounding boxsrsId - spatial reference system idGeometryColumns createFeatureTableWithMetadata(GeometryColumns geometryColumns, List<FeatureColumn> additionalColumns, BoundingBox boundingBox, long srsId)
GeometryColumns.getColumnName(), and the provided additional
columns.geometryColumns - geometry columns to createadditionalColumns - additional user feature table columns to create in addition to
id and geometry columnsboundingBox - contents bounding boxsrsId - spatial reference system idGeometryColumns createFeatureTableWithMetadata(GeometryColumns geometryColumns, String idColumnName, List<FeatureColumn> additionalColumns, BoundingBox boundingBox, long srsId)
GeometryColumns.getColumnName(), and the provided additional
columns.geometryColumns - geometry columns to createidColumnName - id column nameadditionalColumns - additional user feature table columns to create in addition to
id and geometry columnsboundingBox - contents bounding boxsrsId - spatial reference system idGeometryColumns createFeatureTableWithMetadata(GeometryColumns geometryColumns, BoundingBox boundingBox, long srsId, List<FeatureColumn> columns)
GeometryColumns.getColumnName()geometryColumns - geometry columns to createboundingBox - contents bounding boxsrsId - spatial reference system idcolumns - user feature table columns to createTileMatrixSetDao getTileMatrixSetDao()
boolean createTileMatrixSetTable()
TileMatrixDao getTileMatrixDao()
boolean createTileMatrixTable()
void createTileTable(TileTable table)
table - tile tableTileMatrixSet createTileTableWithMetadata(String tableName, BoundingBox contentsBoundingBox, long contentsSrsId, BoundingBox tileMatrixSetBoundingBox, long tileMatrixSetSrsId)
tableName - table namecontentsBoundingBox - contents bounding boxcontentsSrsId - contents SRS idtileMatrixSetBoundingBox - tile matrix set bounding boxtileMatrixSetSrsId - tile matrix set SRS idTileMatrixSet createTileTableWithMetadata(ContentsDataType dataType, String tableName, BoundingBox contentsBoundingBox, long contentsSrsId, BoundingBox tileMatrixSetBoundingBox, long tileMatrixSetSrsId)
dataType - contents data typetableName - table namecontentsBoundingBox - contents bounding boxcontentsSrsId - contents SRS idtileMatrixSetBoundingBox - tile matrix set bounding boxtileMatrixSetSrsId - tile matrix set SRS idDataColumnsDao getDataColumnsDao()
boolean createDataColumnsTable()
DataColumnConstraintsDao getDataColumnConstraintsDao()
boolean createDataColumnConstraintsTable()
MetadataDao getMetadataDao()
boolean createMetadataTable()
MetadataReferenceDao getMetadataReferenceDao()
boolean createMetadataReferenceTable()
ExtensionsDao getExtensionsDao()
boolean createExtensionsTable()
void deleteTable(String table)
table - table namevoid deleteTableQuietly(String tableName)
tableName - table namevoid verifyWritable()
<T,S extends BaseDaoImpl<T,?>> S createDao(Class<T> type)
T - class typeS - dao typetype - dao class typevoid execSQL(String sql)
sql - sql statementvoid beginTransaction()
void endTransaction()
void failTransaction()
void endTransaction(boolean successful)
successful - true if the transaction was successful, false to rollback or
not commitvoid endAndBeginTransaction()
void commit()
boolean inTransaction()
<T> T callInTransaction(Callable<T> callable) throws SQLException
Callable class inside an ORMLite transactionT - callable typecallable - Callable to execute inside of the transaction.SQLException - upon transaction errorboolean enableForeignKeys()
boolean foreignKeys()
boolean foreignKeys(boolean on)
on - true to turn on, false to turn offvoid dropTable(String table)
table - table namevoid renameTable(String tableName, String newTableName)
tableName - table namenewTableName - new table namevoid copyTable(String tableName, String newTableName)
tableName - table namenewTableName - new table namevoid copyTableNoExtensions(String tableName, String newTableName)
tableName - table namenewTableName - new table namevoid copyTableAsEmpty(String tableName, String newTableName)
tableName - table namenewTableName - new table namevoid vacuum()
GriddedCoverageDao getGriddedCoverageDao()
boolean createGriddedCoverageTable()
GriddedTileDao getGriddedTileDao()
boolean createGriddedTileTable()
TableIndexDao getTableIndexDao()
boolean createTableIndexTable()
GeometryIndexDao getGeometryIndexDao()
boolean createGeometryIndexTable()
boolean indexGeometryIndexTable()
boolean unindexGeometryIndexTable()
FeatureTileLinkDao getFeatureTileLinkDao()
boolean createFeatureTileLinkTable()
void createAttributesTable(AttributesTable table)
table - attributes tableAttributesTable createAttributesTableWithId(String tableName, List<AttributesColumn> additionalColumns)
tableName - table nameadditionalColumns - additional attributes table columns to create in addition to
idAttributesTable createAttributesTableWithId(String tableName, List<AttributesColumn> additionalColumns, Collection<Constraint> constraints)
tableName - table nameadditionalColumns - additional attributes table columns to create in addition to
idconstraints - constraintsAttributesTable createAttributesTable(String tableName, String idColumnName, List<AttributesColumn> additionalColumns)
tableName - table nameidColumnName - id column nameadditionalColumns - additional attributes table columns to create in addition to
idAttributesTable createAttributesTable(String tableName, String idColumnName, List<AttributesColumn> additionalColumns, Collection<Constraint> constraints)
tableName - table nameidColumnName - id column nameadditionalColumns - additional attributes table columns to create in addition to
idconstraints - constraintsAttributesTable createAttributesTable(String tableName, List<AttributesColumn> columns)
tableName - table namecolumns - table columns to createAttributesTable createAttributesTable(String tableName, List<AttributesColumn> columns, Collection<Constraint> constraints)
tableName - table namecolumns - table columns to createconstraints - constraintsTileScalingDao getTileScalingDao()
boolean createTileScalingTable()
ExtendedRelationsDao getExtendedRelationsDao()
boolean createExtendedRelationsTable()
ContentsIdDao getContentsIdDao()
boolean createContentsIdTable()
void createUserTable(UserTable<? extends UserColumn> table)
table - user tableCopyright © 2019 National Geospatial-Intelligence Agency. All rights reserved.