Search in sources :

Example 21 with BinaryComparisonOpType

use of org.geotoolkit.ogc.xml.v110.BinaryComparisonOpType in project ddf by codice.

the class CswFilterFactory method createPropertyIsEqualTo.

public FilterType createPropertyIsEqualTo(String functionName, List<? extends JAXBElement<?>> expressions, Object literal) {
    FunctionType function = new FunctionType();
    function.setName(functionName);
    function.getExpression().addAll(expressions);
    FilterType filter = new FilterType();
    BinaryComparisonOpType propertyIsEqualTo = new BinaryComparisonOpType();
    propertyIsEqualTo.getExpression().add(filterObjectFactory.createFunction(function));
    propertyIsEqualTo.getExpression().add(createLiteralType(literal));
    filter.setComparisonOps(filterObjectFactory.createPropertyIsEqualTo(propertyIsEqualTo));
    return filter;
}
Also used : FilterType(net.opengis.filter.v_1_1_0.FilterType) FunctionType(net.opengis.filter.v_1_1_0.FunctionType) BinaryComparisonOpType(net.opengis.filter.v_1_1_0.BinaryComparisonOpType)

Example 22 with BinaryComparisonOpType

use of org.geotoolkit.ogc.xml.v110.BinaryComparisonOpType in project ddf by codice.

the class CswFilterFactory method createPropertyIsLessThanOrEqualTo.

private JAXBElement<BinaryComparisonOpType> createPropertyIsLessThanOrEqualTo(String propertyName, Object literal) {
    BinaryComparisonOpType propertyIsLessThanAOrEqualTo = new BinaryComparisonOpType();
    propertyIsLessThanAOrEqualTo.getExpression().add(createPropertyNameType(Arrays.asList(new Object[] { propertyName })));
    propertyIsLessThanAOrEqualTo.getExpression().add(createLiteralType(literal));
    return filterObjectFactory.createPropertyIsLessThanOrEqualTo(propertyIsLessThanAOrEqualTo);
}
Also used : BinaryComparisonOpType(net.opengis.filter.v_1_1_0.BinaryComparisonOpType)

Example 23 with BinaryComparisonOpType

use of org.geotoolkit.ogc.xml.v110.BinaryComparisonOpType in project ddf by codice.

the class CswFilterFactory method createPropertyIsGreaterThanOrEqualTo.

private JAXBElement<BinaryComparisonOpType> createPropertyIsGreaterThanOrEqualTo(String propertyName, Object literal) {
    BinaryComparisonOpType propertyIsGreaterThanAOrEqualTo = new BinaryComparisonOpType();
    propertyIsGreaterThanAOrEqualTo.getExpression().add(createPropertyNameType(Arrays.asList(new Object[] { propertyName })));
    propertyIsGreaterThanAOrEqualTo.getExpression().add(createLiteralType(literal));
    return filterObjectFactory.createPropertyIsGreaterThanOrEqualTo(propertyIsGreaterThanAOrEqualTo);
}
Also used : BinaryComparisonOpType(net.opengis.filter.v_1_1_0.BinaryComparisonOpType)

Example 24 with BinaryComparisonOpType

use of org.geotoolkit.ogc.xml.v110.BinaryComparisonOpType in project ddf by codice.

the class CswFilterFactory method createPropertyIsEqualTo.

private JAXBElement<BinaryComparisonOpType> createPropertyIsEqualTo(String propertyName, Object literal, boolean isCaseSensitive) {
    BinaryComparisonOpType propertyIsEqualTo = new BinaryComparisonOpType();
    propertyIsEqualTo.setMatchCase(isCaseSensitive);
    propertyIsEqualTo.getExpression().add(createPropertyNameType(Arrays.asList(new Object[] { propertyName })));
    propertyIsEqualTo.getExpression().add(createLiteralType(literal));
    return filterObjectFactory.createPropertyIsEqualTo(propertyIsEqualTo);
}
Also used : BinaryComparisonOpType(net.opengis.filter.v_1_1_0.BinaryComparisonOpType)

Example 25 with BinaryComparisonOpType

use of org.geotoolkit.ogc.xml.v110.BinaryComparisonOpType in project ddf by codice.

the class CswFilterFactory method createPropertyIsNotEqualTo.

private JAXBElement<BinaryComparisonOpType> createPropertyIsNotEqualTo(String propertyName, Object literal, boolean isCaseSensitive) {
    BinaryComparisonOpType propertyIsNotEqualTo = new BinaryComparisonOpType();
    propertyIsNotEqualTo.setMatchCase(isCaseSensitive);
    propertyIsNotEqualTo.getExpression().add(createPropertyNameType(Arrays.asList(new Object[] { propertyName })));
    propertyIsNotEqualTo.getExpression().add(createLiteralType(literal));
    return filterObjectFactory.createPropertyIsNotEqualTo(propertyIsNotEqualTo);
}
Also used : BinaryComparisonOpType(net.opengis.filter.v_1_1_0.BinaryComparisonOpType)

Aggregations

Test (org.junit.Test)22 JAXBElement (javax.xml.bind.JAXBElement)21 Marshaller (javax.xml.bind.Marshaller)18 Unmarshaller (javax.xml.bind.Unmarshaller)18 BinaryComparisonOperator (org.opengis.filter.BinaryComparisonOperator)18 Filter (org.opengis.filter.Filter)18 Literal (org.opengis.filter.Literal)18 ValueReference (org.opengis.filter.ValueReference)18 BinaryComparisonOpType (net.opengis.filter.v_1_1_0.BinaryComparisonOpType)13 BinaryComparisonOpType (org.geotoolkit.ogc.xml.v100.BinaryComparisonOpType)9 FilterType (org.geotoolkit.ogc.xml.v100.FilterType)9 LiteralType (org.geotoolkit.ogc.xml.v100.LiteralType)9 PropertyNameType (org.geotoolkit.ogc.xml.v100.PropertyNameType)9 BinaryComparisonOpType (org.geotoolkit.ogc.xml.v110.BinaryComparisonOpType)9 FilterType (org.geotoolkit.ogc.xml.v110.FilterType)9 LiteralType (org.geotoolkit.ogc.xml.v110.LiteralType)9 PropertyNameType (org.geotoolkit.ogc.xml.v110.PropertyNameType)9 ComparisonOpsType (org.geotoolkit.ogc.xml.v110.ComparisonOpsType)7 ComparisonOpsType (org.geotoolkit.ogc.xml.v100.ComparisonOpsType)6 LogicalOperator (org.opengis.filter.LogicalOperator)6