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

# Class PropertyIsNilOperatorTests

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

public class PropertyIsNilOperatorTests extends QueryFilterFixture
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:
  - OGC 07-036: GML 3.2.1

- ## 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
  `PropertyIsNilOperatorTests()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `(package private) void`
  `addPropertyIsNilPredicate(Document request, QName propertyName, String nilReason, boolean negate)`
  Adds a `PropertyIsNil` predicate to a GetFeature request entity with the given property name.
  `void`
  `propertyIsNil(ProtocolBinding binding, QName featureType)`
  [`Test`] Submits a GetFeature request containing a `PropertyIsNil` predicate designating a nillable feature property (one per feature type).

  ### 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

  - ### PropertyIsNilOperatorTests

    public PropertyIsNilOperatorTests()

- ## Method Details

  - ### propertyIsNil

    public void propertyIsNil(ProtocolBinding binding, QName featureType)
    [`Test`] Submits a GetFeature request containing a `PropertyIsNil` predicate 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 a `PropertyIsNil` predicate 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).