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
WARNING: only creates the attributes table, call
createAttributesTable(AttributesTableMetadata)) instead to
create both the table and required GeoPackage metadata |
AttributesTable |
createAttributesTable(AttributesTableMetadata metadata)
Create a new attributes table with GeoPackage metadata including: user
attributes table and contents row.
|
<D extends GeoPackageDao<T,?>,T> |
createDao(Class<T> type)
Create a dao
|
boolean |
createExtensionsTable()
Create the Extensions table if it does not already exist
|
void |
createFeatureTable(FeatureTable table)
Create a new feature table
WARNING: only creates the feature table, call
createFeatureTable(FeatureTableMetadata)) instead to create both
the table and required GeoPackage metadata |
FeatureTable |
createFeatureTable(FeatureTableMetadata metadata)
Create a new feature table with GeoPackage metadata including: geometry
columns table and row, user feature table, and contents row.
|
boolean |
createGeometryColumnsTable()
Create the Geometry Columns table if it does not already 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
|
void |
createTileTable(TileTable table)
Create a new tile table
WARNING: only creates the tile table, call
createTileTable(TileTableMetadata)) instead to create both the
table and required GeoPackage metadata |
TileTable |
createTileTable(TileTableMetadata metadata)
Create a new tile table with GeoPackage metadata including: tile matrix
set table and row, tile matrix table, user tile table, and contents row.
|
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.
|
void |
dropView(String view)
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
|
String |
getApplicationIdHex()
Get the application id as a hex string prefixed with 0x
|
Integer |
getApplicationIdInteger()
Get the application id integer
|
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
|
Projection |
getContentsProjection(String table)
Get the projection of the table contents
|
GeoPackageCoreConnection |
getDatabase()
Get the SQLite database
|
ExtensionManager |
getExtensionManager()
Get an extension manager on the GeoPackage
|
ExtensionsDao |
getExtensionsDao()
Get an Extensions DAO
|
BoundingBox |
getFeatureBoundingBox(Projection projection,
String table,
boolean manual)
Get the feature table bounding box
|
List<String> |
getFeatureTables()
Get the feature tables
|
GeometryColumnsDao |
getGeometryColumnsDao()
Get a Geometry Columns DAO
|
String |
getName()
Get the GeoPackage name
|
String |
getPath()
Get the GeoPackage path
|
Projection |
getProjection(String table)
Get the projection of the table
|
SpatialReferenceSystemDao |
getSpatialReferenceSystemDao()
Get a Spatial Reference System DAO
|
BoundingBox |
getTableBoundingBox(Projection projection)
Get the bounding box for all tables in the provided projection, using
only table metadata
|
BoundingBox |
getTableBoundingBox(Projection projection,
boolean manual)
Get the bounding box for all tables in the provided projection, using
only table metadata and manual queries if enabled
|
BoundingBox |
getTableBoundingBox(Projection projection,
String table)
Get the bounding box for the table in the provided projection, using only
table metadata
|
BoundingBox |
getTableBoundingBox(Projection projection,
String table,
boolean manual)
Get the bounding box for the table in the provided projection, using only
table metadata and manual queries if enabled
|
BoundingBox |
getTableBoundingBox(String table)
Get the bounding box for the table in the table's projection, using only
table metadata
|
BoundingBox |
getTableBoundingBox(String table,
boolean manual)
Get the bounding box for the table in the table's projection, using only
table metadata and manual queries if enabled
|
Contents |
getTableContents(String table)
Get the contents of the user table
|
GeoPackageTableCreator |
getTableCreator()
Get the Table Creator
|
ContentsDataType |
getTableDataType(String table)
Get the contents data type of the user table
|
List<String> |
getTables()
Get all tables
|
List<String> |
getTables(ContentsDataType... types)
Get the tables for the contents data types
|
List<String> |
getTables(ContentsDataType type)
Get the tables for the contents data type
|
List<String> |
getTables(String... types)
Get the tables for the contents data types
|
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
|
List<String> |
getTileTables()
Get the tile tables
|
List<Contents> |
getTypeContents(ContentsDataType... types)
Get the contents for the data types
|
List<Contents> |
getTypeContents(ContentsDataType type)
Get the contents for the data type
|
List<Contents> |
getTypeContents(String... types)
Get the contents for the data types
|
List<Contents> |
getTypeContents(String type)
Get the contents for the data type
|
Integer |
getUserVersion()
Get the user version
|
Integer |
getUserVersionMajor()
Get the major user version
|
Integer |
getUserVersionMinor()
Get the minor user version
|
Integer |
getUserVersionPatch()
Get the patch user version
|
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 |
isFeatureTable(String table)
Check if the table is a feature table
|
boolean |
isTable(String table)
Check if the table exists
|
boolean |
isTableOrView(String name)
Check if the table or view exists
|
boolean |
isTableType(String table,
ContentsDataType... types)
Check if the table is one the provided types
|
boolean |
isTableType(String table,
ContentsDataType type)
Check if the table is the provided type
|
boolean |
isTableType(String table,
String... types)
Check if the table is one the provided types
|
boolean |
isTableType(String table,
String type)
Check if the table is the provided type
|
boolean |
isTileTable(String table)
Check if the table is a tile table
|
boolean |
isView(String view)
Check if the view exists
|
boolean |
isWritable()
Is the GeoPackage writable
|
void |
renameTable(String tableName,
String newTableName)
Rename the table
|
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()
GeoPackageTableCreator getTableCreator()
boolean isWritable()
String getApplicationId()
Integer getApplicationIdInteger()
String getApplicationIdHex()
Integer getUserVersion()
Integer getUserVersionMajor()
Integer getUserVersionMinor()
Integer getUserVersionPatch()
List<String> getAttributesTables()
List<String> getTables(ContentsDataType type)
type - data typeList<String> getTables(ContentsDataType... types)
types - data typesList<String> getTables(String type)
type - data typeList<String> getTables(String... types)
types - data typesList<Contents> getTypeContents(ContentsDataType type)
type - data typeList<Contents> getTypeContents(ContentsDataType... types)
types - data typesList<Contents> getTypeContents(String type)
type - data typeList<Contents> getTypeContents(String... types)
types - data typesboolean isFeatureTable(String table)
table - table nameboolean isTileTable(String table)
table - table nameboolean isAttributeTable(String table)
table - table nameboolean isTableType(String table, ContentsDataType type)
table - table nametype - data typeboolean isTableType(String table, ContentsDataType... types)
table - table nametypes - data typesboolean isTableType(String table, String type)
table - table nametype - data typeboolean isTableType(String table, String... types)
table - table nametypes - data typesboolean isContentsTable(String table)
table - table nameboolean isTable(String table)
table - table nameboolean isView(String view)
view - view nameboolean isTableOrView(String name)
name - table or view 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 getTableBoundingBox(Projection projection)
projection - desired bounding box projectionBoundingBox getTableBoundingBox(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 manuallyBoundingBox getTableBoundingBox(String table)
table - table nameBoundingBox getTableBoundingBox(Projection projection, String table)
projection - desired bounding box projectiontable - table nameBoundingBox getTableBoundingBox(String table, boolean manual)
table - table namemanual - manual query flag, true to determine missing bounds manuallyBoundingBox getTableBoundingBox(Projection projection, String table, boolean manual)
projection - desired bounding box projectiontable - table namemanual - manual query flag, true to determine missing bounds manuallyProjection getContentsProjection(String table)
table - table nameProjection getProjection(String table)
table - table nameBoundingBox getFeatureBoundingBox(Projection projection, String table, boolean manual)
projection - desired projectiontable - table namemanual - true to manually query if not indexedSpatialReferenceSystemDao getSpatialReferenceSystemDao()
ContentsDao getContentsDao()
GeometryColumnsDao getGeometryColumnsDao()
boolean createGeometryColumnsTable()
void createFeatureTable(FeatureTable table)
createFeatureTable(FeatureTableMetadata)) instead to create both
the table and required GeoPackage metadatatable - feature tableFeatureTable createFeatureTable(FeatureTableMetadata metadata)
metadata - feature table metadataTileMatrixSetDao getTileMatrixSetDao()
boolean createTileMatrixSetTable()
TileMatrixDao getTileMatrixDao()
boolean createTileMatrixTable()
void createTileTable(TileTable table)
createTileTable(TileTableMetadata)) instead to create both the
table and required GeoPackage metadatatable - tile tableTileTable createTileTable(TileTableMetadata metadata)
metadata - tile table metadatavoid createAttributesTable(AttributesTable table)
createAttributesTable(AttributesTableMetadata)) instead to
create both the table and required GeoPackage metadatatable - attributes tableAttributesTable createAttributesTable(AttributesTableMetadata metadata)
metadata - attributes table metadataExtensionsDao getExtensionsDao()
boolean createExtensionsTable()
void deleteTable(String table)
table - table namevoid deleteTableQuietly(String tableName)
tableName - table namevoid verifyWritable()
<D extends GeoPackageDao<T,?>,T> D createDao(Class<T> type)
D - dao typeT - class 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 dropView(String view)
view - view 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()
ExtensionManager getExtensionManager()
void createUserTable(UserTable<? extends UserColumn> table)
table - user tableCopyright © 2020 National Geospatial-Intelligence Agency. All rights reserved.