Package mil.nga.geopackage
Class GeoPackageImpl
java.lang.Object
mil.nga.geopackage.GeoPackageCoreImpl
mil.nga.geopackage.GeoPackageImpl
- All Implemented Interfaces:
Closeable
,AutoCloseable
,GeoPackage
,GeoPackageCore
- Direct Known Subclasses:
DGIWGGeoPackage
A single GeoPackage database connection implementation
-
Field Summary
Fields inherited from class mil.nga.geopackage.GeoPackageCoreImpl
writable
-
Constructor Summary
ModifierConstructorDescriptionprotected
GeoPackageImpl
(Context context, String name, String path, GeoPackageConnection database, GeoPackageCursorFactory cursorFactory, boolean writable) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
commit()
void
endTransaction
(boolean successful) void
Perform a foreign key check on the databaseforeignKeyCheck
(String tableName) Perform a foreign key check on the database tablegetAttributesDao
(String tableName) Get an Attributes DAO from a table namegetAttributesDao
(AttributesTable table) Get an Attributes DAO from a tablegetAttributesDao
(Contents contents) Get an Attributes DAO from ContentsGet the GeoPackage connectionGet the application contextGet the cursor factorygetFeatureBoundingBox
(Projection projection, String table, boolean manual) getFeatureDao
(String tableName) Get a Feature DAO from a table namegetFeatureDao
(Contents contents) Get a Feature DAO from ContentsgetFeatureDao
(GeometryColumns geometryColumns) Get a Feature DAO from Geometry ColumnsgetFeatureDao
(FeatureTable table) Get a Feature DAO from a tablegetTileDao
(String tableName) Get a Tile DAO from a table namegetTileDao
(Contents contents) Get a Tile DAO from ContentsgetTileDao
(TileMatrixSet tileMatrixSet) Get a Tile DAO from Tile Matrix SetgetTileDao
(TileTable table) Get a Tile DAO from a tablegetUserCustomDao
(String tableName) Get a User Custom DAO from a table namegetUserCustomDao
(UserCustomTable table) Get a User Custom DAO from a tableUserDao<?,
?, ?, ?> getUserDao
(String tableName) Get a User DAO from a tablePerform an integrity check on the databaseboolean
Perform a quick integrity check on the databasePerform a raw query on the databasevoid
registerCursorWrapper
(String table, GeoPackageCursorWrapper cursorWrapper) Register a GeoPackage Cursor Wrapper for table nameMethods inherited from class mil.nga.geopackage.GeoPackageCoreImpl
callInTransaction, close, copyAttributeTable, copyContents, copyFeatureTable, copyTable, copyTable, copyTableAsEmpty, copyTableNoExtensions, copyTileTable, copyUserTable, copyUserTable, createAttributesTable, createAttributesTable, createDao, createExtensionsTable, createFeatureTable, createFeatureTable, createGeometryColumnsTable, createTileMatrixSetTable, createTileMatrixTable, createTileTable, createTileTable, createUserTable, deleteTable, deleteTableQuietly, dropTable, dropView, enableForeignKeys, endAndBeginTransaction, endTransaction, failTransaction, foreignKeys, foreignKeys, getApplicationId, getApplicationIdHex, getApplicationIdInteger, getAttributesTables, getBoundingBox, getBoundingBox, getBoundingBox, getBoundingBox, getBoundingBox, getBoundingBox, getContentsBoundingBox, getContentsBoundingBox, getContentsBoundingBox, getContentsDao, getContentsProjection, getDatabase, getExtensionManager, getExtensionsDao, getFeatureTables, getGeometryColumnsDao, getName, getPath, getProjection, getSpatialReferenceSystemDao, getTableBoundingBox, getTableBoundingBox, getTableBoundingBox, getTableBoundingBox, getTableBoundingBox, getTableBoundingBox, getTableContents, getTableCoreDataType, getTableCreator, getTableDataType, getTables, getTables, getTables, getTables, getTables, getTableType, getTileMatrixDao, getTileMatrixSetDao, getTileTables, getTypeContents, getTypeContents, getTypeContents, getTypeContents, getUserVersion, getUserVersionMajor, getUserVersionMinor, getUserVersionPatch, isAttributeTable, isContentsTable, isFeatureTable, isTable, isTableCoreDataType, isTableOrView, isTableType, isTableType, isTableType, isTableType, isTileTable, isView, isWritable, renameTable, saveSchema, vacuum, verifyWritable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface mil.nga.geopackage.GeoPackageCore
callInTransaction, close, copyTable, copyTableAsEmpty, copyTableNoExtensions, createAttributesTable, createAttributesTable, createDao, createExtensionsTable, createFeatureTable, createFeatureTable, createGeometryColumnsTable, createTileMatrixSetTable, createTileMatrixTable, createTileTable, createTileTable, createUserTable, deleteTable, deleteTableQuietly, dropTable, dropView, enableForeignKeys, endAndBeginTransaction, endTransaction, failTransaction, foreignKeys, foreignKeys, getApplicationId, getApplicationIdHex, getApplicationIdInteger, getAttributesTables, getBoundingBox, getBoundingBox, getBoundingBox, getBoundingBox, getBoundingBox, getBoundingBox, getContentsBoundingBox, getContentsBoundingBox, getContentsBoundingBox, getContentsDao, getContentsProjection, getDatabase, getExtensionManager, getExtensionsDao, getFeatureTables, getGeometryColumnsDao, getName, getPath, getProjection, getSpatialReferenceSystemDao, getTableBoundingBox, getTableBoundingBox, getTableBoundingBox, getTableBoundingBox, getTableBoundingBox, getTableBoundingBox, getTableContents, getTableCoreDataType, getTableCreator, getTableDataType, getTables, getTables, getTables, getTables, getTables, getTableType, getTileMatrixDao, getTileMatrixSetDao, getTileTables, getTypeContents, getTypeContents, getTypeContents, getTypeContents, getUserVersion, getUserVersionMajor, getUserVersionMinor, getUserVersionPatch, isAttributeTable, isContentsTable, isFeatureTable, isTable, isTableCoreDataType, isTableOrView, isTableType, isTableType, isTableType, isTableType, isTileTable, isView, isWritable, renameTable, saveSchema, vacuum, verifyWritable
-
Constructor Details
-
GeoPackageImpl
protected GeoPackageImpl(Context context, String name, String path, GeoPackageConnection database, GeoPackageCursorFactory cursorFactory, boolean writable) Constructor- Parameters:
context
- contextname
- GeoPackage namepath
- database pathdatabase
- database connectioncursorFactory
- cursor factorywritable
- writable flag
-
-
Method Details
-
getFeatureBoundingBox
- Specified by:
getFeatureBoundingBox
in interfaceGeoPackageCore
-
getCursorFactory
Get the cursor factory- Specified by:
getCursorFactory
in interfaceGeoPackage
- Returns:
- cursor factory
-
registerCursorWrapper
Register a GeoPackage Cursor Wrapper for table name- Specified by:
registerCursorWrapper
in interfaceGeoPackage
- Parameters:
table
- table namecursorWrapper
- cursor wrapper
-
getFeatureDao
Get a Feature DAO from Geometry Columns- Specified by:
getFeatureDao
in interfaceGeoPackage
- Parameters:
geometryColumns
- geometry columns- Returns:
- feature dao
-
getFeatureDao
Get a Feature DAO from Contents- Specified by:
getFeatureDao
in interfaceGeoPackage
- Parameters:
contents
- contents- Returns:
- feature dao
-
getFeatureDao
Get a Feature DAO from a table- Specified by:
getFeatureDao
in interfaceGeoPackage
- Parameters:
table
- feature table- Returns:
- feature dao
-
getFeatureDao
Get a Feature DAO from a table name- Specified by:
getFeatureDao
in interfaceGeoPackage
- Parameters:
tableName
- table name- Returns:
- feature dao
-
getTileDao
Get a Tile DAO from Tile Matrix Set- Specified by:
getTileDao
in interfaceGeoPackage
- Parameters:
tileMatrixSet
- tile matrix set- Returns:
- tile dao
-
getTileDao
Get a Tile DAO from Contents- Specified by:
getTileDao
in interfaceGeoPackage
- Parameters:
contents
- contents- Returns:
- tile dao
-
getTileDao
Get a Tile DAO from a table- Specified by:
getTileDao
in interfaceGeoPackage
- Parameters:
table
- tile table- Returns:
- tile dao
-
getTileDao
Get a Tile DAO from a table name- Specified by:
getTileDao
in interfaceGeoPackage
- Parameters:
tableName
- table name- Returns:
- tile dao
-
getAttributesDao
Get an Attributes DAO from Contents- Specified by:
getAttributesDao
in interfaceGeoPackage
- Parameters:
contents
- contents- Returns:
- attributes dao
-
getAttributesDao
Get an Attributes DAO from a table- Specified by:
getAttributesDao
in interfaceGeoPackage
- Parameters:
table
- attributes table- Returns:
- attributes dao
-
getAttributesDao
Get an Attributes DAO from a table name- Specified by:
getAttributesDao
in interfaceGeoPackage
- Parameters:
tableName
- table name- Returns:
- attributes dao
-
getUserCustomDao
Get a User Custom DAO from a table name- Specified by:
getUserCustomDao
in interfaceGeoPackage
- Parameters:
tableName
- table name- Returns:
- user custom dao
-
getUserCustomDao
Get a User Custom DAO from a table- Specified by:
getUserCustomDao
in interfaceGeoPackage
- Parameters:
table
- table- Returns:
- user custom dao
-
getUserDao
Get a User DAO from a table- Specified by:
getUserDao
in interfaceGeoPackage
- Parameters:
tableName
- table name- Returns:
- user dao
-
execSQL
- Specified by:
execSQL
in interfaceGeoPackageCore
-
beginTransaction
public void beginTransaction()- Specified by:
beginTransaction
in interfaceGeoPackageCore
-
endTransaction
public void endTransaction(boolean successful) - Specified by:
endTransaction
in interfaceGeoPackageCore
-
commit
public void commit()- Specified by:
commit
in interfaceGeoPackageCore
-
inTransaction
public boolean inTransaction()- Specified by:
inTransaction
in interfaceGeoPackageCore
-
rawQuery
Perform a raw query on the database- Specified by:
rawQuery
in interfaceGeoPackage
- Parameters:
sql
- sql statementargs
- arguments- Returns:
- cursor
-
getConnection
Get the GeoPackage connection- Specified by:
getConnection
in interfaceGeoPackage
- Returns:
- GeoPackage connection
-
getContext
Get the application context- Specified by:
getContext
in interfaceGeoPackage
- Returns:
- context
-
foreignKeyCheck
Perform a foreign key check on the database- Specified by:
foreignKeyCheck
in interfaceGeoPackage
- Returns:
- null if check passed, open cursor with results if failed
-
foreignKeyCheck
Perform a foreign key check on the database table- Specified by:
foreignKeyCheck
in interfaceGeoPackage
- Parameters:
tableName
- table name- Returns:
- null if check passed, open cursor with results if failed
-
integrityCheck
Perform an integrity check on the database- Specified by:
integrityCheck
in interfaceGeoPackage
- Returns:
- null if check passed, open cursor with results if failed
-
quickCheck
Perform a quick integrity check on the database- Specified by:
quickCheck
in interfaceGeoPackage
- Returns:
- null if check passed, open cursor with results if failed
-