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
public class GeoPackageImpl extends GeoPackageCoreImpl implements GeoPackage
GeoPackage implementation- Author:
- osbornb
-
-
Field Summary
-
Fields inherited from class mil.nga.geopackage.GeoPackageCoreImpl
writable
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGeoPackageImpl(String name, File file, GeoPackageConnection database)ConstructorprotectedGeoPackageImpl(String name, File file, GeoPackageConnection database, boolean writable)ConstructorprotectedGeoPackageImpl(String name, String path, GeoPackageConnection database)ConstructorprotectedGeoPackageImpl(String name, String path, GeoPackageConnection database, boolean writable)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeginTransaction()voidcommit()voidendTransaction(boolean successful)voidexecSQL(String sql)ResultSetforeignKeyCheck()Perform a foreign key check on the databaseResultSetforeignKeyCheck(String tableName)Perform a foreign key check on the database tableAttributesDaogetAttributesDao(String tableName)Get an Attributes DAO from a table nameAttributesDaogetAttributesDao(AttributesTable table)Get an Attributes DAO from a tableAttributesDaogetAttributesDao(Contents contents)Get an Attributes DAO from ContentsGeoPackageConnectiongetConnection()Get the GeoPackage connectionBoundingBoxgetFeatureBoundingBox(Projection projection, String table, boolean manual)FeatureDaogetFeatureDao(String tableName)Get a Feature DAO from a table nameFeatureDaogetFeatureDao(Contents contents)Get a Feature DAO from ContentsFeatureDaogetFeatureDao(GeometryColumns geometryColumns)Get a Feature DAO from Geometry ColumnsFeatureDaogetFeatureDao(FeatureTable table)Get a Feature DAO from a tableTileDaogetTileDao(String tableName)Get a Tile DAO from a table nameTileDaogetTileDao(Contents contents)Get a Tile DAO from ContentsTileDaogetTileDao(TileMatrixSet tileMatrixSet)Get a Tile DAO from Tile Matrix SetTileDaogetTileDao(TileTable table)Get a Tile DAO from a tableUserCustomDaogetUserCustomDao(String tableName)Get a User Custom DAO from a table nameUserCustomDaogetUserCustomDao(UserCustomTable table)Get a User Custom DAO from a tableUserDao<?,?,?,?>getUserDao(String tableName)Get a User DAO from a tableResultSetintegrityCheck()Perform an integrity check on the databasebooleaninTransaction()ResultSetquery(String sql, String[] args)Perform a query on the databaseResultSetquickCheck()Perform a quick integrity check on the databaseStringreadableSize()Get a readable version of the database sizelongsize()Size of the database in bytes-
Methods 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 Detail
-
GeoPackageImpl
protected GeoPackageImpl(String name, File file, GeoPackageConnection database)
Constructor- Parameters:
name- GeoPackage namefile- GeoPackage filedatabase- connection
-
GeoPackageImpl
protected GeoPackageImpl(String name, File file, GeoPackageConnection database, boolean writable)
Constructor- Parameters:
name- GeoPackage namefile- GeoPackage filedatabase- connectionwritable- true if writable- Since:
- 6.3.1
-
GeoPackageImpl
protected GeoPackageImpl(String name, String path, GeoPackageConnection database)
Constructor- Parameters:
name- GeoPackage namepath- GeoPackage pathdatabase- connection
-
GeoPackageImpl
protected GeoPackageImpl(String name, String path, GeoPackageConnection database, boolean writable)
Constructor- Parameters:
name- GeoPackage namepath- GeoPackage pathdatabase- connectionwritable- true if writable- Since:
- 6.3.1
-
-
Method Detail
-
getFeatureBoundingBox
public BoundingBox getFeatureBoundingBox(Projection projection, String table, boolean manual)
- Specified by:
getFeatureBoundingBoxin interfaceGeoPackageCore
-
getFeatureDao
public FeatureDao getFeatureDao(GeometryColumns geometryColumns)
Get a Feature DAO from Geometry Columns- Specified by:
getFeatureDaoin interfaceGeoPackage- Parameters:
geometryColumns- geometry columns- Returns:
- feature dao
-
getFeatureDao
public FeatureDao getFeatureDao(Contents contents)
Get a Feature DAO from Contents- Specified by:
getFeatureDaoin interfaceGeoPackage- Parameters:
contents- contents- Returns:
- feature dao
-
getFeatureDao
public FeatureDao getFeatureDao(FeatureTable table)
Get a Feature DAO from a table- Specified by:
getFeatureDaoin interfaceGeoPackage- Parameters:
table- feature table- Returns:
- feature dao
-
getFeatureDao
public FeatureDao getFeatureDao(String tableName)
Get a Feature DAO from a table name- Specified by:
getFeatureDaoin interfaceGeoPackage- Parameters:
tableName- table name- Returns:
- feature dao
-
getTileDao
public TileDao getTileDao(TileMatrixSet tileMatrixSet)
Get a Tile DAO from Tile Matrix Set- Specified by:
getTileDaoin interfaceGeoPackage- Parameters:
tileMatrixSet- tile matrix set- Returns:
- tile dao
-
getTileDao
public TileDao getTileDao(Contents contents)
Get a Tile DAO from Contents- Specified by:
getTileDaoin interfaceGeoPackage- Parameters:
contents- contents- Returns:
- tile dao
-
getTileDao
public TileDao getTileDao(TileTable table)
Get a Tile DAO from a table- Specified by:
getTileDaoin interfaceGeoPackage- Parameters:
table- tile table- Returns:
- tile dao
-
getTileDao
public TileDao getTileDao(String tableName)
Get a Tile DAO from a table name- Specified by:
getTileDaoin interfaceGeoPackage- Parameters:
tableName- table name- Returns:
- tile dao
-
getAttributesDao
public AttributesDao getAttributesDao(Contents contents)
Get an Attributes DAO from Contents- Specified by:
getAttributesDaoin interfaceGeoPackage- Parameters:
contents- contents- Returns:
- attributes dao
-
getAttributesDao
public AttributesDao getAttributesDao(AttributesTable table)
Get an Attributes DAO from a table- Specified by:
getAttributesDaoin interfaceGeoPackage- Parameters:
table- attributes table- Returns:
- attributes dao
-
getAttributesDao
public AttributesDao getAttributesDao(String tableName)
Get an Attributes DAO from a table name- Specified by:
getAttributesDaoin interfaceGeoPackage- Parameters:
tableName- table name- Returns:
- attributes dao
-
getUserCustomDao
public UserCustomDao getUserCustomDao(String tableName)
Get a User Custom DAO from a table name- Specified by:
getUserCustomDaoin interfaceGeoPackage- Parameters:
tableName- table name- Returns:
- user custom dao
-
getUserCustomDao
public UserCustomDao getUserCustomDao(UserCustomTable table)
Get a User Custom DAO from a table- Specified by:
getUserCustomDaoin interfaceGeoPackage- Parameters:
table- table- Returns:
- user custom dao
-
getUserDao
public UserDao<?,?,?,?> getUserDao(String tableName)
Get a User DAO from a table- Specified by:
getUserDaoin interfaceGeoPackage- Parameters:
tableName- table name- Returns:
- user dao
-
execSQL
public void execSQL(String sql)
- Specified by:
execSQLin interfaceGeoPackageCore
-
beginTransaction
public void beginTransaction()
- Specified by:
beginTransactionin interfaceGeoPackageCore
-
endTransaction
public void endTransaction(boolean successful)
- Specified by:
endTransactionin interfaceGeoPackageCore
-
commit
public void commit()
- Specified by:
commitin interfaceGeoPackageCore
-
inTransaction
public boolean inTransaction()
- Specified by:
inTransactionin interfaceGeoPackageCore
-
query
public ResultSet query(String sql, String[] args)
Perform a query on the database- Specified by:
queryin interfaceGeoPackage- Parameters:
sql- sql statementargs- arguments- Returns:
- result set
-
getConnection
public GeoPackageConnection getConnection()
Get the GeoPackage connection- Specified by:
getConnectionin interfaceGeoPackage- Returns:
- GeoPackage connection
-
size
public long size()
Size of the database in bytes- Specified by:
sizein interfaceGeoPackage- Returns:
- bytes
-
readableSize
public String readableSize()
Get a readable version of the database size- Specified by:
readableSizein interfaceGeoPackage- Returns:
- size
-
foreignKeyCheck
public ResultSet foreignKeyCheck()
Perform a foreign key check on the database- Specified by:
foreignKeyCheckin interfaceGeoPackage- Returns:
- null if check passed, open result set with results if failed
-
foreignKeyCheck
public ResultSet foreignKeyCheck(String tableName)
Perform a foreign key check on the database table- Specified by:
foreignKeyCheckin interfaceGeoPackage- Parameters:
tableName- table name- Returns:
- null if check passed, open result set with results if failed
-
integrityCheck
public ResultSet integrityCheck()
Perform an integrity check on the database- Specified by:
integrityCheckin interfaceGeoPackage- Returns:
- null if check passed, open result set with results if failed
-
quickCheck
public ResultSet quickCheck()
Perform a quick integrity check on the database- Specified by:
quickCheckin interfaceGeoPackage- Returns:
- null if check passed, open result set with results if failed
-
-