use of ogc.schema.opengis.filter.v_1_0_0.FilterType in project ddf by codice.
the class CswFilterFactory method getFeatureIds.
private Set<String> getFeatureIds(List<FilterType> filters) {
Set<String> ids = new HashSet<String>();
if (!CollectionUtils.isEmpty(filters)) {
boolean isFeatureIdFilter = filters.get(0) != null && filters.get(0).isSetId();
for (FilterType filter : filters) {
if ((filter != null && filter.isSetId()) != isFeatureIdFilter) {
throw new UnsupportedOperationException("Query with mix of FeatureID and non-FeatureID queries not supported.");
}
if (isFeatureIdFilter) {
Iterator<JAXBElement<? extends AbstractIdType>> iter = filter.getId().iterator();
while (iter.hasNext()) {
@SuppressWarnings("unchecked") FeatureIdType idType = ((JAXBElement<FeatureIdType>) iter.next()).getValue();
ids.add(idType.getFid());
}
}
}
}
return ids;
}
use of ogc.schema.opengis.filter.v_1_0_0.FilterType in project ddf by codice.
the class CswFilterFactory method buildPropertyIsGreaterThanFilter.
public FilterType buildPropertyIsGreaterThanFilter(String propertyName, Object literal) {
FilterType filter = new FilterType();
filter.setComparisonOps(createPropertyIsGreaterThan(propertyName, literal));
return filter;
}
use of ogc.schema.opengis.filter.v_1_0_0.FilterType in project ddf by codice.
the class TestCswCqlFilter method testPropertyBetweenLongLiterals.
@Test
public void testPropertyBetweenLongLiterals() throws UnsupportedQueryException {
FilterType filterType = cswFilterDelegate.propertyIsBetween(propertyName, longLowerBoundary, longUpperBoundary);
String cqlText = CswCqlTextFilter.getInstance().getCqlText(filterType);
assertThat(propertyIsBetween, is(cqlText));
}
use of ogc.schema.opengis.filter.v_1_0_0.FilterType in project ddf by codice.
the class TestCswCqlFilter method testPropertyIsLessThanDoubleLiteral.
@Test
public void testPropertyIsLessThanDoubleLiteral() throws UnsupportedQueryException {
FilterType filterType = cswFilterDelegate.propertyIsLessThan(propertyName, doubleLiteral);
String cqlText = CswCqlTextFilter.getInstance().getCqlText(filterType);
assertThat(propertyIsLessThanWithDecimal, is(cqlText));
}
use of ogc.schema.opengis.filter.v_1_0_0.FilterType in project ddf by codice.
the class TestCswCqlFilter method testPropertyIsEqualToFloatLiteral.
@Test
public void testPropertyIsEqualToFloatLiteral() throws UnsupportedQueryException {
FilterType filterType = cswFilterDelegate.propertyIsEqualTo(propertyName, floatLiteral);
String cqlText = CswCqlTextFilter.getInstance().getCqlText(filterType);
assertThat(propertyIsEqualToWithDecimal, is(cqlText));
}
Aggregations