Class IntersectsTests
java.lang.Object
org.opengis.cite.iso19142.BaseFixture
org.opengis.cite.iso19142.basic.filter.QueryFilterFixture
org.opengis.cite.iso19142.basic.filter.spatial.IntersectsTests
Tests the response to a GetFeature request that includes the spatial predicate
Intersects. This predicate is the logical complement of the Disjoint
predicate; that is:
a.Intersects(b) ⇔ ! a.Disjoint(b)
- See Also:
-
- "OGC 09-026r2, A.8: Test cases for spatial filter"
- "ISO 19125-1, 6.1.15.3"
-
Field Summary
FieldsFields 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) voidaddSpatialPredicate(Document request, String spatialOp, Element gmlGeom, Element valueRef) Adds a spatial predicate to a GetFeature request entity.(package private) DocumentbuildGetFeatureRequest(QName featureType, String operator, org.apache.xerces.xs.XSElementDeclaration propertyDecl, Element literal) Builds a simple GetFeature request entity that contains a basic filter expression.voidFinds the geometry properties for all feature types recognized by the SUT.voidChecks if the spatial operator "Intersects" is implemented and which geometry operands are supported.voidimplementsSpatialFilter(org.testng.ITestContext testContext) Checks the value of the filter constraint "ImplementsSpatialFilter" in the capabilities document.voidintersectsCurve(ProtocolBinding binding, QName featureType) [Test] Submits a GetFeature request containing an Intersects predicate with a gml:LineString or gml:Curve (LineStringSegment) operand.voidintersectsPolygon(ProtocolBinding binding, QName featureType) [Test] Submits a GetFeature request containing an Intersects predicate with a gml:Polygon operand.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
-
Field Details
-
IMPL_SPATIAL_FILTER
- See Also:
-
-
Constructor Details
-
IntersectsTests
public IntersectsTests()
-
-
Method Details
-
implementsSpatialFilter
@BeforeTest public void implementsSpatialFilter(org.testng.ITestContext testContext) Checks the value of the filter constraint "ImplementsSpatialFilter" in the capabilities document. All tests are skipped if this is not "TRUE".- Parameters:
testContext- Information about the test run environment.
-
findAllGeometryProperties
@BeforeClass public void findAllGeometryProperties()Finds the geometry properties for all feature types recognized by the SUT. -
implementsIntersectsOp
@BeforeClass public void implementsIntersectsOp()Checks if the spatial operator "Intersects" is implemented and which geometry operands are supported. If it's not implemented, all tests for this operator are skipped. -
intersectsPolygon
public void intersectsPolygon(ProtocolBinding binding, QName featureType) throws XPathExpressionException [Test] Submits a GetFeature request containing an Intersects predicate with a gml:Polygon operand. The response entity must be schema-valid and contain only matching instances.- Parameters:
binding- The ProtocolBinding to use for this request.featureType- A QName representing the qualified name of some feature type.- Throws:
XPathExpressionException
-
intersectsCurve
public void intersectsCurve(ProtocolBinding binding, QName featureType) throws XPathExpressionException [Test] Submits a GetFeature request containing an Intersects predicate with a gml:LineString or gml:Curve (LineStringSegment) operand. The response entity must be schema-valid and contain only matching instances.- Parameters:
binding- The ProtocolBinding to use for this request.featureType- A QName representing the qualified name of some feature type.- Throws:
XPathExpressionException
-
buildGetFeatureRequest
Document buildGetFeatureRequest(QName featureType, String operator, org.apache.xerces.xs.XSElementDeclaration propertyDecl, Element literal) Builds a simple GetFeature request entity that contains a basic filter expression.- Parameters:
featureType- The name of the feature type.operator- The name of the filter predicate (operator).propertyDecl- The declaration of the feature property to be queried.literal- An element representing the literal value to match.- Returns:
- A Document containing a request entity with wfs:GetFeature as the document element.
-
addSpatialPredicate
Adds a spatial predicate to a GetFeature request entity. If the given geometry element has no spatial reference (srsName) it is assumed to use the default CRS specified in the capabilities document.- Parameters:
request- The request entity (wfs:GetFeature).spatialOp- The name of a spatial operator.gmlGeom- A DOM Element representing a GML geometry.valueRef- An Element (fes:ValueReference) that specifies the spatial property to check. If it isnull, the predicate applies to all spatial properties.
-