Class 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
  • 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.