Class BasicGetFeatureTests

java.lang.Object
org.opengis.cite.iso19142.BaseFixture
org.opengis.cite.iso19142.basic.BasicGetFeatureTests

public class BasicGetFeatureTests extends BaseFixture
Tests the response to a GetFeature request that returns a selection of features matching specified criteria. The request must include one or more stored query (wfs:StoredQuery) or ad hoc query (wfs:Query) expressions. An ad hoc query element may contain projection clauses (wfs:PropertyName), a selection clause (fes:Filter), or a sorting clause (fes:SortBy). A successful response entity must include a schema reference (using the xsi:schemaLocation attribute) that is sufficient to validate the response.
See Also:
  • "ISO 19142:2010, cl. 11: GetFeature operation"
  • "ISO 19142:2010, cl. 7.8: Use of the schemaLocation attribute"
  • "ISO 19143:2010, Geographic information -- Filter encoding"
  • Field Details

  • Constructor Details

    • BasicGetFeatureTests

      public BasicGetFeatureTests()
  • Method Details

    • buildValidator

      @BeforeClass public void buildValidator()
      Creates a special XML Schema validator that uses schema location hints specified in an XML instance document. Beware that this can introduce a vulnerability to denial-of-service attacks, even though local copies of standard schemas will be used if possible.
    • buildRequestEntity

      @BeforeMethod public void buildRequestEntity()
      Builds a DOM Document node representing the entity body for a GetFeature request. A minimal XML representation is read from the classpath ("util/GetFeature-Minimal.xml").
    • resetValidator

      @AfterMethod public void resetValidator()
      Resets the validator to its original configuration.
    • getFeaturesByType

      public void getFeaturesByType(ProtocolBinding binding, QName featureType)
      [Test] Submits a minimal GetFeature request (without a filter predicate) for feature types listed in the WFS the capabilities document. The test is run for all supported protocol bindings and feature types. The response entity (wfs:FeatureCollection) must be schema-valid and contain only instances of the requested type as members.
      Parameters:
      binding - A supported message binding.
      featureType - A QName representing the qualified name of some feature type.
    • getFeatureInOtherCRS

      public void getFeatureInOtherCRS()
      [Test] Submits a request for geometry representations in some other (non-default) CRS that is supported by the IUT, as indicated by the value of the wfs:Query/@srsName attribute or srsName query parameter. The test is skipped if no alternatives are offered for any available feature type.
      See Also:
      • "OGC 09-025r2, 7.9.2.4.4: srsName parameter"
    • getFeatureInUnsupportedCRS

      public void getFeatureInUnsupportedCRS()
      [Test] Submits a request for geometry representations in a non-existent CRS, as indicated by the value of the wfs:Query/@srsName attribute or srsName parameter. An exception is expected in response, with status code 400 and OGC exception code "InvalidParameterValue".
      See Also:
      • "OGC 09-025r2, A.2.22.1.4: srsName parameter"
    • setFeatureAvailability

      void setFeatureAvailability(FeatureTypeInfo featureInfo, Document entity)
      Sets the availability status of instances of a given feature type according to the content of a GetFeature response entity. Availability is set to true if the response entity contains at least one instance.
      Parameters:
      featureInfo - A FeatureTypeInfo object that provides information about a feature type.
      entity - A GetFeature response entity (wfs:FeatureCollection).
    • getFeatureTypeWithInstanceData

      QName getFeatureTypeWithInstanceData()
      Gets the name of a feature type for which instances exist.
      Returns:
      The qualified name of a feature type, or null if no data are available.