Class PropertyIsNilOperatorTests
java.lang.Object
org.opengis.cite.iso19142.BaseFixture
org.opengis.cite.iso19142.basic.filter.QueryFilterFixture
org.opengis.cite.iso19142.basic.filter.PropertyIsNilOperatorTests
Tests the response to a GetFeature request that includes a
PropertyIsNil filter
predicate that tests the content of a specified property and evaluates if it is nil. It
is also possible to check the reason for a missing value by matching on the nilReason
parameter. While the gml:boundedBy property is nillable, it is ignored; the application
schema must define at least one nillable feature property.
In the GML schema and in GML application schemas, the "nillable" and "nilReason" construction may be used on elements representing GML properties (see 7.2.3). This allows properties that are part of the content of objects and features in GML and GML application languages to be declared to be mandatory, while still permitting them to appear in an instance document with no value. [ISO 19136/OGC 07-036, 8.2.3.2]
Sources
- ISO 19142:2010, cl. A.1.2: Basic WFS
- ISO 19143:2010, cl. 7.7.3.6: PropertyIsNil operator
- ISO 19143:2010, cl. A.6: Test cases for standard filter
- ISO 19136:2007, cl. 8.2.3.2: Elements declared to be "nillable"
- See Also:
-
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) voidaddPropertyIsNilPredicate(Document request, QName propertyName, String nilReason, boolean negate) Adds aPropertyIsNilpredicate to a GetFeature request entity with the given property name.voidpropertyIsNil(ProtocolBinding binding, QName featureType) [Test] Submits a GetFeature request containing aPropertyIsNilpredicate designating a nillable feature property (one per feature type).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
-
PropertyIsNilOperatorTests
public PropertyIsNilOperatorTests()
-
-
Method Details
-
propertyIsNil
[Test] Submits a GetFeature request containing aPropertyIsNilpredicate designating a nillable feature property (one per feature type). The response entity must include only feature instances that include the specified property with @xsi:nil="true".All Basic WFS implementations must support the Standard Filter conformance class defined in OpenGIS Filter Encoding 2.0 Encoding Standard (ISO 19143).
- Parameters:
binding- The ProtocolBinding to use for this request.featureType- The FeatureType to use for this test.
-
addPropertyIsNilPredicate
void addPropertyIsNilPredicate(Document request, QName propertyName, String nilReason, boolean negate) Adds aPropertyIsNilpredicate to a GetFeature request entity with the given property name.<Filter xmlns="http://www.opengis.net/fes/2.0"> <PropertyIsNil nilReason="withheld"> <ValueReference>tns:featureProperty</ValueReference> </PropertyIsNil> </Filter>- Parameters:
request- The request entity (/wfs:GetFeature).propertyName- A QName that specifies the feature property to check.nilReason- A String that specifies a reason for the missing value; it may be a standard value or an absolute URI in accord with the gml:NilReasonType type definition. Supply an empty string or null value if the reason does not matter.negate- Negates the predicate by inserting a<Not>operator (logical complement).
-