use of net.opengis.filter.v_2_0_0.UnaryLogicOpType in project ddf by codice.
the class WfsFilterDelegate method not.
@Override
public FilterType not(FilterType filterToBeNoted) {
FilterType returnFilter = new FilterType();
if (filterToBeNoted == null) {
return returnFilter;
}
UnaryLogicOpType notType = new UnaryLogicOpType();
if (filterToBeNoted.isSetComparisonOps()) {
notType.setComparisonOps(filterToBeNoted.getComparisonOps());
} else if (filterToBeNoted.isSetLogicOps()) {
notType.setLogicOps(filterToBeNoted.getLogicOps());
} else if (filterToBeNoted.isSetSpatialOps()) {
notType.setSpatialOps(filterToBeNoted.getSpatialOps());
} else {
return returnFilter;
}
returnFilter.setLogicOps(filterObjectFactory.createNot(notType));
return returnFilter;
}
use of net.opengis.filter.v_2_0_0.UnaryLogicOpType in project ddf by codice.
the class TestWfsFilterDelegate method testDisjointAsNotBBox.
@Test
public void testDisjointAsNotBBox() throws SAXException, IOException, JAXBException {
WfsFilterDelegate delegate = setupFilterDelegate(SPATIAL_OPERATORS.BBOX.toString());
FilterType filter = delegate.disjoint(Metacard.ANY_GEO, POLYGON);
assertTrue(filter.getLogicOps().getValue() instanceof UnaryLogicOpType);
UnaryLogicOpType type = (UnaryLogicOpType) filter.getLogicOps().getValue();
assertTrue(type.getSpatialOps().getValue() instanceof BBOXType);
assertXMLEqual(MockWfsServer.getNotBboxXmlFilter(), getXmlFromMarshaller(filter));
}
use of net.opengis.filter.v_2_0_0.UnaryLogicOpType in project ddf by codice.
the class TestWfsFilterDelegate method testDwithinAsNotBeyond.
@Test
public void testDwithinAsNotBeyond() {
WfsFilterDelegate delegate = setupFilterDelegate(SPATIAL_OPERATORS.Beyond.toString());
FilterType filter = delegate.dwithin(Metacard.ANY_GEO, POLYGON, DISTANCE);
assertTrue(filter.getLogicOps().getValue() instanceof UnaryLogicOpType);
UnaryLogicOpType type = (UnaryLogicOpType) filter.getLogicOps().getValue();
assertTrue(type.getSpatialOps().getValue() instanceof DistanceBufferType);
}
use of net.opengis.filter.v_2_0_0.UnaryLogicOpType in project ddf by codice.
the class TestCswFilterDelegate method testPropertyIsLikeNot.
@Test
public void testPropertyIsLikeNot() throws JAXBException, SAXException, IOException {
FilterType propertyIsLikeFilter = cswFilterDelegateLatLon.propertyIsLike(propertyName, likeLiteral, isCaseSensitive);
FilterType filter = cswFilterDelegateLatLon.not(propertyIsLikeFilter);
assertThat(filter, notNullValue());
assertThat(filter.getLogicOps().getName(), is(NOT_LOGIC_OPS_NAME));
UnaryLogicOpType ulot = (UnaryLogicOpType) filter.getLogicOps().getValue();
assertThat(ulot, notNullValue());
}
use of net.opengis.filter.v_2_0_0.UnaryLogicOpType in project ddf by codice.
the class TestWfsFilterDelegate method testBeyondAsNotDwithin.
@Test
public void testBeyondAsNotDwithin() {
WfsFilterDelegate delegate = setupFilterDelegate(SPATIAL_OPERATORS.DWithin.toString());
FilterType filter = delegate.beyond(Metacard.ANY_GEO, POLYGON, DISTANCE);
assertTrue(filter.getLogicOps().getValue() instanceof UnaryLogicOpType);
UnaryLogicOpType type = (UnaryLogicOpType) filter.getLogicOps().getValue();
assertTrue(type.getSpatialOps().getValue() instanceof DistanceBufferType);
}
Aggregations