use of net.opengis.filter.v_2_0_0.FilterType in project ddf by codice.
the class TestCswFilterDelegate method testPropertyIsGreaterThanOrEqualToShortLiteral.
@Test
public void testPropertyIsGreaterThanOrEqualToShortLiteral() throws JAXBException, SAXException, IOException {
FilterType filterType = cswFilterDelegateLatLon.propertyIsGreaterThanOrEqualTo(propertyName, shortLiteral);
assertXMLEqual(propertyIsGreaterThanOrEqualToXml, getXmlFromMarshaller(filterType));
}
use of net.opengis.filter.v_2_0_0.FilterType in project ddf by codice.
the class TestCswFilterDelegate method testPropertyBetweenStringLiterals.
/**
* Property is between tests
*/
@Test
public void testPropertyBetweenStringLiterals() throws JAXBException, SAXException, IOException {
FilterType filterType = cswFilterDelegateLatLon.propertyIsBetween(propertyName, stringLowerBoundary, stringUpperBoundary);
assertXMLEqual(propertyIsBetweenXml, getXmlFromMarshaller(filterType));
}
use of net.opengis.filter.v_2_0_0.FilterType in project ddf by codice.
the class TestCswFilterDelegate method testFeatureIdOr.
@Test
public void testFeatureIdOr() throws JAXBException, SAXException, IOException, XpathException {
ObjectFactory filterObjectFactory = new ObjectFactory();
FeatureIdType fidType = new FeatureIdType();
fidType.setFid("cswRecord.1234");
List<JAXBElement<? extends AbstractIdType>> fidFilters = new ArrayList<>();
fidFilters.add(filterObjectFactory.createFeatureId(fidType));
FilterType idFilter = new FilterType();
idFilter.setId(fidFilters);
FeatureIdType fidType2 = new FeatureIdType();
fidType2.setFid("cswRecord.5678");
List<JAXBElement<? extends AbstractIdType>> fidFilters2 = new ArrayList<>();
fidFilters2.add(filterObjectFactory.createFeatureId(fidType2));
FilterType idFilter2 = new FilterType();
idFilter2.setId(fidFilters2);
List<FilterType> filters = new ArrayList<>();
filters.add(idFilter);
filters.add(idFilter2);
FilterType filterType = cswFilterDelegateLatLon.or(filters);
String xml = getXmlFromMarshaller(filterType);
assertXpathExists("/ogc:Filter/ogc:FeatureId[@fid='cswRecord.1234']", xml);
assertXpathExists("/ogc:Filter/ogc:FeatureId[@fid='cswRecord.5678']", xml);
}
use of net.opengis.filter.v_2_0_0.FilterType in project ddf by codice.
the class TestCswFilterDelegate method testIntersectsPropertyOwsBoundingBoxMultiPoint.
@Test
public void testIntersectsPropertyOwsBoundingBoxMultiPoint() throws JAXBException, SAXException, IOException {
String propName = CswConstants.BBOX_PROP;
FilterType filterType = cswFilterDelegateLatLon.intersects(propName, multiPointWkt);
assertXMLEqual(intersectsMultiPointXmlPropertyOwsBoundingBox, getXmlFromMarshaller(filterType));
}
use of net.opengis.filter.v_2_0_0.FilterType in project ddf by codice.
the class TestCswFilterDelegate method testBefore.
@Test
public void testBefore() throws Exception {
// Setup
CswSourceConfiguration cswSourceConfiguration = initCswSourceConfiguration(CswAxisOrder.LAT_LON, false, CswConstants.CSW_TYPE, effectiveDateMapping, createdDateMapping, modifiedDateMapping, CswConstants.CSW_IDENTIFIER);
DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
String dateStr = fmt.print(testStartDate);
String controlFilterAsXml = beforeXml.replace(REPLACE_TEMPORAL_PROPERTY, createdDateMapping).replace(REPLACE_DATE, dateStr);
CswFilterDelegate localCswFilterDelegate = createCswFilterDelegate(cswSourceConfiguration);
// Perform Test
FilterType filterType = localCswFilterDelegate.before(propertyNameCreated, testStartDate.toDate());
// Verify
assertXMLEqual(controlFilterAsXml, getXmlFromMarshaller(filterType));
}
Aggregations