Search in sources :

Example 1 with FilterType

use of org.geosdi.geoplatform.xml.filter.v110.FilterType in project ddf by codice.

the class TestCswFilterDelegate method testLogicOpsFiltersAnd.

@Test
public void testLogicOpsFiltersAnd() throws JAXBException, SAXException, IOException {
    FilterType propertyIsLikeFilter = cswFilterDelegateLatLon.propertyIsLike(propertyName, likeLiteral, isCaseSensitive);
    FilterType notFilter = cswFilterDelegateLatLon.not(propertyIsLikeFilter);
    FilterType propertyIsEqualFilter = cswFilterDelegateLatLon.propertyIsEqualTo(propertyName, booleanLiteral);
    List<FilterType> filters = new ArrayList<>();
    filters.add(notFilter);
    filters.add(propertyIsEqualFilter);
    FilterType filterType = cswFilterDelegateLatLon.and(filters);
    assertXMLEqual(andLogicOpsXml, getXmlFromMarshaller(filterType));
}
Also used : FilterType(net.opengis.filter.v_1_1_0.FilterType) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Example 2 with FilterType

use of org.geosdi.geoplatform.xml.filter.v110.FilterType in project ddf by codice.

the class TestCswFilterDelegate method testIntersectsPropertyOwsBoundingBoxLineString.

@Test
public void testIntersectsPropertyOwsBoundingBoxLineString() throws JAXBException, SAXException, IOException {
    String propName = CswConstants.BBOX_PROP;
    FilterType filterType = cswFilterDelegateLatLon.intersects(propName, lineStringWkt);
    assertXMLEqual(intersectsLineStringXmlPropertyOwsBoundingBox, getXmlFromMarshaller(filterType));
}
Also used : FilterType(net.opengis.filter.v_1_1_0.FilterType) Test(org.junit.Test)

Example 3 with FilterType

use of org.geosdi.geoplatform.xml.filter.v110.FilterType in project ddf by codice.

the class TestCswFilterDelegate method testPropertyIsNotEqualToStringLiteral.

/**
     * Property is not equal to tests
     */
@Test
public void testPropertyIsNotEqualToStringLiteral() throws JAXBException, SAXException, IOException {
    FilterType filterType = cswFilterDelegateLatLon.propertyIsNotEqualTo(propertyName, stringLiteral, isCaseSensitive);
    assertXMLEqual(propertyIsNotEqualToXml, getXmlFromMarshaller(filterType));
}
Also used : FilterType(net.opengis.filter.v_1_1_0.FilterType) Test(org.junit.Test)

Example 4 with FilterType

use of org.geosdi.geoplatform.xml.filter.v110.FilterType in project ddf by codice.

the class TestCswFilterDelegate method testLogicOpsFiltersOr.

@Test
public void testLogicOpsFiltersOr() throws JAXBException, SAXException, IOException {
    FilterType propertyIsLikeFilter = cswFilterDelegateLatLon.propertyIsLike(propertyName, likeLiteral, isCaseSensitive);
    FilterType notFilter = cswFilterDelegateLatLon.not(propertyIsLikeFilter);
    FilterType propertyIsEqualFilter = cswFilterDelegateLatLon.propertyIsEqualTo(propertyName, booleanLiteral);
    List<FilterType> filters = new ArrayList<>();
    filters.add(notFilter);
    filters.add(propertyIsEqualFilter);
    FilterType filterType = cswFilterDelegateLatLon.or(filters);
    assertXMLEqual(orLogicOpsXml, getXmlFromMarshaller(filterType));
}
Also used : FilterType(net.opengis.filter.v_1_1_0.FilterType) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Example 5 with FilterType

use of org.geosdi.geoplatform.xml.filter.v110.FilterType in project ddf by codice.

the class TestCswFilterDelegate method testPropertyIsNotEqualToDoubleLiteral.

@Test
public void testPropertyIsNotEqualToDoubleLiteral() throws JAXBException, SAXException, IOException {
    FilterType filterType = cswFilterDelegateLatLon.propertyIsNotEqualTo(propertyName, doubleLiteral);
    assertXMLEqual(propertyIsNotEqualToXmlWithDecimal, getXmlFromMarshaller(filterType));
}
Also used : FilterType(net.opengis.filter.v_1_1_0.FilterType) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)587 FilterType (net.opengis.filter.v_1_1_0.FilterType)526 FilterType (net.opengis.filter.v_2_0_0.FilterType)115 ArrayList (java.util.ArrayList)106 JAXBElement (javax.xml.bind.JAXBElement)52 Filter (org.opengis.filter.Filter)32 Marshaller (javax.xml.bind.Marshaller)29 Unmarshaller (javax.xml.bind.Unmarshaller)29 ValueReference (org.opengis.filter.ValueReference)26 CswSourceConfiguration (org.codice.ddf.spatial.ogc.csw.catalog.common.CswSourceConfiguration)24 Literal (org.opengis.filter.Literal)22 BinaryTemporalOpType (net.opengis.filter.v_2_0_0.BinaryTemporalOpType)21 BinarySpatialOpType (net.opengis.filter.v_2_0_0.BinarySpatialOpType)20 FilterType (org.geotoolkit.ogc.xml.v110.FilterType)20 Date (java.util.Date)19 QName (javax.xml.namespace.QName)18 DistanceBufferType (net.opengis.filter.v_2_0_0.DistanceBufferType)18 BinaryComparisonOperator (org.opengis.filter.BinaryComparisonOperator)18 UnaryLogicOpType (net.opengis.filter.v_2_0_0.UnaryLogicOpType)17 PropertyNameType (org.geotoolkit.ogc.xml.v110.PropertyNameType)16