Package org.opengis.cite.gpkg12.core
Class SQLiteContainerTests
java.lang.Object
org.opengis.cite.gpkg12.CommonFixture
org.opengis.cite.gpkg12.core.SQLiteContainerTests
Defines test methods that apply to an SQLite database file. The GeoPackage standard
defines a SQL database schema designed for use with the SQLite software library.
Sources
- Author:
- Richard Martell, Luke Lambert
-
Field Summary
Fields inherited from class org.opengis.cite.gpkg12.CommonFixture
databaseConnection, dataSource, geopackageVersion, gpkgFile, ROOT_PKG_PATH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
A GeoPackage SHALL contain a value of 0x47504B47 ("GPKG" in ASCII) in the "application_id" field of the SQLite database header to indicate that it is a GeoPackage.void
A GeoPackage shall only contain data elements, SQL constructs and GeoPackage extensions with the "gpkg" author name specified in this encoding standard.void
A GeoPackage shall be a SQLite database file using version 3 of the SQLite file format.void
A GeoPackage shall have the file extension name ".gpkg".void
The SQLite PRAGMA foreign_key_check SQL with no parameter value SHALL return an empty result set indicating no invalid foreign key values for a GeoPackage file.void
The SQLite PRAGMA integrity_check SQL command SHALL return "ok" for a GeoPackage file.void
sqlCheck()
A GeoPackage SQLite Configuration SHALL provide SQL access to GeoPackage contents via software APIs.Methods inherited from class org.opengis.cite.gpkg12.CommonFixture
checkPrimaryKey, close, getGeopackageVersion, getPrimaryKeyColumn, getTestName, initCommonFixture, isExtendedType, setTestName, validateClassEnabled
-
Constructor Details
-
SQLiteContainerTests
public SQLiteContainerTests()
-
-
Method Details
-
fileHeaderString
A GeoPackage shall be a SQLite database file using version 3 of the SQLite file format. The first 16 bytes of a GeoPackage must contain the (UTF-8/ASCII) string "SQLite format 3", including the terminating NULL character.- Throws:
IOException
- If an I/O error occurs while trying to read the data file.- See Also:
-
applicationID
A GeoPackage SHALL contain a value of 0x47504B47 ("GPKG" in ASCII) in the "application_id" field of the SQLite database header to indicate that it is a GeoPackage. A GeoPackage SHALL contain an appropriate value in "user_version" field of the SQLite database header to indicate its version. The value SHALL be in integer with a major version, two-digit minor version, and two-digit bug-fix. For GeoPackage Version 1.2 this value is 0x000027D8 (the hexadecimal value for 10200).- Throws:
IOException
- If an I/O error occurs while trying to read the data file.SQLException
- If an SQL query causes an error- See Also:
-
filenameExtension
public void filenameExtension()A GeoPackage shall have the file extension name ".gpkg".- See Also:
-
fileContents
A GeoPackage shall only contain data elements, SQL constructs and GeoPackage extensions with the "gpkg" author name specified in this encoding standard.- Throws:
SQLException
- on any error- See Also:
-
pragmaIntegrityCheck
The SQLite PRAGMA integrity_check SQL command SHALL return "ok" for a GeoPackage file.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
foreignKeyCheck
The SQLite PRAGMA foreign_key_check SQL with no parameter value SHALL return an empty result set indicating no invalid foreign key values for a GeoPackage file.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
sqlCheck
A GeoPackage SQLite Configuration SHALL provide SQL access to GeoPackage contents via software APIs.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-