use of org.geotools.filter.FilterFactoryImpl in project ddf by codice.
the class CswQueryFilterTransformer method transform.
@Override
public QueryRequest transform(QueryRequest queryRequest, Map<String, Serializable> properties) {
Query query = queryRequest.getQuery();
Filter filter = (Filter) query.accept(filterVisitor, new FilterFactoryImpl());
Query transformedQuery = new QueryImpl(filter, query.getStartIndex(), query.getPageSize(), query.getSortBy(), query.requestsTotalResultsCount(), query.getTimeoutMillis());
return new QueryRequestImpl(transformedQuery, queryRequest.isEnterprise(), queryRequest.getSourceIds(), queryRequest.getProperties());
}
use of org.geotools.filter.FilterFactoryImpl in project ddf by codice.
the class SourceIdFilterVisitorTest method testSourceIdsAreRemovedFromFilter.
@Test
public void testSourceIdsAreRemovedFromFilter() {
Filter filter = buildFilter(SOURCE_IDS);
Filter result = (Filter) filter.accept(sourceIdFilter, new FilterFactoryImpl());
SourceIdFilterVisitor visitor = new SourceIdFilterVisitor();
result.accept(visitor, new FilterFactoryImpl());
assertThat(visitor.getSourceIds(), equalTo(Collections.emptyList()));
}
use of org.geotools.filter.FilterFactoryImpl in project ddf by codice.
the class SourceIdFilterVisitorTest method testFilterWithoutSourceIdsIsUnchanged.
@Test
public void testFilterWithoutSourceIdsIsUnchanged() {
Filter result = (Filter) filterWithoutSourceIds.accept(sourceIdFilter, new FilterFactoryImpl());
assertThat(result, equalTo(filterWithoutSourceIds));
assertThat(sourceIdFilter.getSourceIds(), equalTo(Collections.emptyList()));
}
Aggregations