Package mil.nga.geopackage
Class GeoPackageManagerImpl
java.lang.Object
mil.nga.geopackage.GeoPackageManagerImpl
- All Implemented Interfaces:
GeoPackageManager
- Direct Known Subclasses:
DGIWGGeoPackageManager
GeoPackage Database management implementation
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Copy the databaseboolean
copy
(String database, String databaseCopy, GeoPackageProgress progress) Copy the databaseint
count()
Get the count of GeoPackage databasesboolean
Create a new GeoPackage databaseboolean
createAtPath
(String database, File path) Create a new GeoPackage database at the provided directory pathboolean
createFile
(androidx.documentfile.provider.DocumentFile file) Create a new GeoPackage database at the specified file locationboolean
createFile
(File file) Create a new GeoPackage database at the specified file locationboolean
createFile
(String database, androidx.documentfile.provider.DocumentFile file) Create a new GeoPackage database at the specified file location with the provided nameboolean
createFile
(String database, File file) Create a new GeoPackage database at the specified file location with the provided nameList all GeoPackage databases sorted alphabeticallySet of all GeoPackage databasesdatabasesLike
(String like) List GeoPackage databases that match the provided like argumentdatabasesNotLike
(String notLike) List GeoPackage databases that do not match the provided like argumentboolean
Delete a databaseboolean
Delete all databasesboolean
Delete all external GeoPackagesboolean
Delete all external GeoPackages where the external file can no longer be foundboolean
Determine if the database existsboolean
existsAtExternalFile
(androidx.documentfile.provider.DocumentFile file) Determine if a database exists at the provided external document fileboolean
existsAtExternalFile
(File file) Determine if a database exists at the provided external fileboolean
existsAtExternalPath
(String path) Determine if a database exists at the provided external file pathvoid
exportGeoPackage
(String database, Uri uri, ContentValues contentValues) Export a GeoPackage database to a Urivoid
exportGeoPackage
(String database, Uri uri, ContentValues contentValues, GeoPackageProgress progress) Export a GeoPackage database to a Urivoid
exportGeoPackage
(String database, androidx.documentfile.provider.DocumentFile file) Export a GeoPackage database to a document filevoid
exportGeoPackage
(String database, androidx.documentfile.provider.DocumentFile file, GeoPackageProgress progress) Export a GeoPackage database to a document filevoid
exportGeoPackage
(String database, File directory) Export a GeoPackage database to a filevoid
exportGeoPackage
(String database, File directory, GeoPackageProgress progress) Export a GeoPackage database to a filevoid
exportGeoPackage
(String database, String relativePath, Uri uri) Export a GeoPackage database to a media storevoid
exportGeoPackage
(String database, String relativePath, Uri uri, GeoPackageProgress progress) Export a GeoPackage database to a media storevoid
exportGeoPackage
(String database, String name, File directory) Export a GeoPackage database to a filevoid
exportGeoPackage
(String database, String name, File directory, GeoPackageProgress progress) Export a GeoPackage database to a filevoid
exportGeoPackage
(String database, String name, String relativePath, Uri uri) Export a GeoPackage database to a media storevoid
exportGeoPackage
(String database, String name, String relativePath, Uri uri, GeoPackageProgress progress) Export a GeoPackage database to a media storeint
Get the count of external GeoPackage databasesList all external GeoPackage databases sorted alphabeticallySet of all external GeoPackage databasesGet the application contextprotected String
getDatabase
(File file) Get the database name from the filegetDatabaseAtExternalFile
(androidx.documentfile.provider.DocumentFile file) Get the database name at the external fileGet the database name at the external fileGet the database name at the external file pathandroidx.documentfile.provider.DocumentFile
getDocumentFile
(String database) Get the document file of the databaseprotected File
getFile
(androidx.documentfile.provider.DocumentFile file) Get a file from the document fileGet the file of the databaseGet the ignored internal databasesGet the path of the databasevoid
ignoreInternal
(String database) Ignore an internal database by nameboolean
importGeoPackage
(androidx.documentfile.provider.DocumentFile file) Import a GeoPackage fileboolean
importGeoPackage
(androidx.documentfile.provider.DocumentFile file, boolean override) Import a GeoPackage fileboolean
importGeoPackage
(androidx.documentfile.provider.DocumentFile file, boolean override, GeoPackageProgress progress) Import a GeoPackage fileboolean
importGeoPackage
(androidx.documentfile.provider.DocumentFile file, GeoPackageProgress progress) Import a GeoPackage fileboolean
importGeoPackage
(File file) Import a GeoPackage fileboolean
importGeoPackage
(File file, boolean override) Import a GeoPackage fileboolean
importGeoPackage
(File file, boolean override, GeoPackageProgress progress) Import a GeoPackage fileboolean
importGeoPackage
(File file, GeoPackageProgress progress) Import a GeoPackage fileboolean
importGeoPackage
(String name, androidx.documentfile.provider.DocumentFile file) Import a GeoPackage fileboolean
importGeoPackage
(String name, androidx.documentfile.provider.DocumentFile file, boolean override) Import a GeoPackage fileboolean
importGeoPackage
(String name, androidx.documentfile.provider.DocumentFile file, boolean override, GeoPackageProgress progress) Import a GeoPackage fileboolean
importGeoPackage
(String name, androidx.documentfile.provider.DocumentFile file, GeoPackageProgress progress) Import a GeoPackage fileboolean
importGeoPackage
(String name, File file) Import a GeoPackage fileboolean
importGeoPackage
(String name, File file, boolean override) Import a GeoPackage fileboolean
importGeoPackage
(String name, File file, boolean override, GeoPackageProgress progress) Import a GeoPackage fileboolean
importGeoPackage
(String name, File file, GeoPackageProgress progress) Import a GeoPackage fileboolean
importGeoPackage
(String database, InputStream stream) Import a GeoPackage streamboolean
importGeoPackage
(String database, InputStream stream, boolean override) Import a GeoPackage streamboolean
importGeoPackage
(String database, InputStream stream, boolean override, GeoPackageProgress progress) Import a GeoPackage streamboolean
importGeoPackage
(String database, InputStream stream, GeoPackageProgress progress) Import a GeoPackage streamboolean
importGeoPackage
(String name, URL url) Import a GeoPackage file from a URLboolean
importGeoPackage
(String name, URL url, boolean override) Import a GeoPackage file from a URLboolean
importGeoPackage
(String name, URL url, boolean override, GeoPackageProgress progress) Import a GeoPackage file from a URLboolean
importGeoPackage
(String name, URL url, GeoPackageProgress progress) Import a GeoPackage file from a URLboolean
importGeoPackageAsExternalLink
(androidx.documentfile.provider.DocumentFile file) Import an GeoPackage as an external file link without copying locallyboolean
importGeoPackageAsExternalLink
(androidx.documentfile.provider.DocumentFile file, boolean override) Import an GeoPackage as an external file link without copying locallyboolean
importGeoPackageAsExternalLink
(androidx.documentfile.provider.DocumentFile file, String database) Import an GeoPackage as an external file link without copying locallyboolean
importGeoPackageAsExternalLink
(androidx.documentfile.provider.DocumentFile file, String database, boolean override) Import an GeoPackage as an external file link without copying locallyboolean
Import an GeoPackage as an external file link without copying locallyboolean
importGeoPackageAsExternalLink
(File path, boolean override) Import an GeoPackage as an external file link without copying locallyboolean
importGeoPackageAsExternalLink
(File path, String database) Import an GeoPackage as an external file link without copying locallyboolean
importGeoPackageAsExternalLink
(File path, String database, boolean override) Import an GeoPackage as an external file link without copying locallyboolean
Import an GeoPackage as an external file link without copying locallyboolean
importGeoPackageAsExternalLink
(String path, boolean override) Import an GeoPackage as an external file link without copying locallyboolean
importGeoPackageAsExternalLink
(String path, String database) Import an GeoPackage as an external file link without copying locallyboolean
importGeoPackageAsExternalLink
(String path, String database, boolean override) Import an GeoPackage as an external file link without copying locallyvoid
includeInternal
(String database) Do not ignore an internal database by nameint
Get the count of internal GeoPackage databasesList all internal GeoPackage databases sorted alphabeticallySet of all internal GeoPackage databasesboolean
isExternal
(String database) Determine if the database is a linked external fileboolean
isIgnoredInternal
(String database) Is the database an ignored internal database by nameboolean
Is import database header validation enabled.boolean
Is import database integrity validation enabled.boolean
Is open database header validation enabled.boolean
Is open database integrity validation enabled.boolean
Is the SQLite write ahead logging setting enabled for connections.Open the databaseOpen the databaseopenExternal
(androidx.documentfile.provider.DocumentFile file) Open an external GeoPackageopenExternal
(androidx.documentfile.provider.DocumentFile file, boolean writable) Open an external GeoPackageopenExternal
(File path) Open an external GeoPackageopenExternal
(File path, boolean writable) Open an external GeoPackageopenExternal
(String path) Open an external GeoPackageopenExternal
(String path, boolean writable) Open an external GeoPackagereadableSize
(String database) Get a readable version of the database sizeboolean
Rename the database to the new namevoid
setImportHeaderValidation
(boolean enabled) Set the import database header validation setting.void
setImportIntegrityValidation
(boolean enabled) Set the import database integrity validation setting.void
setOpenHeaderValidation
(boolean enabled) Set the open database header validation setting.void
setOpenIntegrityValidation
(boolean enabled) Set the open database integrity validation setting.void
setSqliteWriteAheadLogging
(boolean enabled) Set the SQLite write ahead logging setting for connections.long
Size of the database in bytesboolean
Validate the database header and integrity.boolean
validateHeader
(String database) Validate the database header.boolean
validateIntegrity
(String database) Validate the database integrity.
-
Constructor Details
-
GeoPackageManagerImpl
Constructor- Parameters:
context
- context
-
-
Method Details
-
getContext
Get the application context- Specified by:
getContext
in interfaceGeoPackageManager
- Returns:
- context
-
databases
List all GeoPackage databases sorted alphabetically- Specified by:
databases
in interfaceGeoPackageManager
- Returns:
- database list
-
databasesLike
List GeoPackage databases that match the provided like argument- Specified by:
databasesLike
in interfaceGeoPackageManager
- Parameters:
like
- like argument, using % as a wild card- Returns:
- database names
-
databasesNotLike
List GeoPackage databases that do not match the provided like argument- Specified by:
databasesNotLike
in interfaceGeoPackageManager
- Parameters:
notLike
- not like argument, using % as a wild card- Returns:
- database names
-
internalDatabases
List all internal GeoPackage databases sorted alphabetically- Specified by:
internalDatabases
in interfaceGeoPackageManager
- Returns:
- internal database list
-
externalDatabases
List all external GeoPackage databases sorted alphabetically- Specified by:
externalDatabases
in interfaceGeoPackageManager
- Returns:
- external database list
-
count
public int count()Get the count of GeoPackage databases- Specified by:
count
in interfaceGeoPackageManager
- Returns:
- count
-
internalCount
public int internalCount()Get the count of internal GeoPackage databases- Specified by:
internalCount
in interfaceGeoPackageManager
- Returns:
- internal count
-
externalCount
public int externalCount()Get the count of external GeoPackage databases- Specified by:
externalCount
in interfaceGeoPackageManager
- Returns:
- external count
-
databaseSet
Set of all GeoPackage databases- Specified by:
databaseSet
in interfaceGeoPackageManager
- Returns:
- database set
-
internalDatabaseSet
Set of all internal GeoPackage databases- Specified by:
internalDatabaseSet
in interfaceGeoPackageManager
- Returns:
- internal database set
-
externalDatabaseSet
Set of all external GeoPackage databases- Specified by:
externalDatabaseSet
in interfaceGeoPackageManager
- Returns:
- external database set
-
exists
Determine if the database exists- Specified by:
exists
in interfaceGeoPackageManager
- Parameters:
database
- database name- Returns:
- true if exists
-
size
Size of the database in bytes- Specified by:
size
in interfaceGeoPackageManager
- Parameters:
database
- database name- Returns:
- bytes
-
isExternal
Determine if the database is a linked external file- Specified by:
isExternal
in interfaceGeoPackageManager
- Parameters:
database
- database name- Returns:
- external flag
-
existsAtExternalFile
Determine if a database exists at the provided external file- Specified by:
existsAtExternalFile
in interfaceGeoPackageManager
- Parameters:
file
- database file- Returns:
- true if exists
-
existsAtExternalPath
Determine if a database exists at the provided external file path- Specified by:
existsAtExternalPath
in interfaceGeoPackageManager
- Parameters:
path
- database file path- Returns:
- true if exists
-
existsAtExternalFile
public boolean existsAtExternalFile(androidx.documentfile.provider.DocumentFile file) Determine if a database exists at the provided external document file- Specified by:
existsAtExternalFile
in interfaceGeoPackageManager
- Parameters:
file
- document file- Returns:
- true if exists
-
getPath
Get the path of the database- Specified by:
getPath
in interfaceGeoPackageManager
- Parameters:
database
- database name- Returns:
- path
-
getFile
Get the file of the database- Specified by:
getFile
in interfaceGeoPackageManager
- Parameters:
database
- database name- Returns:
- file
-
getDocumentFile
Get the document file of the database- Specified by:
getDocumentFile
in interfaceGeoPackageManager
- Parameters:
database
- database name- Returns:
- document file
-
getDatabaseAtExternalFile
Get the database name at the external file- Specified by:
getDatabaseAtExternalFile
in interfaceGeoPackageManager
- Parameters:
file
- database file- Returns:
- database name or null if does not exist
-
getDatabaseAtExternalPath
Get the database name at the external file path- Specified by:
getDatabaseAtExternalPath
in interfaceGeoPackageManager
- Parameters:
path
- database file path- Returns:
- database name or null if does not exist
-
getDatabaseAtExternalFile
Get the database name at the external file- Specified by:
getDatabaseAtExternalFile
in interfaceGeoPackageManager
- Parameters:
file
- database document file- Returns:
- database name or null if does not exist
-
readableSize
Get a readable version of the database size- Specified by:
readableSize
in interfaceGeoPackageManager
- Parameters:
database
- database name- Returns:
- size
-
delete
Delete a database- Specified by:
delete
in interfaceGeoPackageManager
- Parameters:
database
- database name- Returns:
- true if deleted
-
deleteAll
public boolean deleteAll()Delete all databases- Specified by:
deleteAll
in interfaceGeoPackageManager
- Returns:
- true if deleted
-
deleteAllExternal
public boolean deleteAllExternal()Delete all external GeoPackages- Specified by:
deleteAllExternal
in interfaceGeoPackageManager
- Returns:
- true if deleted
-
deleteAllMissingExternal
public boolean deleteAllMissingExternal()Delete all external GeoPackages where the external file can no longer be found- Specified by:
deleteAllMissingExternal
in interfaceGeoPackageManager
- Returns:
- true if any were deleted
-
create
Create a new GeoPackage database- Specified by:
create
in interfaceGeoPackageManager
- Parameters:
database
- database name- Returns:
- true if created
-
createAtPath
Create a new GeoPackage database at the provided directory path- Specified by:
createAtPath
in interfaceGeoPackageManager
- Parameters:
database
- database namepath
- directory path- Returns:
- true if created
-
createFile
Create a new GeoPackage database at the specified file location- Specified by:
createFile
in interfaceGeoPackageManager
- Parameters:
file
- GeoPackage file path- Returns:
- true if created
-
createFile
Create a new GeoPackage database at the specified file location with the provided name- Specified by:
createFile
in interfaceGeoPackageManager
- Parameters:
database
- database namefile
- GeoPackage file path- Returns:
- true if created
-
createFile
public boolean createFile(androidx.documentfile.provider.DocumentFile file) Create a new GeoPackage database at the specified file location- Specified by:
createFile
in interfaceGeoPackageManager
- Parameters:
file
- GeoPackage document file- Returns:
- true if created
-
createFile
Create a new GeoPackage database at the specified file location with the provided name- Specified by:
createFile
in interfaceGeoPackageManager
- Parameters:
database
- database namefile
- GeoPackage document file- Returns:
- true if created
-
importGeoPackage
Import a GeoPackage file- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
file
- GeoPackage file to import- Returns:
- true if loaded
-
importGeoPackage
Import a GeoPackage file- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
file
- GeoPackage file to importprogress
- progress tracker- Returns:
- true if loaded
-
importGeoPackage
Import a GeoPackage file- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
file
- GeoPackage file to importoverride
- true to override existing- Returns:
- true if created successfully
-
importGeoPackage
Import a GeoPackage file- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
file
- GeoPackage file to importoverride
- true to override existingprogress
- progress tracker- Returns:
- true if created successfully
-
importGeoPackage
Import a GeoPackage file- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
name
- database name to save asfile
- GeoPackage file to import- Returns:
- true if created successfully
-
importGeoPackage
Import a GeoPackage file- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
name
- database name to save asfile
- GeoPackage file to importprogress
- progress tracker- Returns:
- true if created successfully
-
importGeoPackage
Import a GeoPackage file- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
name
- database name to save the imported file asfile
- GeoPackage file to importoverride
- true to override existing- Returns:
- true if created successfully
-
importGeoPackage
public boolean importGeoPackage(String name, File file, boolean override, GeoPackageProgress progress) Import a GeoPackage file- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
name
- database name to save the imported file asfile
- GeoPackage file to importoverride
- true to override existingprogress
- progress tracker- Returns:
- true if created successfully
-
importGeoPackage
public boolean importGeoPackage(androidx.documentfile.provider.DocumentFile file) Import a GeoPackage file- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
file
- GeoPackage document file to import- Returns:
- true if loaded
-
importGeoPackage
public boolean importGeoPackage(androidx.documentfile.provider.DocumentFile file, GeoPackageProgress progress) Import a GeoPackage file- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
file
- GeoPackage document file to importprogress
- progress tracker- Returns:
- true if loaded
-
importGeoPackage
public boolean importGeoPackage(androidx.documentfile.provider.DocumentFile file, boolean override) Import a GeoPackage file- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
file
- GeoPackage document file to importoverride
- true to override existing- Returns:
- true if created successfully
-
importGeoPackage
public boolean importGeoPackage(androidx.documentfile.provider.DocumentFile file, boolean override, GeoPackageProgress progress) Import a GeoPackage file- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
file
- GeoPackage document file to importoverride
- true to override existingprogress
- progress tracker- Returns:
- true if created successfully
-
importGeoPackage
Import a GeoPackage file- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
name
- database name to save asfile
- GeoPackage document file to import- Returns:
- true if created successfully
-
importGeoPackage
public boolean importGeoPackage(String name, androidx.documentfile.provider.DocumentFile file, GeoPackageProgress progress) Import a GeoPackage file- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
name
- database name to save asfile
- GeoPackage document file to importprogress
- progress tracker- Returns:
- true if created successfully
-
importGeoPackage
public boolean importGeoPackage(String name, androidx.documentfile.provider.DocumentFile file, boolean override) Import a GeoPackage file- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
name
- database name to save the imported file asfile
- GeoPackage document file to importoverride
- true to override existing- Returns:
- true if created successfully
-
importGeoPackage
public boolean importGeoPackage(String name, androidx.documentfile.provider.DocumentFile file, boolean override, GeoPackageProgress progress) Import a GeoPackage file- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
name
- database name to save the imported file asfile
- GeoPackage document file to importoverride
- true to override existingprogress
- progress tracker- Returns:
- true if created successfully
-
importGeoPackage
Import a GeoPackage stream- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
database
- database name to save asstream
- GeoPackage stream to import- Returns:
- true if loaded
-
importGeoPackage
Import a GeoPackage stream- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
database
- database name to save asstream
- GeoPackage stream to importprogress
- progress tracker- Returns:
- true if loaded
-
importGeoPackage
Import a GeoPackage stream- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
database
- database name to save asstream
- GeoPackage stream to importoverride
- true to override existing- Returns:
- true if created successfully
-
importGeoPackage
public boolean importGeoPackage(String database, InputStream stream, boolean override, GeoPackageProgress progress) Import a GeoPackage stream- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
database
- database name to save asstream
- GeoPackage stream to importoverride
- true to override existingprogress
- progress tracker- Returns:
- true if created successfully
-
importGeoPackage
Import a GeoPackage file from a URL- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
name
- GeoPackage nameurl
- url- Returns:
- true if created successfully
-
importGeoPackage
Import a GeoPackage file from a URL- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
name
- GeoPackage nameurl
- urlprogress
- progress tracker- Returns:
- true if created successfully
-
importGeoPackage
Import a GeoPackage file from a URL- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
name
- GeoPackage nameurl
- urloverride
- override flag- Returns:
- true if created successfully
-
importGeoPackage
public boolean importGeoPackage(String name, URL url, boolean override, GeoPackageProgress progress) Import a GeoPackage file from a URL- Specified by:
importGeoPackage
in interfaceGeoPackageManager
- Parameters:
name
- GeoPackage nameurl
- urloverride
- override flagprogress
- progress tracker- Returns:
- true if created successfully
-
exportGeoPackage
Export a GeoPackage database to a file- Specified by:
exportGeoPackage
in interfaceGeoPackageManager
- Parameters:
database
- database namedirectory
- export directory
-
exportGeoPackage
Export a GeoPackage database to a file- Specified by:
exportGeoPackage
in interfaceGeoPackageManager
- Parameters:
database
- database namedirectory
- export directoryprogress
- progress tracker
-
exportGeoPackage
Export a GeoPackage database to a file- Specified by:
exportGeoPackage
in interfaceGeoPackageManager
- Parameters:
database
- database namename
- namedirectory
- export directory
-
exportGeoPackage
public void exportGeoPackage(String database, String name, File directory, GeoPackageProgress progress) Export a GeoPackage database to a file- Specified by:
exportGeoPackage
in interfaceGeoPackageManager
- Parameters:
database
- database namename
- namedirectory
- export directoryprogress
- progress tracker
-
exportGeoPackage
Export a GeoPackage database to a document file- Specified by:
exportGeoPackage
in interfaceGeoPackageManager
- Parameters:
database
- database namefile
- export document file
-
exportGeoPackage
public void exportGeoPackage(String database, androidx.documentfile.provider.DocumentFile file, GeoPackageProgress progress) Export a GeoPackage database to a document file- Specified by:
exportGeoPackage
in interfaceGeoPackageManager
- Parameters:
database
- database namefile
- export document fileprogress
- progress tracker
-
exportGeoPackage
Export a GeoPackage database to a media store- Specified by:
exportGeoPackage
in interfaceGeoPackageManager
- Parameters:
database
- database namerelativePath
- Relative path of this media item within the storage device where it is persisteduri
- The URL of the table to insert into- Throws:
IOException
- upon error- See Also:
-
exportGeoPackage
public void exportGeoPackage(String database, String relativePath, Uri uri, GeoPackageProgress progress) throws IOException Export a GeoPackage database to a media store- Specified by:
exportGeoPackage
in interfaceGeoPackageManager
- Parameters:
database
- database namerelativePath
- Relative path of this media item within the storage device where it is persisteduri
- The URL of the table to insert intoprogress
- progress tracker- Throws:
IOException
- upon error- See Also:
-
exportGeoPackage
public void exportGeoPackage(String database, String name, String relativePath, Uri uri) throws IOException Export a GeoPackage database to a media store- Specified by:
exportGeoPackage
in interfaceGeoPackageManager
- Parameters:
database
- database namename
- namerelativePath
- Relative path of this media item within the storage device where it is persisteduri
- The URL of the table to insert into- Throws:
IOException
- upon error- See Also:
-
exportGeoPackage
public void exportGeoPackage(String database, String name, String relativePath, Uri uri, GeoPackageProgress progress) throws IOException Export a GeoPackage database to a media store- Specified by:
exportGeoPackage
in interfaceGeoPackageManager
- Parameters:
database
- database namename
- namerelativePath
- Relative path of this media item within the storage device where it is persisteduri
- The URL of the table to insert intoprogress
- progress tracker- Throws:
IOException
- upon error- See Also:
-
exportGeoPackage
public void exportGeoPackage(String database, Uri uri, ContentValues contentValues) throws IOException Export a GeoPackage database to a Uri- Specified by:
exportGeoPackage
in interfaceGeoPackageManager
- Parameters:
database
- database nameuri
- The URL of the table to insert intocontentValues
- The initial values for the newly inserted row- Throws:
IOException
- upon error- See Also:
-
exportGeoPackage
public void exportGeoPackage(String database, Uri uri, ContentValues contentValues, GeoPackageProgress progress) throws IOException Export a GeoPackage database to a Uri- Specified by:
exportGeoPackage
in interfaceGeoPackageManager
- Parameters:
database
- database nameuri
- The URL of the table to insert intocontentValues
- The initial values for the newly inserted rowprogress
- progress tracker- Throws:
IOException
- upon error- See Also:
-
open
Open the database- Specified by:
open
in interfaceGeoPackageManager
- Parameters:
database
- database name- Returns:
- open GeoPackage
-
open
Open the database- Specified by:
open
in interfaceGeoPackageManager
- Parameters:
database
- database namewritable
- true to open as writable, false as read only- Returns:
- open GeoPackage
-
openExternal
Open an external GeoPackage- Specified by:
openExternal
in interfaceGeoPackageManager
- Parameters:
path
- full file path- Returns:
- open GeoPackage
-
openExternal
Open an external GeoPackage- Specified by:
openExternal
in interfaceGeoPackageManager
- Parameters:
path
- full file pathwritable
- true to open as writable, false as read only- Returns:
- 5.1.0
-
openExternal
Open an external GeoPackage- Specified by:
openExternal
in interfaceGeoPackageManager
- Parameters:
path
- full file path- Returns:
- open GeoPackage
-
openExternal
Open an external GeoPackage- Specified by:
openExternal
in interfaceGeoPackageManager
- Parameters:
path
- full file pathwritable
- true to open as writable, false as read only- Returns:
- 5.1.0
-
openExternal
Open an external GeoPackage- Specified by:
openExternal
in interfaceGeoPackageManager
- Parameters:
file
- document file- Returns:
- open GeoPackage
-
openExternal
Open an external GeoPackage- Specified by:
openExternal
in interfaceGeoPackageManager
- Parameters:
file
- document filewritable
- true to open as writable, false as read only- Returns:
- 5.1.0
-
isImportHeaderValidation
public boolean isImportHeaderValidation()Is import database header validation enabled. This causes a small time increase when importing a database to check the header bytes. On by default.- Specified by:
isImportHeaderValidation
in interfaceGeoPackageManager
- Returns:
- true if enabled
-
setImportHeaderValidation
public void setImportHeaderValidation(boolean enabled) Set the import database header validation setting. This causes a small time increase when importing a database to check the header bytes. On by default.- Specified by:
setImportHeaderValidation
in interfaceGeoPackageManager
- Parameters:
enabled
- true to enable, false to disable
-
isImportIntegrityValidation
public boolean isImportIntegrityValidation()Is import database integrity validation enabled. This causes a noticeable time increase when importing a database to check the database integrity. Off by default.- Specified by:
isImportIntegrityValidation
in interfaceGeoPackageManager
- Returns:
- true if enabled
-
setImportIntegrityValidation
public void setImportIntegrityValidation(boolean enabled) Set the import database integrity validation setting. This causes a noticeable time increase when importing a database to check the database integrity. Off by default.- Specified by:
setImportIntegrityValidation
in interfaceGeoPackageManager
- Parameters:
enabled
- true to enable, false to disable
-
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.- Specified by:
isOpenHeaderValidation
in interfaceGeoPackageManager
- 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.- Specified by:
setOpenHeaderValidation
in interfaceGeoPackageManager
- 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.- Specified by:
isOpenIntegrityValidation
in interfaceGeoPackageManager
- 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.- Specified by:
setOpenIntegrityValidation
in interfaceGeoPackageManager
- 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.- Specified by:
isSqliteWriteAheadLogging
in interfaceGeoPackageManager
- Returns:
- write ahead logging state
-
setSqliteWriteAheadLogging
public void setSqliteWriteAheadLogging(boolean enabled) Set the SQLite write ahead logging setting for connections. Off by default.- Specified by:
setSqliteWriteAheadLogging
in interfaceGeoPackageManager
- Parameters:
enabled
- true to enable, false to disable
-
getIgnoredInternals
Get the ignored internal databases- Specified by:
getIgnoredInternals
in interfaceGeoPackageManager
- Returns:
- databases
-
isIgnoredInternal
Is the database an ignored internal database by name- Specified by:
isIgnoredInternal
in interfaceGeoPackageManager
- Parameters:
database
- database name- Returns:
- true if ignored
-
ignoreInternal
Ignore an internal database by name- Specified by:
ignoreInternal
in interfaceGeoPackageManager
- Parameters:
database
- database name
-
includeInternal
Do not ignore an internal database by name- Specified by:
includeInternal
in interfaceGeoPackageManager
- Parameters:
database
- database name
-
validate
Validate the database header and integrity.- Specified by:
validate
in interfaceGeoPackageManager
- Parameters:
database
- database name- Returns:
- true if valid, false if not
-
validateHeader
Validate the database header. Checks the beginning bytes for the SQLite header string.- Specified by:
validateHeader
in interfaceGeoPackageManager
- Parameters:
database
- database name- Returns:
- true if valid, false if not
-
validateIntegrity
Validate the database integrity. Performs a database integrity ok check.- Specified by:
validateIntegrity
in interfaceGeoPackageManager
- Parameters:
database
- database name- Returns:
- true if valid, false if not
-
copy
Copy the database- Specified by:
copy
in interfaceGeoPackageManager
- Parameters:
database
- database namedatabaseCopy
- database copy name- Returns:
- true if copied
-
copy
Copy the database- Specified by:
copy
in interfaceGeoPackageManager
- Parameters:
database
- database namedatabaseCopy
- database copy nameprogress
- progress tracker- Returns:
- true if copied
-
rename
Rename the database to the new name- Specified by:
rename
in interfaceGeoPackageManager
- Parameters:
database
- database namenewDatabase
- new database name- Returns:
- true if renamed
-
importGeoPackageAsExternalLink
Import an GeoPackage as an external file link without copying locally- Specified by:
importGeoPackageAsExternalLink
in interfaceGeoPackageManager
- Parameters:
path
- full file path- Returns:
- true if imported successfully
-
importGeoPackageAsExternalLink
Import an GeoPackage as an external file link without copying locally- Specified by:
importGeoPackageAsExternalLink
in interfaceGeoPackageManager
- Parameters:
path
- full file pathdatabase
- name to reference the database- Returns:
- true if imported successfully
-
importGeoPackageAsExternalLink
Import an GeoPackage as an external file link without copying locally- Specified by:
importGeoPackageAsExternalLink
in interfaceGeoPackageManager
- Parameters:
path
- full file pathoverride
- true to delete an existing database- Returns:
- true if imported successfully
-
importGeoPackageAsExternalLink
Import an GeoPackage as an external file link without copying locally- Specified by:
importGeoPackageAsExternalLink
in interfaceGeoPackageManager
- Parameters:
path
- full file pathdatabase
- name to reference the databaseoverride
- true to delete an existing database- Returns:
- true if imported successfully
-
importGeoPackageAsExternalLink
Import an GeoPackage as an external file link without copying locally- Specified by:
importGeoPackageAsExternalLink
in interfaceGeoPackageManager
- Parameters:
path
- full file path- Returns:
- true if imported successfully
-
importGeoPackageAsExternalLink
Import an GeoPackage as an external file link without copying locally- Specified by:
importGeoPackageAsExternalLink
in interfaceGeoPackageManager
- Parameters:
path
- full file pathdatabase
- name to reference the database- Returns:
- true if imported successfully
-
importGeoPackageAsExternalLink
Import an GeoPackage as an external file link without copying locally- Specified by:
importGeoPackageAsExternalLink
in interfaceGeoPackageManager
- Parameters:
path
- full file pathoverride
- true to delete an existing database- Returns:
- true if imported successfully
-
importGeoPackageAsExternalLink
Import an GeoPackage as an external file link without copying locally- Specified by:
importGeoPackageAsExternalLink
in interfaceGeoPackageManager
- Parameters:
path
- full file pathdatabase
- name to reference the databaseoverride
- true to delete an existing database- Returns:
- true if imported successfully
-
importGeoPackageAsExternalLink
public boolean importGeoPackageAsExternalLink(androidx.documentfile.provider.DocumentFile file) Import an GeoPackage as an external file link without copying locally- Specified by:
importGeoPackageAsExternalLink
in interfaceGeoPackageManager
- Parameters:
file
- document file- Returns:
- true if imported successfully
-
importGeoPackageAsExternalLink
public boolean importGeoPackageAsExternalLink(androidx.documentfile.provider.DocumentFile file, boolean override) Import an GeoPackage as an external file link without copying locally- Specified by:
importGeoPackageAsExternalLink
in interfaceGeoPackageManager
- Parameters:
file
- document fileoverride
- true to delete an existing database- Returns:
- true if imported successfully
-
importGeoPackageAsExternalLink
public boolean importGeoPackageAsExternalLink(androidx.documentfile.provider.DocumentFile file, String database) Import an GeoPackage as an external file link without copying locally- Specified by:
importGeoPackageAsExternalLink
in interfaceGeoPackageManager
- Parameters:
file
- document filedatabase
- name to reference the database- Returns:
- true if imported successfully
-
importGeoPackageAsExternalLink
public boolean importGeoPackageAsExternalLink(androidx.documentfile.provider.DocumentFile file, String database, boolean override) Import an GeoPackage as an external file link without copying locally- Specified by:
importGeoPackageAsExternalLink
in interfaceGeoPackageManager
- Parameters:
file
- document filedatabase
- name to reference the databaseoverride
- true to delete an existing database- Returns:
- true if imported successfully
-
getFile
Get a file from the document file- Parameters:
file
- document file- Returns:
- file
-
getDatabase
Get the database name from the file- Parameters:
file
- file- Returns:
- database name
-