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
ConstructorsModifierConstructorDescriptionprotectedGeoPackageManagerImpl(android.content.Context context) Constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleanCopy the databasebooleancopy(String database, String databaseCopy, GeoPackageProgress progress) Copy the databaseintcount()Get the count of GeoPackage databasesbooleanCreate a new GeoPackage databasebooleancreateAtPath(String database, File path) Create a new GeoPackage database at the provided directory pathbooleancreateFile(androidx.documentfile.provider.DocumentFile file) Create a new GeoPackage database at the specified file locationbooleancreateFile(File file) Create a new GeoPackage database at the specified file locationbooleancreateFile(String database, androidx.documentfile.provider.DocumentFile file) Create a new GeoPackage database at the specified file location with the provided namebooleancreateFile(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 argumentbooleanDelete a databasebooleanDelete all databasesbooleanDelete all external GeoPackagesbooleanDelete all external GeoPackages where the external file can no longer be foundbooleanDetermine if the database existsbooleanexistsAtExternalFile(androidx.documentfile.provider.DocumentFile file) Determine if a database exists at the provided external document filebooleanexistsAtExternalFile(File file) Determine if a database exists at the provided external filebooleanexistsAtExternalPath(String path) Determine if a database exists at the provided external file pathvoidexportGeoPackage(String database, android.net.Uri uri, android.content.ContentValues contentValues) Export a GeoPackage database to a UrivoidexportGeoPackage(String database, android.net.Uri uri, android.content.ContentValues contentValues, GeoPackageProgress progress) Export a GeoPackage database to a UrivoidexportGeoPackage(String database, androidx.documentfile.provider.DocumentFile file) Export a GeoPackage database to a document filevoidexportGeoPackage(String database, androidx.documentfile.provider.DocumentFile file, GeoPackageProgress progress) Export a GeoPackage database to a document filevoidexportGeoPackage(String database, File directory) Export a GeoPackage database to a filevoidexportGeoPackage(String database, File directory, GeoPackageProgress progress) Export a GeoPackage database to a filevoidexportGeoPackage(String database, String relativePath, android.net.Uri uri) Export a GeoPackage database to a media storevoidexportGeoPackage(String database, String relativePath, android.net.Uri uri, GeoPackageProgress progress) Export a GeoPackage database to a media storevoidexportGeoPackage(String database, String name, File directory) Export a GeoPackage database to a filevoidexportGeoPackage(String database, String name, File directory, GeoPackageProgress progress) Export a GeoPackage database to a filevoidexportGeoPackage(String database, String name, String relativePath, android.net.Uri uri) Export a GeoPackage database to a media storevoidexportGeoPackage(String database, String name, String relativePath, android.net.Uri uri, GeoPackageProgress progress) Export a GeoPackage database to a media storeintGet the count of external GeoPackage databasesList all external GeoPackage databases sorted alphabeticallySet of all external GeoPackage databasesandroid.content.ContextGet the application contextprotected StringgetDatabase(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.DocumentFilegetDocumentFile(String database) Get the document file of the databaseprotected FilegetFile(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 databasevoidignoreInternal(String database) Ignore an internal database by namebooleanimportGeoPackage(androidx.documentfile.provider.DocumentFile file) Import a GeoPackage filebooleanimportGeoPackage(androidx.documentfile.provider.DocumentFile file, boolean override) Import a GeoPackage filebooleanimportGeoPackage(androidx.documentfile.provider.DocumentFile file, boolean override, GeoPackageProgress progress) Import a GeoPackage filebooleanimportGeoPackage(androidx.documentfile.provider.DocumentFile file, GeoPackageProgress progress) Import a GeoPackage filebooleanimportGeoPackage(File file) Import a GeoPackage filebooleanimportGeoPackage(File file, boolean override) Import a GeoPackage filebooleanimportGeoPackage(File file, boolean override, GeoPackageProgress progress) Import a GeoPackage filebooleanimportGeoPackage(File file, GeoPackageProgress progress) Import a GeoPackage filebooleanimportGeoPackage(String name, androidx.documentfile.provider.DocumentFile file) Import a GeoPackage filebooleanimportGeoPackage(String name, androidx.documentfile.provider.DocumentFile file, boolean override) Import a GeoPackage filebooleanimportGeoPackage(String name, androidx.documentfile.provider.DocumentFile file, boolean override, GeoPackageProgress progress) Import a GeoPackage filebooleanimportGeoPackage(String name, androidx.documentfile.provider.DocumentFile file, GeoPackageProgress progress) Import a GeoPackage filebooleanimportGeoPackage(String name, File file) Import a GeoPackage filebooleanimportGeoPackage(String name, File file, boolean override) Import a GeoPackage filebooleanimportGeoPackage(String name, File file, boolean override, GeoPackageProgress progress) Import a GeoPackage filebooleanimportGeoPackage(String name, File file, GeoPackageProgress progress) Import a GeoPackage filebooleanimportGeoPackage(String database, InputStream stream) Import a GeoPackage streambooleanimportGeoPackage(String database, InputStream stream, boolean override) Import a GeoPackage streambooleanimportGeoPackage(String database, InputStream stream, boolean override, GeoPackageProgress progress) Import a GeoPackage streambooleanimportGeoPackage(String database, InputStream stream, GeoPackageProgress progress) Import a GeoPackage streambooleanimportGeoPackage(String name, URL url) Import a GeoPackage file from a URLbooleanimportGeoPackage(String name, URL url, boolean override) Import a GeoPackage file from a URLbooleanimportGeoPackage(String name, URL url, boolean override, GeoPackageProgress progress) Import a GeoPackage file from a URLbooleanimportGeoPackage(String name, URL url, GeoPackageProgress progress) Import a GeoPackage file from a URLbooleanimportGeoPackageAsExternalLink(androidx.documentfile.provider.DocumentFile file) Import an GeoPackage as an external file link without copying locallybooleanimportGeoPackageAsExternalLink(androidx.documentfile.provider.DocumentFile file, boolean override) Import an GeoPackage as an external file link without copying locallybooleanimportGeoPackageAsExternalLink(androidx.documentfile.provider.DocumentFile file, String database) Import an GeoPackage as an external file link without copying locallybooleanimportGeoPackageAsExternalLink(androidx.documentfile.provider.DocumentFile file, String database, boolean override) Import an GeoPackage as an external file link without copying locallybooleanImport an GeoPackage as an external file link without copying locallybooleanimportGeoPackageAsExternalLink(File path, boolean override) Import an GeoPackage as an external file link without copying locallybooleanimportGeoPackageAsExternalLink(File path, String database) Import an GeoPackage as an external file link without copying locallybooleanimportGeoPackageAsExternalLink(File path, String database, boolean override) Import an GeoPackage as an external file link without copying locallybooleanImport an GeoPackage as an external file link without copying locallybooleanimportGeoPackageAsExternalLink(String path, boolean override) Import an GeoPackage as an external file link without copying locallybooleanimportGeoPackageAsExternalLink(String path, String database) Import an GeoPackage as an external file link without copying locallybooleanimportGeoPackageAsExternalLink(String path, String database, boolean override) Import an GeoPackage as an external file link without copying locallyvoidincludeInternal(String database) Do not ignore an internal database by nameintGet the count of internal GeoPackage databasesList all internal GeoPackage databases sorted alphabeticallySet of all internal GeoPackage databasesbooleanisExternal(String database) Determine if the database is a linked external filebooleanisIgnoredInternal(String database) Is the database an ignored internal database by namebooleanIs import database header validation enabled.booleanIs import database integrity validation enabled.booleanIs open database header validation enabled.booleanIs open database integrity validation enabled.booleanIs 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 sizebooleanRename the database to the new namevoidsetImportHeaderValidation(boolean enabled) Set the import database header validation setting.voidsetImportIntegrityValidation(boolean enabled) Set the import database integrity validation setting.voidsetOpenHeaderValidation(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.longSize of the database in bytesbooleanValidate the database header and integrity.booleanvalidateHeader(String database) Validate the database header.booleanvalidateIntegrity(String database) Validate the database integrity.
-
Constructor Details
-
GeoPackageManagerImpl
protected GeoPackageManagerImpl(android.content.Context context) Constructor- Parameters:
context- context
-
-
Method Details
-
getContext
public android.content.Context getContext()Get the application context- Specified by:
getContextin interfaceGeoPackageManager- Returns:
- context
-
databases
List all GeoPackage databases sorted alphabetically- Specified by:
databasesin interfaceGeoPackageManager- Returns:
- database list
-
databasesLike
List GeoPackage databases that match the provided like argument- Specified by:
databasesLikein 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:
databasesNotLikein interfaceGeoPackageManager- Parameters:
notLike- not like argument, using % as a wild card- Returns:
- database names
-
internalDatabases
List all internal GeoPackage databases sorted alphabetically- Specified by:
internalDatabasesin interfaceGeoPackageManager- Returns:
- internal database list
-
externalDatabases
List all external GeoPackage databases sorted alphabetically- Specified by:
externalDatabasesin interfaceGeoPackageManager- Returns:
- external database list
-
count
public int count()Get the count of GeoPackage databases- Specified by:
countin interfaceGeoPackageManager- Returns:
- count
-
internalCount
public int internalCount()Get the count of internal GeoPackage databases- Specified by:
internalCountin interfaceGeoPackageManager- Returns:
- internal count
-
externalCount
public int externalCount()Get the count of external GeoPackage databases- Specified by:
externalCountin interfaceGeoPackageManager- Returns:
- external count
-
databaseSet
Set of all GeoPackage databases- Specified by:
databaseSetin interfaceGeoPackageManager- Returns:
- database set
-
internalDatabaseSet
Set of all internal GeoPackage databases- Specified by:
internalDatabaseSetin interfaceGeoPackageManager- Returns:
- internal database set
-
externalDatabaseSet
Set of all external GeoPackage databases- Specified by:
externalDatabaseSetin interfaceGeoPackageManager- Returns:
- external database set
-
exists
Determine if the database exists- Specified by:
existsin interfaceGeoPackageManager- Parameters:
database- database name- Returns:
- true if exists
-
size
Size of the database in bytes- Specified by:
sizein interfaceGeoPackageManager- Parameters:
database- database name- Returns:
- bytes
-
isExternal
Determine if the database is a linked external file- Specified by:
isExternalin interfaceGeoPackageManager- Parameters:
database- database name- Returns:
- external flag
-
existsAtExternalFile
Determine if a database exists at the provided external file- Specified by:
existsAtExternalFilein interfaceGeoPackageManager- Parameters:
file- database file- Returns:
- true if exists
-
existsAtExternalPath
Determine if a database exists at the provided external file path- Specified by:
existsAtExternalPathin 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:
existsAtExternalFilein interfaceGeoPackageManager- Parameters:
file- document file- Returns:
- true if exists
-
getPath
Get the path of the database- Specified by:
getPathin interfaceGeoPackageManager- Parameters:
database- database name- Returns:
- path
-
getFile
Get the file of the database- Specified by:
getFilein interfaceGeoPackageManager- Parameters:
database- database name- Returns:
- file
-
getDocumentFile
Get the document file of the database- Specified by:
getDocumentFilein interfaceGeoPackageManager- Parameters:
database- database name- Returns:
- document file
-
getDatabaseAtExternalFile
Get the database name at the external file- Specified by:
getDatabaseAtExternalFilein 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:
getDatabaseAtExternalPathin 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:
getDatabaseAtExternalFilein 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:
readableSizein interfaceGeoPackageManager- Parameters:
database- database name- Returns:
- size
-
delete
Delete a database- Specified by:
deletein interfaceGeoPackageManager- Parameters:
database- database name- Returns:
- true if deleted
-
deleteAll
public boolean deleteAll()Delete all databases- Specified by:
deleteAllin interfaceGeoPackageManager- Returns:
- true if deleted
-
deleteAllExternal
public boolean deleteAllExternal()Delete all external GeoPackages- Specified by:
deleteAllExternalin interfaceGeoPackageManager- Returns:
- true if deleted
-
deleteAllMissingExternal
public boolean deleteAllMissingExternal()Delete all external GeoPackages where the external file can no longer be found- Specified by:
deleteAllMissingExternalin interfaceGeoPackageManager- Returns:
- true if any were deleted
-
create
Create a new GeoPackage database- Specified by:
createin interfaceGeoPackageManager- Parameters:
database- database name- Returns:
- true if created
-
createAtPath
Create a new GeoPackage database at the provided directory path- Specified by:
createAtPathin interfaceGeoPackageManager- Parameters:
database- database namepath- directory path- Returns:
- true if created
-
createFile
Create a new GeoPackage database at the specified file location- Specified by:
createFilein 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:
createFilein 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:
createFilein 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:
createFilein interfaceGeoPackageManager- Parameters:
database- database namefile- GeoPackage document file- Returns:
- true if created
-
importGeoPackage
Import a GeoPackage file- Specified by:
importGeoPackagein interfaceGeoPackageManager- Parameters:
file- GeoPackage file to import- Returns:
- true if loaded
-
importGeoPackage
Import a GeoPackage file- Specified by:
importGeoPackagein interfaceGeoPackageManager- Parameters:
file- GeoPackage file to importprogress- progress tracker- Returns:
- true if loaded
-
importGeoPackage
Import a GeoPackage file- Specified by:
importGeoPackagein interfaceGeoPackageManager- Parameters:
file- GeoPackage file to importoverride- true to override existing- Returns:
- true if created successfully
-
importGeoPackage
Import a GeoPackage file- Specified by:
importGeoPackagein 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:
importGeoPackagein interfaceGeoPackageManager- Parameters:
name- database name to save asfile- GeoPackage file to import- Returns:
- true if created successfully
-
importGeoPackage
Import a GeoPackage file- Specified by:
importGeoPackagein 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:
importGeoPackagein 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:
importGeoPackagein 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:
importGeoPackagein 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:
importGeoPackagein 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:
importGeoPackagein 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:
importGeoPackagein 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:
importGeoPackagein 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:
importGeoPackagein 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:
importGeoPackagein 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:
importGeoPackagein 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:
importGeoPackagein interfaceGeoPackageManager- Parameters:
database- database name to save asstream- GeoPackage stream to import- Returns:
- true if loaded
-
importGeoPackage
Import a GeoPackage stream- Specified by:
importGeoPackagein 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:
importGeoPackagein 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:
importGeoPackagein 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:
importGeoPackagein interfaceGeoPackageManager- Parameters:
name- GeoPackage nameurl- url- Returns:
- true if created successfully
-
importGeoPackage
Import a GeoPackage file from a URL- Specified by:
importGeoPackagein interfaceGeoPackageManager- Parameters:
name- GeoPackage nameurl- urlprogress- progress tracker- Returns:
- true if created successfully
-
importGeoPackage
Import a GeoPackage file from a URL- Specified by:
importGeoPackagein 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:
importGeoPackagein 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:
exportGeoPackagein interfaceGeoPackageManager- Parameters:
database- database namedirectory- export directory
-
exportGeoPackage
Export a GeoPackage database to a file- Specified by:
exportGeoPackagein interfaceGeoPackageManager- Parameters:
database- database namedirectory- export directoryprogress- progress tracker
-
exportGeoPackage
Export a GeoPackage database to a file- Specified by:
exportGeoPackagein 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:
exportGeoPackagein interfaceGeoPackageManager- Parameters:
database- database namename- namedirectory- export directoryprogress- progress tracker
-
exportGeoPackage
Export a GeoPackage database to a document file- Specified by:
exportGeoPackagein 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:
exportGeoPackagein interfaceGeoPackageManager- Parameters:
database- database namefile- export document fileprogress- progress tracker
-
exportGeoPackage
public void exportGeoPackage(String database, String relativePath, android.net.Uri uri) throws IOException Export a GeoPackage database to a media store- Specified by:
exportGeoPackagein 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, android.net.Uri uri, GeoPackageProgress progress) throws IOException Export a GeoPackage database to a media store- Specified by:
exportGeoPackagein 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, android.net.Uri uri) throws IOException Export a GeoPackage database to a media store- Specified by:
exportGeoPackagein 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, android.net.Uri uri, GeoPackageProgress progress) throws IOException Export a GeoPackage database to a media store- Specified by:
exportGeoPackagein 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, android.net.Uri uri, android.content.ContentValues contentValues) throws IOException Export a GeoPackage database to a Uri- Specified by:
exportGeoPackagein 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, android.net.Uri uri, android.content.ContentValues contentValues, GeoPackageProgress progress) throws IOException Export a GeoPackage database to a Uri- Specified by:
exportGeoPackagein 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:
openin interfaceGeoPackageManager- Parameters:
database- database name- Returns:
- open GeoPackage
-
open
Open the database- Specified by:
openin interfaceGeoPackageManager- Parameters:
database- database namewritable- true to open as writable, false as read only- Returns:
- open GeoPackage
-
openExternal
Open an external GeoPackage- Specified by:
openExternalin interfaceGeoPackageManager- Parameters:
path- full file path- Returns:
- open GeoPackage
-
openExternal
Open an external GeoPackage- Specified by:
openExternalin 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:
openExternalin interfaceGeoPackageManager- Parameters:
path- full file path- Returns:
- open GeoPackage
-
openExternal
Open an external GeoPackage- Specified by:
openExternalin 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:
openExternalin interfaceGeoPackageManager- Parameters:
file- document file- Returns:
- open GeoPackage
-
openExternal
Open an external GeoPackage- Specified by:
openExternalin 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:
isImportHeaderValidationin 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:
setImportHeaderValidationin 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:
isImportIntegrityValidationin 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:
setImportIntegrityValidationin 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:
isOpenHeaderValidationin 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:
setOpenHeaderValidationin 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:
isOpenIntegrityValidationin 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:
setOpenIntegrityValidationin 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:
isSqliteWriteAheadLoggingin 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:
setSqliteWriteAheadLoggingin interfaceGeoPackageManager- Parameters:
enabled- true to enable, false to disable
-
getIgnoredInternals
Get the ignored internal databases- Specified by:
getIgnoredInternalsin interfaceGeoPackageManager- Returns:
- databases
-
isIgnoredInternal
Is the database an ignored internal database by name- Specified by:
isIgnoredInternalin interfaceGeoPackageManager- Parameters:
database- database name- Returns:
- true if ignored
-
ignoreInternal
Ignore an internal database by name- Specified by:
ignoreInternalin interfaceGeoPackageManager- Parameters:
database- database name
-
includeInternal
Do not ignore an internal database by name- Specified by:
includeInternalin interfaceGeoPackageManager- Parameters:
database- database name
-
validate
Validate the database header and integrity.- Specified by:
validatein 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:
validateHeaderin 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:
validateIntegrityin interfaceGeoPackageManager- Parameters:
database- database name- Returns:
- true if valid, false if not
-
copy
Copy the database- Specified by:
copyin interfaceGeoPackageManager- Parameters:
database- database namedatabaseCopy- database copy name- Returns:
- true if copied
-
copy
Copy the database- Specified by:
copyin interfaceGeoPackageManager- Parameters:
database- database namedatabaseCopy- database copy nameprogress- progress tracker- Returns:
- true if copied
-
rename
Rename the database to the new name- Specified by:
renamein 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:
importGeoPackageAsExternalLinkin 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:
importGeoPackageAsExternalLinkin 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:
importGeoPackageAsExternalLinkin 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:
importGeoPackageAsExternalLinkin 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:
importGeoPackageAsExternalLinkin 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:
importGeoPackageAsExternalLinkin 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:
importGeoPackageAsExternalLinkin 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:
importGeoPackageAsExternalLinkin 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:
importGeoPackageAsExternalLinkin 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:
importGeoPackageAsExternalLinkin 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:
importGeoPackageAsExternalLinkin 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:
importGeoPackageAsExternalLinkin 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
-