Search in sources :

Example 6 with FilterType

use of org.oasis_open.docs.wsn.b_2.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 7 with FilterType

use of org.oasis_open.docs.wsn.b_2.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 8 with FilterType

use of org.oasis_open.docs.wsn.b_2.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 9 with FilterType

use of org.oasis_open.docs.wsn.b_2.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 10 with FilterType

use of org.oasis_open.docs.wsn.b_2.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)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