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 protected
GeoPackageImpl(String name, File file, GeoPackageConnection database)
Constructorprotected
GeoPackageImpl(String name, File file, GeoPackageConnection database, boolean writable)
Constructorprotected
GeoPackageImpl(String name, String path, GeoPackageConnection database)
Constructorprotected
GeoPackageImpl(String name, String path, GeoPackageConnection database, boolean writable)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginTransaction()
void
commit()
void
endTransaction(boolean successful)
void
execSQL(String sql)
ResultSet
foreignKeyCheck()
Perform a foreign key check on the databaseResultSet
foreignKeyCheck(String tableName)
Perform a foreign key check on the database tableAttributesDao
getAttributesDao(String tableName)
Get an Attributes DAO from a table nameAttributesDao
getAttributesDao(AttributesTable table)
Get an Attributes DAO from a tableAttributesDao
getAttributesDao(Contents contents)
Get an Attributes DAO from ContentsGeoPackageConnection
getConnection()
Get the GeoPackage connectionBoundingBox
getFeatureBoundingBox(Projection projection, String table, boolean manual)
FeatureDao
getFeatureDao(String tableName)
Get a Feature DAO from a table nameFeatureDao
getFeatureDao(Contents contents)
Get a Feature DAO from ContentsFeatureDao
getFeatureDao(GeometryColumns geometryColumns)
Get a Feature DAO from Geometry ColumnsFeatureDao
getFeatureDao(FeatureTable table)
Get a Feature DAO from a tableTileDao
getTileDao(String tableName)
Get a Tile DAO from a table nameTileDao
getTileDao(Contents contents)
Get a Tile DAO from ContentsTileDao
getTileDao(TileMatrixSet tileMatrixSet)
Get a Tile DAO from Tile Matrix SetTileDao
getTileDao(TileTable table)
Get a Tile DAO from a tableUserCustomDao
getUserCustomDao(String tableName)
Get a User Custom DAO from a table nameUserCustomDao
getUserCustomDao(UserCustomTable table)
Get a User Custom DAO from a tableUserDao<?,?,?,?>
getUserDao(String tableName)
Get a User DAO from a tableResultSet
integrityCheck()
Perform an integrity check on the databaseboolean
inTransaction()
ResultSet
query(String sql, String[] args)
Perform a query on the databaseResultSet
quickCheck()
Perform a quick integrity check on the databaseString
readableSize()
Get a readable version of the database sizelong
size()
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:
getFeatureBoundingBox
in interfaceGeoPackageCore
-
getFeatureDao
public FeatureDao getFeatureDao(GeometryColumns geometryColumns)
Get a Feature DAO from Geometry Columns- Specified by:
getFeatureDao
in interfaceGeoPackage
- Parameters:
geometryColumns
- geometry columns- Returns:
- feature dao
-
getFeatureDao
public FeatureDao getFeatureDao(Contents contents)
Get a Feature DAO from Contents- Specified by:
getFeatureDao
in interfaceGeoPackage
- Parameters:
contents
- contents- Returns:
- feature dao
-
getFeatureDao
public FeatureDao getFeatureDao(FeatureTable table)
Get a Feature DAO from a table- Specified by:
getFeatureDao
in interfaceGeoPackage
- Parameters:
table
- feature table- Returns:
- feature dao
-
getFeatureDao
public FeatureDao getFeatureDao(String tableName)
Get a Feature DAO from a table name- Specified by:
getFeatureDao
in interfaceGeoPackage
- Parameters:
tableName
- table name- Returns:
- feature dao
-
getTileDao
public TileDao getTileDao(TileMatrixSet tileMatrixSet)
Get a Tile DAO from Tile Matrix Set- Specified by:
getTileDao
in interfaceGeoPackage
- Parameters:
tileMatrixSet
- tile matrix set- Returns:
- tile dao
-
getTileDao
public TileDao getTileDao(Contents contents)
Get a Tile DAO from Contents- Specified by:
getTileDao
in interfaceGeoPackage
- Parameters:
contents
- contents- Returns:
- tile dao
-
getTileDao
public TileDao getTileDao(TileTable table)
Get a Tile DAO from a table- Specified by:
getTileDao
in interfaceGeoPackage
- Parameters:
table
- tile table- Returns:
- tile dao
-
getTileDao
public TileDao getTileDao(String tableName)
Get a Tile DAO from a table name- Specified by:
getTileDao
in interfaceGeoPackage
- Parameters:
tableName
- table name- Returns:
- tile dao
-
getAttributesDao
public AttributesDao getAttributesDao(Contents contents)
Get an Attributes DAO from Contents- Specified by:
getAttributesDao
in interfaceGeoPackage
- Parameters:
contents
- contents- Returns:
- attributes dao
-
getAttributesDao
public AttributesDao getAttributesDao(AttributesTable table)
Get an Attributes DAO from a table- Specified by:
getAttributesDao
in interfaceGeoPackage
- Parameters:
table
- attributes table- Returns:
- attributes dao
-
getAttributesDao
public AttributesDao getAttributesDao(String tableName)
Get an Attributes DAO from a table name- Specified by:
getAttributesDao
in 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:
getUserCustomDao
in 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:
getUserCustomDao
in interfaceGeoPackage
- Parameters:
table
- table- Returns:
- user custom dao
-
getUserDao
public UserDao<?,?,?,?> getUserDao(String tableName)
Get a User DAO from a table- Specified by:
getUserDao
in interfaceGeoPackage
- Parameters:
tableName
- table name- Returns:
- user dao
-
execSQL
public void execSQL(String sql)
- 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
-
query
public ResultSet query(String sql, String[] args)
Perform a query on the database- Specified by:
query
in interfaceGeoPackage
- Parameters:
sql
- sql statementargs
- arguments- Returns:
- result set
-
getConnection
public GeoPackageConnection getConnection()
Get the GeoPackage connection- Specified by:
getConnection
in interfaceGeoPackage
- Returns:
- GeoPackage connection
-
size
public long size()
Size of the database in bytes- Specified by:
size
in interfaceGeoPackage
- Returns:
- bytes
-
readableSize
public String readableSize()
Get a readable version of the database size- Specified by:
readableSize
in interfaceGeoPackage
- Returns:
- size
-
foreignKeyCheck
public ResultSet foreignKeyCheck()
Perform a foreign key check on the database- Specified by:
foreignKeyCheck
in 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:
foreignKeyCheck
in 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:
integrityCheck
in 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:
quickCheck
in interfaceGeoPackage
- Returns:
- null if check passed, open result set with results if failed
-
-