Class PropertyIsEqualToOperatorTests
java.lang.Object
org.opengis.cite.iso19142.BaseFixture
org.opengis.cite.iso19142.basic.filter.QueryFilterFixture
org.opengis.cite.iso19142.basic.filter.PropertyIsEqualToOperatorTests
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, temporalPropertiesFields inherited from class org.opengis.cite.iso19142.BaseFixture
docBuilder, ETS_PKG, featureInfo, featureTypes, reqEntity, rspEntity, supportedBindings, TNS_PREFIX, wfsClient, wfsMetadata, wfsVersion -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddPropertyIsEqualToPredicate(Document request, QName propertyName, String value, boolean matchCase, String matchAction, boolean negate) Adds aPropertyIsEqualTopredicate to a GetFeature request entity with the given property name and literal value.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.voidpropertyIsEqualTo_caseSensitive(ProtocolBinding binding, QName featureType) [Test] Submits a GetFeature request containing aPropertyIsEqualTopredicate that applies to some simple feature property.voidpropertyIsNotEqualTo_caseSensitive(ProtocolBinding binding, QName featureType) [Test] Submits a GetFeature request containing aPropertyIsNotEqualTopredicate that applies to some simple feature property.Methods inherited from class org.opengis.cite.iso19142.basic.filter.QueryFilterFixture
buildRequestEntity, discardResponseEntity, findTemporalProperties, getModel, initQueryFilterFixtureMethods inherited from class org.opengis.cite.iso19142.BaseFixture
addAttributesOnTestFailure, allProtocolsAndFeatureTypes, bindingAndAvailFeatureTypeProductSet, extractBodyAsDocument, getFeatureTypes, getInstantiatedFeatureTypes, getProtocolBindings, initBaseFixture, initParser, setWfsClient
-
Constructor Details
-
PropertyIsEqualToOperatorTests
public PropertyIsEqualToOperatorTests()
-
-
Method Details
-
propertyIsEqualTo_caseSensitive
[Test] Submits a GetFeature request containing aPropertyIsEqualTopredicate 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
[Test] Submits a GetFeature request containing aPropertyIsNotEqualTopredicate 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 aPropertyIsEqualTopredicate 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 thePropertyIsNotEqualTopredicate instead.
-
findMatchingPropertyValue
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.
-