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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactiveExtension(org.testng.ITestContext testContext) Determines if the extension is active by looking for relevant tables and/or rowsvoidGeoPackages with a row in the `gpkg_extensions` table with an `extension_name` of "gpkg_metadata" SHALL comply with this extension.voidEverygpkg_metadata_referencetable row with areference_scopecolumn value of 'geopackage' SHALL have atable_namecolumn value that is NULL.voidEverygpkg_metadata_referencetable reference scope column value SHALL be one of 'geopackage', 'table', 'column', 'row', 'row/col' in lowercase.voidA GeoPackage that contains agpkg_metadatatable SHALL contain agpkg_metadata_referencetable 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.voidEachmd_scopecolumn value in agpkg_metadatatable or updateable view SHALL be one of the name column values from Metadata Scopes.voidA GeoPackage MAY contain a table named gpkg_metadata.voidsetUp()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_scopecolumn value in agpkg_metadatatable 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_metadatatable SHALL contain agpkg_metadata_referencetable 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_referencetable reference scope column value SHALL be one of 'geopackage', 'table', 'column', 'row', 'row/col' in lowercase.- See Also:
-
metadataReferenceScopeAgreement
Everygpkg_metadata_referencetable row with areference_scopecolumn value of 'geopackage' SHALL have atable_namecolumn value that is NULL. Every othergpkg_metadata_referencetable row SHALL have atable_namecolumn value that references a value in thegpkg_contentstable_namecolumn.- Throws:
SQLException- If an SQL query causes an error- See Also:
-