Class PropertyIsLikeOperatorTests
java.lang.Object
org.opengis.cite.iso19142.BaseFixture
org.opengis.cite.iso19142.basic.filter.QueryFilterFixture
org.opengis.cite.iso19142.basic.filter.PropertyIsLikeOperatorTests
Tests the response to a GetFeature request that includes a
PropertyIsLike
filter that tests the value of a property using a specified pattern--a combination of
regular characters and metacharacters. The PropertyIsLike predicate can be
regarded as a very simple regular expression operator.
Sources
- ISO 19142:2010, cl. A.1.2: Basic WFS
- ISO 19143:2010, cl. 7.7.3.4: PropertyIsLike operator
- ISO 19143:2010, cl. A.6: Test cases for 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) voidaddPropertyIsLikePredicate(Document request, QName propertyName, String pattern, boolean negate) Adds aPropertyIsLikepredicate to a GetFeature request entity with the given property name and pattern.generateMatchingStringPattern(QName featureType) Inspects sample data retrieved from the SUT and generates a pattern that matches at least one simple property value (of type xsd:string) for the specified feature type.voidpropertyIsLike(ProtocolBinding binding, QName featureType) [Test] Submits a GetFeature request containing aPropertyIsLikepredicate that applies to some simple feature property (of type xsd:string).voidpropertyIsNotLike(ProtocolBinding binding, QName featureType) [Test] Submits a GetFeature request containing aNot/PropertyIsLikepredicate that applies to some simple feature property (of type xsd:string).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
-
PropertyIsLikeOperatorTests
public PropertyIsLikeOperatorTests()
-
-
Method Details
-
propertyIsNotLike
[Test] Submits a GetFeature request containing aNot/PropertyIsLikepredicate that applies to some simple feature property (of type xsd:string). The response entity must not include any feature instances with matching property values.- Parameters:
binding- The ProtocolBinding to use for this request.featureType- A QName representing the qualified name of some feature type.
-
propertyIsLike
[Test] Submits a GetFeature request containing aPropertyIsLikepredicate that applies to some simple feature property (of type xsd:string). The response entity must include only features with a property value matching the specified pattern.- Parameters:
binding- The ProtocolBinding to use for this request.featureType- A QName representing the qualified name of some feature type.
-
addPropertyIsLikePredicate
void addPropertyIsLikePredicate(Document request, QName propertyName, String pattern, boolean negate) Adds aPropertyIsLikepredicate to a GetFeature request entity with the given property name and pattern. The metacharacters are shown in the following example.<Filter xmlns="http://www.opengis.net/fes/2.0"> <PropertyIsLike wildCard="*" singleChar="." escapeChar="\"> <ValueReference>tns:featureProperty</ValueReference> <Literal>*pattern-.</Literal> </PropertyIsLike> </Filter>- Parameters:
request- The request entity (/wfs:GetFeature).propertyName- A QName that specifies the feature property to check.pattern- The pattern to match the property value against.negate- Negates the predicate by inserting a<Not>operator (logical complement).
-
generateMatchingStringPattern
Inspects sample data retrieved from the SUT and generates a pattern that matches at least one simple property value (of type xsd:string) for the specified feature type. If the property occurs more than once only the first occurrrence is used. Complex properties are not inspected for constituent string elements.- Parameters:
featureType- The qualified name of some feature type.- Returns:
- A Map containing a single entry where the key is a property name and the value is a pattern (with metacharacters).
-