Class CoreTests

java.lang.Object
org.opengis.cite.gmljpx20.core.CoreTests

public class CoreTests extends Object

CoreTests class.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    [Test] CRS SHALL be identified by URI following the OGC document OGC 11-135 and maintained in http://www.opengis.net/def.
    void
    [Test] The RectifiedGridCoverage model of GMLCOV requires the definition of the CRS associated to each coverage.
    void
    [Test] The GMLJP2 file processor should follow the assessment rules for schemas as laid out in XML Schema Specification, Part I Structures, Section 4.3.2.
    void
    [Test] When there are features related to the JPEG 2000 file that should be included (except the GMLCOV part and annotations if any), these features shall be encoded in GML 3.2 and shall be included in either in a child featureElement containing gmljp2:GMLJP2Features (for features common to all codestreams) or from a gmljp2:feature element of the GMLJP2 elements derived from gmljp2:GMLJP2CoverageType (for features that are related to a single codestream).
    void
    [Test] When an external application schema is referenced in the xsi:schemaLocation attribute or any resource is referenced in an xlink:href, it shall be referenced using a http://reference type to an XML instance, a relative reference shall be interpreted as relative to the jpeg2000 file position.
    void
    [Test] When XML schema definitions are embedded in a JPEG200 file, then schemaLocation attribute is mandatory.
    void
    [Test] Geographic features (if any) included in a JPEG 2000 encoded image using GMLJP2 shall be encoded as GML 3.2 features.
    void
    [Test] A GMLJP2 XML description of an image shall have a gmljp2:GMLJP2CoverageCollection as single root element derived from gmlcov:AbstractCoverageType thats as a container for other elements.
    void
    [Test] For each codestream present in the image single child gmljp2:featureMember derived from gmlcov:AbstractCoverageType (i.e.
    void
    [Test] A GMLJP2 encoded file conformant to this standard shall use a CIS coverage description following the OGC 12-108 GML Application Schema - Coverages - JPEG 2000 Coverage Encoding Extension to describe the coverage collection and to describe the individual coverages.
    void
    [Test] Coverage metadata in a GMLJP2 XML instance about the internal structure of the JPEG 2000 file (e.g. number of codestreams, number of rows and columns of a codestream) shall be coherent with the JPEG 2000 binary header information.
    void
    [Test] gml:metaDataProperty shall neither encode metadata about the coverage collection nor the individual coverages.
    void
    [Test] A GMLJP2 XML description of an image shall have a gmljp2:GMLJP2CoverageCollection as single root element derived from gmlcov:AbstractCoverageType thats as a container for other elements.
    void
    [Test] In a JPEG2000 encoded file with nil-values, the element tag shall occur in the GMLCOV (gmlcov:rangeType/swe:DataRecord/swe:field/swe:Quantity/swe:nilValues) with an appropriate swe:nilValue/@reason to give the client an indication on how to represent them.
    void
    [Test] In those cases where the reason is identified by reference to an authority and code, it SHALL be identified by URI following the OGC document [09-046r2] and maintained in http://www.opengis.net/def (URIs of Definitions in OGC Namespace).
    void
    [Test] gmlcov:metadata information shall be coherent with the corresponding GMLCOV information in gml:domainSet or gmlcov:rangeType (e.g. geometric or radiometric information in ISO19139 format).
    void
    [Test] When there are annotations related the JPEG 2000 file that should be included, these annotations shall be child elements of the gmljp2:annotation element of the of the GMLJP2 elements derived from gmljp2:GMLJP2CoverageType.
    void
    [Test] When an external application schema is referenced in the xsi:schemaLocation attribute or any resource is referenced in an xlink:href, that schema shall be referenced using a http://reference type to an XML instance, a relative reference shall be interpreted as relative to the JPEG 2000 file position.
    void
    [Test] The structure of an internal GMLJP2 URI shall be as follows: gmljp2://[resource.type]/[resource.id][#fragment-id] internal-references Verify that the internal references to schemaLocations are made using gmljp2: references.
    void
    [Test] The structure of an internal GMLJP2 URI shall be as follows: gmljp2://[resource.type]/[resource.id][#fragment-id] internal-references Verify that the internal references to schemaLocations are made using gmljp2: references.
    void
    [Test] Each of the association boxes, other than the gml.root-instance and gml.data boxes, shall have a label (the first box shall be a label box in each case).
    void
    [Test] The single “outer� association box contains a first box which is a label box.
    void
    [Test] GMLJP2 will use JPX format specified in JPEG2000 part II Annex M, and shall consequently signal with the value ‘jpx\040’ in the compatibility list of the File Type box (see Annex M.8 of [ISO 15444-2].
    void
    [Test] The fileName subelement of the rangeSet in the coverage description shall contain a reference to the corresponding codestream in the JPEG2000 file.
    void
    [Test] When styling information of the features or annotations related the JPEG 2000 file should be included independent from the features, these styles shall be included in a gmljp2:style element of the coverage collection or the individual coverages.
    void
    [Test] The use of JPX format extension from JPEG2000 Part 2 (Annex M) shall be signalled with the value ‘jpx\040’ in the brand field of the file type box and the presence of GMLJP2 XML data shall be signalled with the value 67 in a reader requirement box.
    void
    [Test] In a JPEG2000 encoded file with coverage values with units of measure, the element tag must occur in the GMLCOV (gmlcov:rangeType/swe:DataRecord/swe:uom).
    void
    [Test] When an specific application schema (xsi:schemaLocation) or any resource referenced (e.g. xlink:href) is included in a different XML Box it shall be referenced using a full reference.
    void
    [Test] In those cases where a UoM is identified by reference to an authority and code, it SHALL be identified by URI following the OGC document 07-092r3 and maintained in http://www.opengis.net/def (URIs of Definitions in OGC Namespace).
    void
    [Test] GMLJP2 instance data shall be stored in XML boxes.
    void
    initFixture(org.testng.ITestContext testContext)
    initFixture.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CoreTests

      public CoreTests()
  • Method Details

    • initFixture

      @BeforeClass public void initFixture(org.testng.ITestContext testContext)

      initFixture.

      Parameters:
      testContext - a ITestContext object
    • containsGmlCoverageDescriptions

      public void containsGmlCoverageDescriptions()
      [Test] A GMLJP2 encoded file conformant to this standard shall use a CIS coverage description following the OGC 12-108 GML Application Schema - Coverages - JPEG 2000 Coverage Encoding Extension to describe the coverage collection and to describe the individual coverages.

      Sources

    • containsGmlCoverageMetadataCoherence

      public void containsGmlCoverageMetadataCoherence()
      [Test] Coverage metadata in a GMLJP2 XML instance about the internal structure of the JPEG 2000 file (e.g. number of codestreams, number of rows and columns of a codestream) shall be coherent with the JPEG 2000 binary header information. In case of discrepancies the JPEG 2000 binary headers information takes precedence.

      Sources

      • OGC 08-085r8, A.1.2: GMLJP2 coverage metadata coherence with JPEG2000 header
      • header-precedence
      • Verify that the image headers values are the same that are included in the GMLJP2 XML instance. Test passes if they are the same.
    • containsGmlcovPrecedence

      public void containsGmlcovPrecedence()
      [Test] gmlcov:metadata information shall be coherent with the corresponding GMLCOV information in gml:domainSet or gmlcov:rangeType (e.g. geometric or radiometric information in ISO19139 format).
      • gml:domainSet
      • gmlcov:rangeType
      • Verify if the redundant information in the gmlcov:metadata and in the corresponding elements of gmlcov is the same. Test passes if it is the same.

      Sources

    • containsGmlcovInsteadmetaDataProperty

      public void containsGmlcovInsteadmetaDataProperty()
      [Test] gml:metaDataProperty shall neither encode metadata about the coverage collection nor the individual coverages.
      • gml:metaDataProperty
      • Verify that gml:metaDataProperty is not used in the coverage collection and in the individual coverages. Test passes if it is not used..

      Sources

    • containsGeographicGML32Features

      public void containsGeographicGML32Features()
      [Test] Geographic features (if any) included in a JPEG 2000 encoded image using GMLJP2 shall be encoded as GML 3.2 features.
      • gml-geographicFeatures
      • Verify that geographic features (if any) under the gmljp2:GMLJP2Features element comply with the rules for GML application schemas as defined in Clause 21 of the GML 3.2.1 standard [OGC 07-036].

      Sources

    • containsCRSdeclaredUsingURIs

      public void containsCRSdeclaredUsingURIs()
      [Test] CRS SHALL be identified by URI following the OGC document OGC 11-135 and maintained in http://www.opengis.net/def.
      • gmlcov-CRS-byref
      • Verify that CRS are declared using URIs. Test passes if all CRSs are URIs.

      Sources

    • containsCRSrectifiedGridCoverage

      public void containsCRSrectifiedGridCoverage()
      [Test] The RectifiedGridCoverage model of GMLCOV requires the definition of the CRS associated to each coverage.
      • gmlcov-RectifiedGridCoverage-CRS
      • Verify that all GMLJP2RectifiedGridCoverage have CRS defined in the domainSet. Test passes all GMLJP2RectifiedGridCoverage have a CRSs defined.

      Sources

    • containsGmlRangeTypeDataRecordUom

      public void containsGmlRangeTypeDataRecordUom()
      [Test] In a JPEG2000 encoded file with coverage values with units of measure, the element tag must occur in the GMLCOV (gmlcov:rangeType/swe:DataRecord/swe:uom).
      • gmlcov:rangeType
      • swe:DataRecord
      • swe:uom
      • Verify that all swe:DataRecord that declare variables that requires units have them populated (gmlcov:rangeType/swe:DataRecord/swe:uom). Test passes if they are present.

      Sources

    • containsUomByReference

      public void containsUomByReference()
      [Test] In those cases where a UoM is identified by reference to an authority and code, it SHALL be identified by URI following the OGC document 07-092r3 and maintained in http://www.opengis.net/def (URIs of Definitions in OGC Namespace).
      • gmlcov-uom-byref
      • Verify if all UoM in the GMLJP2 XML document are defined using URIs. Test passes if all are URIs.

      Sources

    • containsGmlcovNilValues

      public void containsGmlcovNilValues()
      [Test] In a JPEG2000 encoded file with nil-values, the element tag shall occur in the GMLCOV (gmlcov:rangeType/swe:DataRecord/swe:field/swe:Quantity/swe:nilValues) with an appropriate swe:nilValue/@reason to give the client an indication on how to represent them.
      • gmlcov-uom-byref
      • Verify that the tag nil-values have value and a reason. Test passes if all these have it.

      Sources

    • containsGmlcovNilValuesByRef

      public void containsGmlcovNilValuesByRef()
      [Test] In those cases where the reason is identified by reference to an authority and code, it SHALL be identified by URI following the OGC document [09-046r2] and maintained in http://www.opengis.net/def (URIs of Definitions in OGC Namespace).
      • gmlcov-nil-reason-byref
      • Verify that the all reasons for nill values are defined as URI's. Test passes if there are.

      Sources

    • containsGmlcovCoverageCollectionContainer

      public void containsGmlcovCoverageCollectionContainer()
      [Test] A GMLJP2 XML description of an image shall have a gmljp2:GMLJP2CoverageCollection as single root element derived from gmlcov:AbstractCoverageType thats as a container for other elements. The sub-elements gml:domainSet, the gml:rangeSet and the gmlcov:rangeType shall be left as blank as possible because these sub-elements have no meaning for the collection (but are inherited from the GMLCOV schema); the domainSet should provide a CRS information (defaulted to WGS84, otherwise the CRS of the single coverage or the common CRS of all coverages included – if the CRS is homogeneous -), and the bounding box for the collection. Dependency: /req/gmlcov
      • gmlcov-coverage-collection-container
      • erify that the root element is a gmljp2:GMLJP2CoverageCollection and the elements gml:domainSet, the gml:rangeSet and the gmlcov:rangeType have been populated according to requirement 11. Test passes if the root is as expected.

      Sources

    • containsGmlcovCoverageContainer

      public void containsGmlcovCoverageContainer()
      [Test] For each codestream present in the image single child gmljp2:featureMember derived from gmlcov:AbstractCoverageType (i.e. gmljp2:GMLJP2GridCoverage, gmljp2:GMLJP2RectifiedGridCoverage or gmljp2:GMLJP2ReferenceableGridCoverage) (composed by a description of the gml:domainSet, the gml:rangeSet and the gmlcov:rangeType) shall be provided and populated. Dependency: /req/gmlcov
      • gmlcov-coverage-container
      • Verify that there are as many gmljp2:featureMembers derived from gmlcov:AbstractCoverageType as codestreams are present in the image. Test passes if both numbers are equal.

      Sources

    • containsGmlcovMetadata

      public void containsGmlcovMetadata()
      [Test] A GMLJP2 XML description of an image shall have a gmljp2:GMLJP2CoverageCollection as single root element derived from gmlcov:AbstractCoverageType thats as a container for other elements. The sub-elements gml:domainSet, the gml:rangeSet and the gmlcov:rangeType shall be left as blank as possible because these sub-elements have no meaning for the collection (but are inherited from the GMLCOV schema); the domainSet should provide a CRS information (defaulted to WGS84, otherwise the CRS of the single coverage or the common CRS of all coverages included – if the CRS is homogeneous -), and the bounding box for the collection. Dependency: /req/gmlcov
      • gmljp2:GMLJP2CoverageCollection
      • gml:domainSet
      • gml:rangeSet
      • gmlcov:rangeType
      • Verify the presence of the gmlcov-metadata if metadata is available. If so, test passes if gmlcov-metadata is populated.

      Sources

    • containsFileFeatures

      public void containsFileFeatures()
      [Test] When there are features related to the JPEG 2000 file that should be included (except the GMLCOV part and annotations if any), these features shall be encoded in GML 3.2 and shall be included in either in a child featureElement containing gmljp2:GMLJP2Features (for features common to all codestreams) or from a gmljp2:feature element of the GMLJP2 elements derived from gmljp2:GMLJP2CoverageType (for features that are related to a single codestream).
      • gml-feature-container
      • Verify that gmljp2:GMLJP2Features (for features common to all codestreams) or gmljp2:feature (for features that are related to a single codestream) contain features as necessary that are not coverages or annotations. If so, test passes if these features are not coverages or annotations.

      Sources

    • containsGMLJP2annotation

      public void containsGMLJP2annotation()
      [Test] When there are annotations related the JPEG 2000 file that should be included, these annotations shall be child elements of the gmljp2:annotation element of the of the GMLJP2 elements derived from gmljp2:GMLJP2CoverageType.
      • annotation-container
      • Verify that annotations are contained only in the gmljp2:annotation element as specified. Test passes if they are.

      Sources

    • containsGMLJP2fileStyle

      public void containsGMLJP2fileStyle()
      [Test] When styling information of the features or annotations related the JPEG 2000 file should be included independent from the features, these styles shall be included in a gmljp2:style element of the coverage collection or the individual coverages.
      • style-container
      • Verify that style information is contained only in the gmljp2:style element as specified. If so, test passes.

      Sources

    • containsGMLJP2filenameCodestream

      public void containsGMLJP2filenameCodestream()
      [Test] The fileName subelement of the rangeSet in the coverage description shall contain a reference to the corresponding codestream in the JPEG2000 file. The fileStructure subelement shall be “inapplicable�.
      • gmlcov-filename-codestream
      • Verify the correspondence of the rangeSet members fileName and fileStructure are populated as gmljp2://codestream/# (# being a number) and inapplicable. If so, test passes.

      Sources

    • containsXMLboxes

      public void containsXMLboxes()
      [Test] GMLJP2 instance data shall be stored in XML boxes. In order to allow references between these XML boxes, each XML box shall be associated with a label inside of an association box. This label serves as an identifier by which the XML data can be referenced..
      • xml-boxes
      • Verify that the image file has an XML box and association box with label that may serve as an identifier in GMLJP2 descriptions. If so, test passes.

      Sources

    • containsGMLJP2fileXMLSignaledCorrectly

      public void containsGMLJP2fileXMLSignaledCorrectly()
      [Test] The use of JPX format extension from JPEG2000 Part 2 (Annex M) shall be signalled with the value ‘jpx\040’ in the brand field of the file type box and the presence of GMLJP2 XML data shall be signalled with the value 67 in a reader requirement box.
      • xml-box-signal
      • Verify that the use of JPX format extension is signalled with the value ‘jpx\040’ in the brand field of the file type box and that the XML box is signaled with the value 67 indicating GML or Geographic metadata (XMLGISMetaData). If so, test passes.

      Sources

    • containsGMLJP2fileJPXJP2Compatible

      public void containsGMLJP2fileJPXJP2Compatible()
      [Test] GMLJP2 will use JPX format specified in JPEG2000 part II Annex M, and shall consequently signal with the value ‘jpx\040’ in the compatibility list of the File Type box (see Annex M.8 of [ISO 15444-2]. Moreover and except if opacity channels (if any) are specified outside the scope of JP2, GMLJP2 files shall be written as JP2 compatible by including the string ‘jp2\040’ within the compatibility list of the File Type box (see Annex I of [ISO 15444-1] and Annex M.2.1 of [ISO 15444-2]).
      • jpx-jp2-compatible
      • Verify that the JPEG 2000 is marked as "jp2" in the compatibility list. If so, test passes.

      Sources

    • containsGMLJP2fileJp2OuterBox

      public void containsGMLJP2fileJp2OuterBox()
      [Test] The single “outer� association box contains a first box which is a label box. This shall contain the label gml.data. The outer association box shall contain at least one additional association box containing GML instance data. This association box shall have a first box that is a label box with the label gml.root-instance and an XML box. This XML box shall only contain GML instance data for the following items and shall not contain XML schemas, CRS dictionaries or units of measure dictionary instance..
      • jp2-outer-box
      • Verify the structure and naming of the boxes and outer box is as specified, with the XML instance data preceded by a label box with the label gml.root-instance. If so, test passes.

      Sources

    • containsGMLJP2fileJp2OtherOuterBox

      public void containsGMLJP2fileJp2OtherOuterBox()
      [Test] Each of the association boxes, other than the gml.root-instance and gml.data boxes, shall have a label (the first box shall be a label box in each case). The value of the label is any value allowed by JPEG 2000 Part II.
      • jp2-other-inner-box
      • Verify the structure and naming of the boxes is as specified. If so, test passes.

      Sources

    • containsFileSchemaLocation

      public void containsFileSchemaLocation()
      [Test] When XML schema definitions are embedded in a JPEG200 file, then schemaLocation attribute is mandatory.
      • gmlcov-XML-ReferencesByURIs
      • Verify that when XML resources embedded in a JPEG200 file includes a schema definition, verify that such resources follow the specified assessment rules. If so, test passes.

      Sources

    • containsFileExternalReferences

      public void containsFileExternalReferences()
      [Test] The GMLJP2 file processor should follow the assessment rules for schemas as laid out in XML Schema Specification, Part I Structures, Section 4.3.2.
      • gmljp2-schemalocation
      • Verify that when a XML resource embedded in a JPEG200 file includes a schema definition, a reference to a schemaLocation is provided. If so, test passes.

      Sources

    • containsFileInternalReferences

      public void containsFileInternalReferences()
      [Test] When an external application schema is referenced in the xsi:schemaLocation attribute or any resource is referenced in an xlink:href, it shall be referenced using a http://reference type to an XML instance, a relative reference shall be interpreted as relative to the jpeg2000 file position.
      • gmljp2-xmlSchema
      • Verify that the internal references to schemaLocations are made using gmljp2: references. If so, test passes.

      Sources

    • containsGMLJP2ExternalRefToXMLBox

      public void containsGMLJP2ExternalRefToXMLBox()
      [Test] When an external application schema is referenced in the xsi:schemaLocation attribute or any resource is referenced in an xlink:href, that schema shall be referenced using a http://reference type to an XML instance, a relative reference shall be interpreted as relative to the JPEG 2000 file position.
      • external-references
      • Verify that the external references to schemaLocations are made using http references. If so, test passes.

      Sources

    • containsGMLJP2fileInternalRef

      public void containsGMLJP2fileInternalRef()
      [Test] The structure of an internal GMLJP2 URI shall be as follows: gmljp2://[resource.type]/[resource.id][#fragment-id]
      • internal-references
      • Verify that the internal references to schemaLocations are made using gmljp2: references. If so, test passes.

      Sources

    • containsGMLJP2fileInternalRefToXMLBox

      public void containsGMLJP2fileInternalRefToXMLBox()
      [Test] The structure of an internal GMLJP2 URI shall be as follows: gmljp2://[resource.type]/[resource.id][#fragment-id]
      • internal-references
      • Verify that the internal references to schemaLocations are made using gmljp2: references. If so, test passes.

      Sources

    • containsInternalRefToCodestream

      public void containsInternalRefToCodestream()
      [Test] When an specific application schema (xsi:schemaLocation) or any resource referenced (e.g. xlink:href) is included in a different XML Box it shall be referenced using a full reference. The URIs with a resource.type of xml identify a particular XML data box in the JPEG 2000 file shall have the following form: gmljp2://xml/[label] or gmljp2://xml/[label][#id].
      • gmljp2://codestream/
      • Verify that the internal references to schemaLocations in codestreams are made using gmljp2://codestream/ references. If so, test passes.

      Sources