use of net.opengis.filter.v_2_0_0.FilterType in project ddf by codice.
the class TestCswCqlFilter method testPropertyIsLessThanStringLiteral.
/**
* Property is less than tests
*/
@Test
public void testPropertyIsLessThanStringLiteral() throws UnsupportedQueryException {
FilterType filterType = cswFilterDelegate.propertyIsLessThan(propertyName, stringLiteral);
String cqlText = CswCqlTextFilter.getInstance().getCqlText(filterType);
assertThat(propertyIsLessThan, is(cqlText));
}
use of net.opengis.filter.v_2_0_0.FilterType in project ddf by codice.
the class TestCswCqlFilter method testPropertyIsGreaterThanLongLiteral.
@Test
public void testPropertyIsGreaterThanLongLiteral() throws UnsupportedQueryException {
FilterType filterType = cswFilterDelegate.propertyIsGreaterThan(propertyName, longLiteral);
String cqlText = CswCqlTextFilter.getInstance().getCqlText(filterType);
assertThat(propertyIsGreaterThan, is(cqlText));
}
use of net.opengis.filter.v_2_0_0.FilterType in project ddf by codice.
the class TestCswCqlFilter method testPropertyIsEqualToLongLiteral.
@Test
public void testPropertyIsEqualToLongLiteral() throws UnsupportedQueryException {
FilterType filterType = cswFilterDelegate.propertyIsEqualTo(propertyName, longLiteral);
String cqlText = CswCqlTextFilter.getInstance().getCqlText(filterType);
assertThat(propertyIsEqualTo, is(cqlText));
}
use of net.opengis.filter.v_2_0_0.FilterType in project ddf by codice.
the class CswFilterFactory method buildPropertyIsLessThanFilter.
public FilterType buildPropertyIsLessThanFilter(String propertyName, Object literal) {
FilterType filter = new FilterType();
filter.setComparisonOps(createPropertyIsLessThan(propertyName, literal));
return filter;
}
use of net.opengis.filter.v_2_0_0.FilterType in project ddf by codice.
the class TestCswFilterDelegate method testDWitinFallbackToIntersectsPolygonIntersectsCswGeometryPropertyOwsBoundingBox.
/**
* In the following case, when DWithin falls back to Intersects, the pointWkt gets turned into a
* linear ring ("circular" polygon) with radius "SAMPLE_DISTANCE" (the buffer). In this case, the CSW
* endpoint supports "Polygon" (its spatial capabilities), so the resulting filter should
* contain the linear ring.
*/
@Test
public void testDWitinFallbackToIntersectsPolygonIntersectsCswGeometryPropertyOwsBoundingBox() throws JAXBException, SAXException, IOException {
String propName = CswConstants.BBOX_PROP;
CswFilterDelegate localCswFilterDelegate = initCswFilterDelegate(getMockFilterCapabilitiesForSpatialFallback(Arrays.asList(INTERSECTS), Arrays.asList("Polygon")), initCswSourceConfiguration(CswAxisOrder.LAT_LON, false, CswConstants.CSW_TYPE));
FilterType filterType = localCswFilterDelegate.dwithin(propName, pointWkt, SAMPLE_DISTANCE);
assertXMLEqual(dWithinFallbackToIntersects2, getXmlFromMarshaller(filterType));
}
Aggregations