use of org.oasis_open.docs.wsn.b_2.FilterType in project ddf by codice.
the class TestCswCqlFilter method testComparisonOpsOr.
@Test
public void testComparisonOpsOr() throws UnsupportedQueryException {
FilterType propertyIsLikeFilter = cswFilterDelegate.propertyIsLike(propertyName, likeLiteral, isCaseSensitive);
FilterType propertyIsEqualFilter = cswFilterDelegate.propertyIsEqualTo(propertyName, booleanLiteral);
List<FilterType> filters = new ArrayList<>();
filters.add(propertyIsEqualFilter);
filters.add(propertyIsLikeFilter);
FilterType filter = cswFilterDelegate.or(filters);
String cqlText = CswCqlTextFilter.getInstance().getCqlText(filter);
assertThat(orComparisonOps, is(cqlText));
}
use of org.oasis_open.docs.wsn.b_2.FilterType in project ddf by codice.
the class TestCswCqlFilter method testPropertyIsGreaterThanStringLiteralAnyText.
@Test
public void testPropertyIsGreaterThanStringLiteralAnyText() throws UnsupportedQueryException {
FilterType filterType = cswFilterDelegate.propertyIsGreaterThan(propertyNameAnyText, stringLiteral);
String cqlText = CswCqlTextFilter.getInstance().getCqlText(filterType);
assertThat(propertyIsGreaterThanAnyText, is(cqlText));
}
use of org.oasis_open.docs.wsn.b_2.FilterType in project ddf by codice.
the class TestCswCqlFilter method testTouchesPropertyOwsBoundingBoxPolygon.
@Test
public void testTouchesPropertyOwsBoundingBoxPolygon() throws UnsupportedQueryException {
String propName = CswConstants.BBOX_PROP;
FilterType filterType = cswFilterDelegate.touches(propName, polygonWkt);
String cqlText = CswCqlTextFilter.getInstance().getCqlText(filterType);
assertThat(touchesPolygonPropertyOwsBoundingBox, is(cqlText));
}
use of org.oasis_open.docs.wsn.b_2.FilterType in project ddf by codice.
the class TestCswCqlFilter method testPropertyIsGreaterThanOrEqualToIntLiteral.
@Test
public void testPropertyIsGreaterThanOrEqualToIntLiteral() throws UnsupportedQueryException {
FilterType filterType = cswFilterDelegate.propertyIsGreaterThanOrEqualTo(propertyName, intLiteral);
String cqlText = CswCqlTextFilter.getInstance().getCqlText(filterType);
assertThat(propertyIsGreaterThanOrEqualTo, is(cqlText));
}
use of org.oasis_open.docs.wsn.b_2.FilterType in project ddf by codice.
the class TestCswCqlFilter method testLogicOpsFiltersAnd.
@Test
public void testLogicOpsFiltersAnd() throws UnsupportedQueryException {
FilterType propertyIsLikeFilter = cswFilterDelegate.propertyIsLike(propertyName, likeLiteral, isCaseSensitive);
FilterType notFilter = cswFilterDelegate.not(propertyIsLikeFilter);
FilterType propertyIsEqualFilter = cswFilterDelegate.propertyIsEqualTo(propertyName, booleanLiteral);
List<FilterType> filters = new ArrayList<>();
filters.add(notFilter);
filters.add(propertyIsEqualFilter);
FilterType filter = cswFilterDelegate.and(filters);
String cqlText = CswCqlTextFilter.getInstance().getCqlText(filter);
assertThat(andLogicOps, is(cqlText));
}
Aggregations