Package mil.nga.geopackage
Class GeoPackageCreator
java.lang.Object
mil.nga.geopackage.GeoPackageCreator
GeoPackage Creator
- Since:
- 5.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorGeoPackageCreator(boolean openHeaderValidation, boolean openIntegrityValidation, boolean sqliteWriteAheadLogging) ConstructorGeoPackageCreator(android.content.Context context) ConstructorGeoPackageCreator(android.content.Context context, boolean openHeaderValidation, boolean openIntegrityValidation, boolean sqliteWriteAheadLogging) Constructor -
Method Summary
Modifier and TypeMethodDescriptioncreateGeoPackage(String database, String path, boolean writable, GeoPackageCursorFactory cursorFactory, android.database.sqlite.SQLiteDatabase sqlite) Create a GeoPackage for the connectionandroid.content.ContextGet the contextbooleanIs open database header validation enabled.booleanIs open database integrity validation enabled.booleanIs the SQLite write ahead logging setting enabled for connections.openExternal(String path, String database, boolean writable) Open an external GeoPackagevoidsetContext(android.content.Context context) Set the contextvoidsetOpenHeaderValidation(boolean enabled) Set the open database header validation setting.voidsetOpenIntegrityValidation(boolean enabled) Set the open database integrity validation setting.voidsetSqliteWriteAheadLogging(boolean enabled) Set the SQLite write ahead logging setting for connections.
-
Constructor Details
-
GeoPackageCreator
public GeoPackageCreator()Constructor -
GeoPackageCreator
public GeoPackageCreator(android.content.Context context) Constructor- Parameters:
context- context
-
GeoPackageCreator
public GeoPackageCreator(boolean openHeaderValidation, boolean openIntegrityValidation, boolean sqliteWriteAheadLogging) Constructor- Parameters:
openHeaderValidation- validate the database header when opening a databaseopenIntegrityValidation- validate the database integrity when opening a databasesqliteWriteAheadLogging- write ahead logging state for SQLite connections
-
GeoPackageCreator
public GeoPackageCreator(android.content.Context context, boolean openHeaderValidation, boolean openIntegrityValidation, boolean sqliteWriteAheadLogging) Constructor- Parameters:
context- contextopenHeaderValidation- validate the database header when opening a databaseopenIntegrityValidation- validate the database integrity when opening a databasesqliteWriteAheadLogging- write ahead logging state for SQLite connections
-
-
Method Details
-
getContext
public android.content.Context getContext()Get the context- Returns:
- context
-
setContext
public void setContext(android.content.Context context) Set the context- Parameters:
context- context
-
isOpenHeaderValidation
public boolean isOpenHeaderValidation()Is open database header validation enabled. This causes a small time increase when opening a database to check the header bytes. Off by default.- Returns:
- true if enabled
-
setOpenHeaderValidation
public void setOpenHeaderValidation(boolean enabled) Set the open database header validation setting. This causes a small time increase when opening a database to check the header bytes. Off by default.- Parameters:
enabled- true to enable, false to disable
-
isOpenIntegrityValidation
public boolean isOpenIntegrityValidation()Is open database integrity validation enabled. This causes a noticeable time increase when opening a database to check the database integrity. Off by default.- Returns:
- true if enabled
-
setOpenIntegrityValidation
public void setOpenIntegrityValidation(boolean enabled) Set the open database integrity validation setting. This causes a noticeable time increase when opening a database to check the database integrity. Off by default.- Parameters:
enabled- true to enable, false to disable
-
isSqliteWriteAheadLogging
public boolean isSqliteWriteAheadLogging()Is the SQLite write ahead logging setting enabled for connections. Off by default.- Returns:
- write ahead logging state
-
setSqliteWriteAheadLogging
public void setSqliteWriteAheadLogging(boolean enabled) Set the SQLite write ahead logging setting for connections. Off by default.- Parameters:
enabled- true to enable, false to disable
-
openExternal
Open an external GeoPackage- Parameters:
path- full file pathdatabase- database namewritable- true to open as writable, false as read only- Returns:
- GeoPackage
-
createGeoPackage
public GeoPackage createGeoPackage(String database, String path, boolean writable, GeoPackageCursorFactory cursorFactory, android.database.sqlite.SQLiteDatabase sqlite) Create a GeoPackage for the connection- Parameters:
database- database namepath- full file pathwritable- true to open as writable, false as read onlycursorFactory- GeoPackage cursor factorysqlite- SQLite database- Returns:
- GeoPackage
-