Search in sources :

Example 96 with FilterType

use of net.opengis.filter.v_2_0_0.FilterType in project ddf by codice.

the class TestCswFilterDelegate method testPropertyIsGreaterThanOrEqualToFloatLiteral.

@Test
public void testPropertyIsGreaterThanOrEqualToFloatLiteral() throws JAXBException, SAXException, IOException {
    FilterType filterType = cswFilterDelegateLatLon.propertyIsGreaterThanOrEqualTo(propertyName, floatLiteral);
    assertXMLEqual(propertyIsGreaterThanOrEqualToXmlWithDecimal, getXmlFromMarshaller(filterType));
}
Also used : FilterType(net.opengis.filter.v_1_1_0.FilterType) Test(org.junit.Test)

Example 97 with FilterType

use of net.opengis.filter.v_2_0_0.FilterType in project ddf by codice.

the class TestCswFilterDelegate method testPropertyIsNotEqualToStringLiteralAnyText.

@Test
public void testPropertyIsNotEqualToStringLiteralAnyText() throws JAXBException, SAXException, IOException {
    FilterType filterType = cswFilterDelegateLatLon.propertyIsNotEqualTo(propertyNameAnyText, stringLiteral, isCaseSensitive);
    assertXMLEqual(propertyIsNotEqualToXmlAnyText, getXmlFromMarshaller(filterType));
}
Also used : FilterType(net.opengis.filter.v_1_1_0.FilterType) Test(org.junit.Test)

Example 98 with FilterType

use of net.opengis.filter.v_2_0_0.FilterType in project ddf by codice.

the class TestCswFilterDelegate method testPropertyIsEqualToIntLiteral.

@Test
public void testPropertyIsEqualToIntLiteral() throws JAXBException, SAXException, IOException {
    FilterType filterType = cswFilterDelegateLatLon.propertyIsEqualTo(propertyName, intLiteral);
    assertXMLEqual(propertyIsEqualToXml, getXmlFromMarshaller(filterType));
}
Also used : FilterType(net.opengis.filter.v_1_1_0.FilterType) Test(org.junit.Test)

Example 99 with FilterType

use of net.opengis.filter.v_2_0_0.FilterType in project ddf by codice.

the class TestCswFilterDelegate method testOrEmptyFilter.

@Test
public void testOrEmptyFilter() {
    FilterType propertyIsLikeFilter = cswFilterDelegateLatLon.propertyIsLike(propertyName, likeLiteral, isCaseSensitive);
    List<FilterType> filters = new ArrayList<>();
    filters.add(new FilterType());
    filters.add(propertyIsLikeFilter);
    FilterType filter = cswFilterDelegateLatLon.or(filters);
    assertThat(filter.getComparisonOps(), notNullValue());
    assertThat(filter.getLogicOps(), nullValue());
}
Also used : FilterType(net.opengis.filter.v_1_1_0.FilterType) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Example 100 with FilterType

use of net.opengis.filter.v_2_0_0.FilterType in project ddf by codice.

the class TestCswFilterDelegate method testFeatureIdAndComparisonOpsOr.

@Test(expected = UnsupportedOperationException.class)
public void testFeatureIdAndComparisonOpsOr() throws JAXBException, SAXException, IOException {
    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);
    FilterType propertyIsLikeFilter = cswFilterDelegateLatLon.propertyIsLike(propertyName, likeLiteral, isCaseSensitive);
    List<FilterType> filterList = new ArrayList<>();
    filterList.add(idFilter);
    filterList.add(propertyIsLikeFilter);
    cswFilterDelegateLatLon.or(filterList);
}
Also used : FilterType(net.opengis.filter.v_1_1_0.FilterType) ObjectFactory(net.opengis.filter.v_1_1_0.ObjectFactory) ArrayList(java.util.ArrayList) JAXBElement(javax.xml.bind.JAXBElement) AbstractIdType(net.opengis.filter.v_1_1_0.AbstractIdType) FeatureIdType(net.opengis.filter.v_1_1_0.FeatureIdType) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)212 FilterType (net.opengis.filter.v_1_1_0.FilterType)209 FilterType (net.opengis.filter.v_2_0_0.FilterType)58 ArrayList (java.util.ArrayList)50 JAXBElement (javax.xml.bind.JAXBElement)12 CswSourceConfiguration (org.codice.ddf.spatial.ogc.csw.catalog.common.CswSourceConfiguration)12 BinaryTemporalOpType (net.opengis.filter.v_2_0_0.BinaryTemporalOpType)11 FeatureAttributeDescriptor (org.codice.ddf.spatial.ogc.wfs.catalog.common.FeatureAttributeDescriptor)11 QName (javax.xml.namespace.QName)10 BinarySpatialOpType (net.opengis.filter.v_2_0_0.BinarySpatialOpType)10 LineString (com.vividsolutions.jts.geom.LineString)9 Date (java.util.Date)9 DistanceBufferType (net.opengis.filter.v_2_0_0.DistanceBufferType)9 UnaryLogicOpType (net.opengis.filter.v_2_0_0.UnaryLogicOpType)9 DateTime (org.joda.time.DateTime)8 Method (java.lang.reflect.Method)7 QueryConstraintType (net.opengis.cat.csw.v_2_0_2.QueryConstraintType)7 FilterCapabilities (net.opengis.filter.v_2_0_0.FilterCapabilities)7 TimePeriodType (net.opengis.gml.v_3_2_1.TimePeriodType)7 TimePositionType (net.opengis.gml.v_3_2_1.TimePositionType)7