Class MetadataTests
java.lang.Object
org.opengis.cite.gpkg12.CommonFixture
org.opengis.cite.gpkg12.extensions.metadata.MetadataTests
Defines test methods that apply to descriptive information about a GeoPackage's content
as it pertains to the metadata extension.
Sources
- GeoPackage Encoding Standard - F.8. Metadata (OGC 12-128r13)
- Author:
- Luke Lambert, Jeff Yutzler
-
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
activeExtension
(org.testng.ITestContext testContext) Determines if the extension is active by looking for relevant tables and/or rowsvoid
GeoPackages with a row in the `gpkg_extensions` table with an `extension_name` of "gpkg_metadata" SHALL comply with this extension.void
Everygpkg_metadata_reference
table row with areference_scope
column value of 'geopackage' SHALL have atable_name
column value that is NULL.void
Everygpkg_metadata_reference
table reference scope column value SHALL be one of 'geopackage', 'table', 'column', 'row', 'row/col' in lowercase.void
A GeoPackage that contains agpkg_metadata
table SHALL contain agpkg_metadata_reference
table per clause 2.4.3.1.1 Table Definition, Metadata Reference Table Definition (Table Name: gpkg_metadata_reference) and gpkg_metadata_reference Table Definition SQL.void
Eachmd_scope
column value in agpkg_metadata
table or updateable view SHALL be one of the name column values from Metadata Scopes.void
A GeoPackage MAY contain a table named gpkg_metadata.void
setUp()
Sets up variables used across methodsMethods inherited from class org.opengis.cite.gpkg12.CommonFixture
checkPrimaryKey, close, getGeopackageVersion, getPrimaryKeyColumn, getTestName, initCommonFixture, isExtendedType, setTestName, validateClassEnabled
-
Constructor Details
-
MetadataTests
public MetadataTests()
-
-
Method Details
-
setUp
Sets up variables used across methods- Throws:
SQLException
- if there is a database error
-
activeExtension
Determines if the extension is active by looking for relevant tables and/or rows- Parameters:
testContext
- the ITestContext to use- Throws:
SQLException
- on any SQL error (which would indicate non-compliance)
-
metadataTableDefinition
A GeoPackage MAY contain a table named gpkg_metadata. If present it SHALL be defined per clauses Table Definition, Metadata Table Definition, and gpkg_metadata Table Definition SQL.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-
metadataScopeValues
public void metadataScopeValues()Eachmd_scope
column value in agpkg_metadata
table or updateable view SHALL be one of the name column values from Metadata Scopes.- See Also:
-
metadataReferencesTableDefinition
public void metadataReferencesTableDefinition()A GeoPackage that contains agpkg_metadata
table SHALL contain agpkg_metadata_reference
table per clause 2.4.3.1.1 Table Definition, Metadata Reference Table Definition (Table Name: gpkg_metadata_reference) and gpkg_metadata_reference Table Definition SQL.- See Also:
-
metadataExtensionTableValues
GeoPackages with a row in the `gpkg_extensions` table with an `extension_name` of "gpkg_metadata" SHALL comply with this extension. The row SHALL have a `scope` of "read-write". /opt/metadata/extensions/data_values_scope- Throws:
SQLException
- on any error- See Also:
-
metadataReferencesScopeValues
public void metadataReferencesScopeValues()Everygpkg_metadata_reference
table reference scope column value SHALL be one of 'geopackage', 'table', 'column', 'row', 'row/col' in lowercase.- See Also:
-
metadataReferenceScopeAgreement
Everygpkg_metadata_reference
table row with areference_scope
column value of 'geopackage' SHALL have atable_name
column value that is NULL. Every othergpkg_metadata_reference
table row SHALL have atable_name
column value that references a value in thegpkg_contents
table_name
column.- Throws:
SQLException
- If an SQL query causes an error- See Also:
-