Class OpenSearchGeoTests

java.lang.Object
org.opengis.cite.cat30.CommonFixture
org.opengis.cite.cat30.opensearch.OpenSearchGeoTests

public class OpenSearchGeoTests extends CommonFixture
Verifies behavior of the SUT when processing OpenSearch requests that contain geographic extensions defined in OGC OpenSearch Geo and Time Extensions (OGC 10-032r8). The relevant namespace URI is http://a9.com/-/opensearch/extensions/geo/1.0/.

All implementations must satisfy the requirements of the Core conformance class (see OGC 10-032r8, Table 1). A conforming service must:

  • present a valid OpenSearch description document;
  • define a URL template for the Atom response type;
  • implement a bounding box search (geo:box).

In an Atom feed or entry, a bounding box is represented using a GeoRSS element. Either the simple or GML variant is acceptable:

  • georss:box (EPSG 4326)
  • georss:where/{http://www.opengis.net/gml}Envelope (any CRS)

In addition to the service capabilities listed above, a Catalog v3 service must also implement the Get record by id conformance class that allows a client to retrieve a record by identifier (geo:uid). This requirement is a consequence of applying the Filter-FES-KVP conformance class to OpenSearch queries (see Table 1).

Sources

  • Field Details

    • UID_PARAM

      static final QName UID_PARAM
  • Constructor Details

    • OpenSearchGeoTests

      public OpenSearchGeoTests()
  • Method Details

    • initOpenSearchGeoTestsFixture

      @BeforeClass public void initOpenSearchGeoTestsFixture(org.testng.ITestContext testContext)
      Initializes the test fixture. A Document representing an OpenSearch description document is obtained from the test context and the URL templates it contains are extracted.
      Parameters:
      testContext - The test context containing various suite attributes.
    • getResourceById_notFound

      public void getResourceById_notFound()
      [Test] Submits an OpenSearch request that includes a (randomly generated) identifier for which there is no matching record. Status code 404 (Not Found) is expected in response. An error message may be conveyed in the response entity.
    • getResourceById

      public void getResourceById()
      [Test] Submits an OpenSearch request that includes a resource identifier. A matching entry is expected in the response, along with the os:Query element that describes the search request. The request URI is constructed in accord with a URL template containing the {geo:uid} parameter. Any other template parameters are set to their default values.
      See Also:
      • "OGC OpenSearch Geo and Time Extensions (OGC 10-032r8), 9.3.2: Normal response XML encoding"
    • invalidBoundingBoxCoords

      public void invalidBoundingBoxCoords()
      [Test] Submits an OpenSearch request that includes a bounding box with invalid (UTM) coordinates. Status code 400 (Bad Request) is expected in response. An error message may be conveyed in the response entity.
    • boundingBoxQuery

      public void boundingBoxQuery()
      [Test] Submits an OpenSearch request that includes a bounding box in the normative CRS ("urn:ogc:def:crs:OGC:1.3:CRS84"). The request URI is constructed in accord with a URL template containing the {geo:box} parameter. Any other template parameters are set to their default values.

      All matching record representations in the response entity must satisfy the bounding box constraint. If the entity is an Atom feed, it must also contain the os:Query element that describes the search request.

      See Also:
      • "OGC OpenSearch Geo and Time Extensions (OGC 10-032r8), 9.3.2: Normal response XML encoding"