Package org.opengis.cite.iso19142.basic.filter

# Class PropertyIsEqualToOperatorTests

java.lang.Object
org.opengis.cite.iso19142.BaseFixture
org.opengis.cite.iso19142.basic.filter.QueryFilterFixture
org.opengis.cite.iso19142.basic.filter.PropertyIsEqualToOperatorTests

public class PropertyIsEqualToOperatorTests extends QueryFilterFixture
Tests the response to a GetFeature request that includes a `PropertyIs[Not]EqualTo` filter that compares the value of a property against some specified value. The comparison may or may not be done in a case-sensitive manner. If a property has multiple values, the `matchAction` parameter affects the scope of the comparison ("All", "Any", "One").

Sources

- ISO 19142:2010, cl. A.1.2: Basic WFS
- ISO 19143:2010, cl. 7.7: Comparison operators
- ISO 19143:2010, cl. A.5: Test cases for minimum standard filter

- ## Field Summary

  ### Fields inherited from class org.opengis.cite.iso19142.basic.filter.QueryFilterFixture

  `dataSampler, GET_FEATURE_MINIMAL, model, temporalProperties`

  ### Fields inherited from class org.opengis.cite.iso19142.BaseFixture

  `docBuilder, ETS_PKG, featureInfo, featureTypes, reqEntity, rspEntity, supportedBindings, TNS_PREFIX, wfsClient, wfsMetadata, wfsVersion`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PropertyIsEqualToOperatorTests()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `(package private) void`
  `addPropertyIsEqualToPredicate(Document request, QName propertyName, String value, boolean matchCase, String matchAction, boolean negate)`
  Adds a `PropertyIsEqualTo` predicate to a GetFeature request entity with the given property name and literal value.
  `(package private) Map<org.apache.xerces.xs.XSElementDeclaration,String>`
  `findMatchingPropertyValue(QName featureType)`
  Inspects sample data retrieved from the SUT and finds a value that matches at least one simple property for the specified feature type.
  `void`
  `propertyIsEqualTo_caseSensitive(ProtocolBinding binding, QName featureType)`
  [`Test`] Submits a GetFeature request containing a `PropertyIsEqualTo` predicate that applies to some simple feature property.
  `void`
  `propertyIsNotEqualTo_caseSensitive(ProtocolBinding binding, QName featureType)`
  [`Test`] Submits a GetFeature request containing a `PropertyIsNotEqualTo` predicate that applies to some simple feature property.

  ### Methods inherited from class org.opengis.cite.iso19142.basic.filter.QueryFilterFixture

  `buildRequestEntity, discardResponseEntity, findTemporalProperties, getModel, initQueryFilterFixture`

  ### Methods inherited from class org.opengis.cite.iso19142.BaseFixture

  `addAttributesOnTestFailure, allProtocolsAndFeatureTypes, bindingAndAvailFeatureTypeProductSet, extractBodyAsDocument, getFeatureTypes, getInstantiatedFeatureTypes, getProtocolBindings, initBaseFixture, initParser, setWfsClient`

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

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

- ## Constructor Details

  - ### PropertyIsEqualToOperatorTests

    public PropertyIsEqualToOperatorTests()

- ## Method Details

  - ### propertyIsEqualTo_caseSensitive

    public void propertyIsEqualTo_caseSensitive(ProtocolBinding binding, QName featureType)
    [`Test`] Submits a GetFeature request containing a `PropertyIsEqualTo` predicate that applies to some simple feature property. The response entity must include only feature instances with matching (case-sensitive) property values; if multiple values exist, at least one must match (matchAction="Any").
    Parameters:
      `binding` - The ProtocolBinding to use for this request.
      `featureType` - A QName representing the qualified name of some feature type.

  - ### propertyIsNotEqualTo_caseSensitive

    public void propertyIsNotEqualTo_caseSensitive(ProtocolBinding binding, QName featureType)
    [`Test`] Submits a GetFeature request containing a `PropertyIsNotEqualTo` predicate that applies to some simple feature property. The response entity must not include any features with a matching (case-sensitive) property value; if multiple values exist, all must satisfy the predicate (matchAction="All").
    Parameters:
      `binding` - The ProtocolBinding to use for this request.
      `featureType` - A QName representing the qualified name of some feature type.

  - ### addPropertyIsEqualToPredicate

    void addPropertyIsEqualToPredicate(Document request, QName propertyName, String value, boolean matchCase, String matchAction, boolean negate)
    Adds a `PropertyIsEqualTo` predicate to a GetFeature request entity with the given property name and literal value. The predicate is structured as shown in the listing below.

         <Filter xmlns="http://www.opengis.net/fes/2.0">
           <PropertyIsEqualTo matchCase="true" matchAction="Any">
             <Literal>value</Literal>
             <ValueReference>tns:featureProperty</ValueReference>
           </PropertyIsEqualTo>
         </Filter>

    Parameters:
      `request` - The request entity (/wfs:GetFeature).
      `propertyName` - A QName that specifies the feature property to check.
      `value` - The literal value to match the property value against.
      `matchCase` - A boolean value indicating whether or not the comparison should be case-sensitive.
      `matchAction` - A String specifying how the predicate should be applied to a multi-valued property; the default value is "Any".
      `negate` - Negates the predicate by using the `PropertyIsNotEqualTo` predicate instead.

  - ### findMatchingPropertyValue

    Map<org.apache.xerces.xs.XSElementDeclaration,String> findMatchingPropertyValue(QName featureType)
    Inspects sample data retrieved from the SUT and finds a value that matches at least one simple property for the specified feature type. If the property occurs more than once only the first occurrrence is used.
    Parameters:
      `featureType` - The qualified name of some feature type.
    Returns:
      A Map containing a single entry where the key is an element declaration and the value is a String representing the property value.