org.opengis.cite.ogcapifeatures10.collections

## Class FeaturesTime

- java.lang.Object
- - org.opengis.cite.ogcapifeatures10.CommonFixture
  - - org.opengis.cite.ogcapifeatures10.CommonDataFixture
    - - org.opengis.cite.ogcapifeatures10.collections.AbstractFeatures
      - - org.opengis.cite.ogcapifeatures10.collections.FeaturesTime

-     public class FeaturesTime
      extends AbstractFeatures

  A.2.7. Features {root}/collections/{collectionId}/items - Datetime
  Author:
    Lyn Goltz

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.opengis.cite.ogcapifeatures10.collections.AbstractFeatures

      `AbstractFeatures.CollectionResponseKey, AbstractFeatures.ResponseData`

  - ### Field Summary

    - ### Fields inherited from class org.opengis.cite.ogcapifeatures10.collections.AbstractFeatures

      `collectionIdAndResponse, collections, iut`

    - ### Fields inherited from class org.opengis.cite.ogcapifeatures10.CommonDataFixture

      `noOfCollections`

    - ### Fields inherited from class org.opengis.cite.ogcapifeatures10.CommonFixture

      `requestLoggingFilter, responseLoggingFilter, rootUri`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FeaturesTime()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Iterator<Object[]>` | `collectionItemUrisWithDateTimes(org.testng.ITestContext testContext)`
    `void` | `timeParameterDefinition(TestPoint testPoint)` Abstract Test 18: /ats/core/fc-time-definition Test Purpose: Validate that the dateTime query parameters are constructed correctly.
    `void` | `validateFeaturesResponse_NumberReturned(Map<String,Object> collection, String queryParameter, Object begin, Object end)` Abstract Test 22, Test Method 7 (Abstract Test 26)
    `void` | `validateFeaturesWithDateTimeOperation(Map<String,Object> collection, String queryParameter, Object begin, Object end)` Abstract Test 13: /ats/core/fc-op Test Purpose: Validate that features can be identified and extracted from a Collection using query parameters.
    `void` | `validateFeaturesWithDateTimeResponse_FeaturesProperty(Map<String,Object> collection, String queryParameter, Object begin, Object end)` Abstract Test 22, Test Method 2
    `void` | `validateFeaturesWithDateTimeResponse_Links(Map<String,Object> collection, String queryParameter, Object begin, Object end)` Abstract Test 22, Test Method 4 (Abstract Test 23)
    `void` | `validateFeaturesWithDateTimeResponse_NumberMatched(Map<String,Object> collection, String queryParameter, Object begin, Object end)` Abstract Test 22, Test Method 6 (Abstract Test 25)
    `void` | `validateFeaturesWithDateTimeResponse_TimeStamp(Map<String,Object> collection, String queryParameter, Object begin, Object end)` Abstract Test 22, Test Method 5 (Abstract Test 24)
    `void` | `validateFeaturesWithDateTimeResponse_TypeProperty(Map<String,Object> collection, String queryParameter, Object begin, Object end)` Abstract Test 22, Test Method 1
    `void` | `validateFeaturesWithDateTimeResponse(Map<String,Object> collection, String queryParameter, Object begin, Object end)` Abstract Test 19: /ats/core/fc-time-response Test Purpose: Validate that the dataTime query parameters are processed correctly.

    - ### Methods inherited from class org.opengis.cite.ogcapifeatures10.collections.AbstractFeatures

      `collectionPaths, findFeaturesUrlForGeoJson, isExplode, isRequired, retrieveRequiredInformationFromTestContext, validateFeaturesProperty, validateLinks, validateNumberMatched, validateNumberReturned, validateTimeStamp, validateTypeProperty`

    - ### Methods inherited from class org.opengis.cite.ogcapifeatures10.CommonDataFixture

      `createListOfMediaTypesToSupportForFeatureCollectionsAndFeatures, createListOfMediaTypesToSupportForFeatureCollectionsAndFeatures, createListOfMediaTypesToSupportForOtherResources, getApiModel, noOfCollections, requirementClasses, retrieveApiModel`

    - ### Methods inherited from class org.opengis.cite.ogcapifeatures10.CommonFixture

      `clearMessages, getRequest, getResponse, init, initCommonFixture`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FeaturesTime

          public FeaturesTime()

  - ### Method Detail

    - #### collectionItemUrisWithDateTimes

          public Iterator<Object[]> collectionItemUrisWithDateTimes(org.testng.ITestContext testContext)

    - #### timeParameterDefinition

          public void timeParameterDefinition(TestPoint testPoint)

           Abstract Test 18: /ats/core/fc-time-definition
           Test Purpose: Validate that the dateTime query parameters are constructed correctly.
           Requirement: /req/core/fc-time-definition

           Test Method: Verify that the datetime query parameter complies with the following definition (using an OpenAPI Specification 3.0 fragment):

           name: datetime
           in: query
           required: false
           schema:
             type: string
           style: form
           explode: false

      Parameters:
        `testPoint` - the testPoint under test, never `null`

    - #### validateFeaturesWithDateTimeOperation

          public void validateFeaturesWithDateTimeOperation(Map<String,Object> collection,
                                                            String queryParameter,
                                                            Object begin,
                                                            Object end)

           Abstract Test 13: /ats/core/fc-op
           Test Purpose: Validate that features can be identified and extracted from a Collection using query parameters.
           Requirement: /req/core/fc-op

           Test Method
             1. For every feature collection identified in Collections, issue an HTTP GET request to the URL /collections/{collectionId}/items where {collectionId} is the id property for a Collection described in the Collections content.
             2. Validate that a document was returned with a status code 200.
             3. Validate the contents of the returned document using test /ats/core/fc-response.

           Repeat these tests using the following parameter tests:
           DateTime:
             * Parameter /ats/core/fc-time-definition
             * Response /ats/core/fc-time-response

      Parameters:
        `collection` - the collection under test, never `null`
        `queryParameter` - time parameter as string to use as query parameter, never `null`
        `begin` - a `ZonedDateTime` or `LocalDate`, the begin of the interval (or instant), never `null`
        `end` - a `ZonedDateTime` or `LocalDate`, the end of the interval, never `null` if the request is an instant

    - #### validateFeaturesWithDateTimeResponse

          public void validateFeaturesWithDateTimeResponse(Map<String,Object> collection,
                                                           String queryParameter,
                                                           Object begin,
                                                           Object end)

           Abstract Test 19: /ats/core/fc-time-response
           Test Purpose: Validate that the dataTime query parameters are processed correctly.
           Requirement: /req/core/fc-time-response

           Test Method
             1. Verify that only features that have a temporal geometry that intersects the temporal information in the datetime parameter were included in the result set
             2. Verify that all features in the collection that are not associated with a temporal geometry are included in the result set
             3. Validate that the datetime parameter complies with the syntax described in /req/core/fc-time-response.

      Parameters:
        `collection` - the collection under test, never `null`
        `queryParameter` - time parameter as string to use as query parameter, never `null`
        `begin` - a `ZonedDateTime` or `LocalDate`, the begin of the interval (or instant), never `null`
        `end` - a `ZonedDateTime` or `LocalDate`, the end of the interval, never `null` if the request is an instant

    - #### validateFeaturesWithDateTimeResponse_TypeProperty

          public void validateFeaturesWithDateTimeResponse_TypeProperty(Map<String,Object> collection,
                                                                        String queryParameter,
                                                                        Object begin,
                                                                        Object end)

      Abstract Test 22, Test Method 1

           Abstract Test 22: /ats/core/fc-response
           Test Purpose: Validate that the Feature Collections complies with the require structure and contents.
           Requirement: /req/core/fc-response

           Test Method
             1. Validate that the type property is present and has a value of FeatureCollection

      Parameters:
        `collection` - the collection under test, never `null`
        `queryParameter` - time parameter as string to use as query parameter, never `null`
        `begin` - a `ZonedDateTime` or `LocalDate`, the begin of the interval (or instant), never `null`
        `end` - a `ZonedDateTime` or `LocalDate`, the end of the interval, never `null` if the request is an instant

    - #### validateFeaturesWithDateTimeResponse_FeaturesProperty

          public void validateFeaturesWithDateTimeResponse_FeaturesProperty(Map<String,Object> collection,
                                                                            String queryParameter,
                                                                            Object begin,
                                                                            Object end)

      Abstract Test 22, Test Method 2

           Abstract Test 22: /ats/core/fc-response
           Test Purpose: Validate that the Feature Collections complies with the require structure and contents.
           Requirement: /req/core/fc-response

           Test Method
             2. Validate the features property is present and that it is populated with an array of feature items.

      Parameters:
        `collection` - the collection under test, never `null`
        `queryParameter` - time parameter as string to use as query parameter, never `null`
        `begin` - a `ZonedDateTime` or `LocalDate`, the begin of the interval (or instant), never `null`
        `end` - a `ZonedDateTime` or `LocalDate`, the end of the interval, never `null` if the request is an instant

    - #### validateFeaturesWithDateTimeResponse_Links

          public void validateFeaturesWithDateTimeResponse_Links(Map<String,Object> collection,
                                                                 String queryParameter,
                                                                 Object begin,
                                                                 Object end)

      Abstract Test 22, Test Method 4 (Abstract Test 23)

           Abstract Test 22: /ats/core/fc-response
           Test Purpose: Validate that the Feature Collections complies with the require structure and contents.
           Requirement: /req/core/fc-response

           Test Method
             4. If the links property is present, validate that all entries comply with /ats/core/fc-links

           Abstract Test 23: /ats/core/fc-links
           Test Purpose: Validate that the required links are included in the Collections document.
           Requirement: /req/core/fc-links, /req/core/fc-rel-type

           Test Method:
           Verify that the response document includes:
             1. a link to this response document (relation: self),
             2. a link to the response document in every other media type supported by the server (relation: alternate).

           Verify that all links include the rel and type link parameters.

      Parameters:
        `collection` - the collection under test, never `null`
        `queryParameter` - time parameter as string to use as query parameter, never `null`
        `begin` - a `ZonedDateTime` or `LocalDate`, the begin of the interval (or instant), never `null`
        `end` - a `ZonedDateTime` or `LocalDate`, the end of the interval, never `null` if the request is an instant

    - #### validateFeaturesWithDateTimeResponse_TimeStamp

          public void validateFeaturesWithDateTimeResponse_TimeStamp(Map<String,Object> collection,
                                                                     String queryParameter,
                                                                     Object begin,
                                                                     Object end)

      Abstract Test 22, Test Method 5 (Abstract Test 24)

           Abstract Test 22: /ats/core/fc-response
           Test Purpose: Validate that the Feature Collections complies with the require structure and contents.
           Requirement: /req/core/fc-response

           Test Method
             5. If the timeStamp property is present, validate that it complies with /ats/core/fc-timeStamp

           Abstract Test 24: /ats/core/fc-timeStamp
           Test Purpose: Validate the timeStamp parameter returned with a Features response
           Requirement: /req/core/fc-timeStamp

           Test Method: Validate that the timeStamp value is set to the time when the response was generated.

      Parameters:
        `collection` - the collection under test, never `null`
        `queryParameter` - time parameter as string to use as query parameter, never `null`
        `begin` - a `ZonedDateTime` or `LocalDate`, the begin of the interval (or instant), never `null`
        `end` - a `ZonedDateTime` or `LocalDate`, the end of the interval, never `null` if the request is an instant

    - #### validateFeaturesWithDateTimeResponse_NumberMatched

          public void validateFeaturesWithDateTimeResponse_NumberMatched(Map<String,Object> collection,
                                                                         String queryParameter,
                                                                         Object begin,
                                                                         Object end)
                                                                  throws URISyntaxException

      Abstract Test 22, Test Method 6 (Abstract Test 25)

           Abstract Test 22: /ats/core/fc-response
           Test Purpose: Validate that the Feature Collections complies with the require structure and contents.
           Requirement: /req/core/fc-response

           Test Method
             6. If the numberMatched property is present, validate that it complies with /ats/core/fc-numberMatched

           Abstract Test 25: /ats/core/fc-numberMatched
           Test Purpose: Validate the numberMatched parameter returned with a Features response
           Requirement: /req/core/fc-numberMatched

           Test Method: Validate that the value of the numberMatched parameter is identical to the number of features in the feature collections that match the selection parameters like bbox, datetime or additional filter parameters.

      Parameters:
        `collection` - the collection under test, never `null`
        `queryParameter` - time parameter as string to use as query parameter, never `null`
        `begin` - a `ZonedDateTime` or `LocalDate`, the begin of the interval (or instant), never `null`
        `end` - a `ZonedDateTime` or `LocalDate`, the end of the interval, never `null` if the request is an instant
      Throws:
        `URISyntaxException` - if the creation of a uri fails

    - #### validateFeaturesResponse_NumberReturned

          public void validateFeaturesResponse_NumberReturned(Map<String,Object> collection,
                                                              String queryParameter,
                                                              Object begin,
                                                              Object end)

      Abstract Test 22, Test Method 7 (Abstract Test 26)

           Abstract Test 22: /ats/core/fc-response
           Test Purpose: Validate that the Feature Collections complies with the require structure and contents.
           Requirement: /req/core/fc-response

           Test Method
             7. If the numberReturned property is present, validate that it complies with /ats/core/fc-numberReturned

           Abstract Test 26: /ats/core/fc-numberReturned
           Test Purpose: Validate the numberReturned parameter returned with a Features response
           Requirement: /req/core/fc-numberReturned

           Test Method: Validate that the numberReturned value is identical to the number of features in the response.

      Parameters:
        `collection` - the collection under test, never `null`
        `queryParameter` - time parameter as string to use as query parameter, never `null`
        `begin` - a `ZonedDateTime` or `LocalDate`, the begin of the interval (or instant), never `null`
        `end` - a `ZonedDateTime` or `LocalDate`, the end of the interval, never `null` if the request is an instant

Copyright © 2021 Open Geospatial Consortium. All rights reserved.