Search in sources :

Example 11 with PropertyNameType

use of org.geotoolkit.ogc.xml.v100.PropertyNameType in project geotoolkit by Geomatys.

the class FilterFactoryImpl method begins.

@Override
public TemporalOperator<Object> begins(final Expression<Object, ?> expr1, final Expression<Object, ?> expr2) {
    Object temporal = null;
    PropertyNameType propName = null;
    if (expr1 instanceof PropertyNameType) {
        propName = (PropertyNameType) expr1;
        temporal = expr2;
    } else if (expr2 instanceof PropertyNameType) {
        propName = (PropertyNameType) expr2;
        temporal = expr1;
    }
    return new TimeBeginsType(propName.getXPath(), temporal);
}
Also used : TimeBeginsType(org.geotoolkit.ogc.xml.v110.TimeBeginsType) PropertyNameType(org.geotoolkit.ogc.xml.v110.PropertyNameType)

Example 12 with PropertyNameType

use of org.geotoolkit.ogc.xml.v100.PropertyNameType in project geotoolkit by Geomatys.

the class FilterFactoryImpl method anyInteracts.

@Override
public TemporalOperator<Object> anyInteracts(final Expression<Object, ?> expr1, final Expression<Object, ?> expr2) {
    Object temporal = null;
    PropertyNameType propName = null;
    if (expr1 instanceof PropertyNameType) {
        propName = (PropertyNameType) expr1;
        temporal = expr2;
    } else if (expr2 instanceof PropertyNameType) {
        propName = (PropertyNameType) expr2;
        temporal = expr1;
    }
    return new TimeAnyInteractsType(propName.getXPath(), temporal);
}
Also used : TimeAnyInteractsType(org.geotoolkit.ogc.xml.v110.TimeAnyInteractsType) PropertyNameType(org.geotoolkit.ogc.xml.v110.PropertyNameType)

Example 13 with PropertyNameType

use of org.geotoolkit.ogc.xml.v100.PropertyNameType in project geotoolkit by Geomatys.

the class FilterFactoryImpl method less.

@Override
public BinaryComparisonOperator<Object> less(final Expression<Object, ?> expr1, final Expression<Object, ?> expr2, final boolean matchCase, final MatchAction action) {
    LiteralType lit = null;
    PropertyNameType propName = null;
    if (expr1 instanceof PropertyNameType) {
        propName = (PropertyNameType) expr1;
    } else if (expr2 instanceof PropertyNameType) {
        propName = (PropertyNameType) expr2;
    }
    if (expr1 instanceof LiteralType) {
        lit = (LiteralType) expr1;
    } else if (expr2 instanceof LiteralType) {
        lit = (LiteralType) expr2;
    }
    return new PropertyIsLessThanType(lit, propName, matchCase);
}
Also used : PropertyIsLessThanType(org.geotoolkit.ogc.xml.v110.PropertyIsLessThanType) LiteralType(org.geotoolkit.ogc.xml.v110.LiteralType) PropertyNameType(org.geotoolkit.ogc.xml.v110.PropertyNameType)

Example 14 with PropertyNameType

use of org.geotoolkit.ogc.xml.v100.PropertyNameType in project geotoolkit by Geomatys.

the class FilterFactoryImpl method lessOrEqual.

@Override
public BinaryComparisonOperator<Object> lessOrEqual(final Expression<Object, ?> expr1, final Expression<Object, ?> expr2) {
    LiteralType lit = null;
    PropertyNameType propName = null;
    if (expr1 instanceof PropertyNameType) {
        propName = (PropertyNameType) expr1;
    } else if (expr2 instanceof PropertyNameType) {
        propName = (PropertyNameType) expr2;
    }
    if (expr1 instanceof LiteralType) {
        lit = (LiteralType) expr1;
    } else if (expr2 instanceof LiteralType) {
        lit = (LiteralType) expr2;
    }
    return new PropertyIsLessThanOrEqualToType(lit, propName, null);
}
Also used : LiteralType(org.geotoolkit.ogc.xml.v110.LiteralType) PropertyIsLessThanOrEqualToType(org.geotoolkit.ogc.xml.v110.PropertyIsLessThanOrEqualToType) PropertyNameType(org.geotoolkit.ogc.xml.v110.PropertyNameType)

Example 15 with PropertyNameType

use of org.geotoolkit.ogc.xml.v100.PropertyNameType in project geotoolkit by Geomatys.

the class FilterFactoryImpl method ends.

@Override
public TemporalOperator<Object> ends(final Expression<Object, ?> expr1, final Expression<Object, ?> expr2) {
    Object temporal = null;
    PropertyNameType propName = null;
    if (expr1 instanceof PropertyNameType) {
        propName = (PropertyNameType) expr1;
        temporal = expr2;
    } else if (expr2 instanceof PropertyNameType) {
        propName = (PropertyNameType) expr2;
        temporal = expr1;
    }
    return new TimeEndsType(propName.getXPath(), temporal);
}
Also used : TimeEndsType(org.geotoolkit.ogc.xml.v110.TimeEndsType) PropertyNameType(org.geotoolkit.ogc.xml.v110.PropertyNameType)

Aggregations

PropertyNameType (org.geotoolkit.ogc.xml.v110.PropertyNameType)62 JAXBElement (javax.xml.bind.JAXBElement)46 LiteralType (org.geotoolkit.ogc.xml.v110.LiteralType)38 Test (org.junit.Test)38 Unmarshaller (javax.xml.bind.Unmarshaller)37 Marshaller (javax.xml.bind.Marshaller)36 ValueReference (org.opengis.filter.ValueReference)36 Literal (org.opengis.filter.Literal)30 Filter (org.opengis.filter.Filter)26 PropertyNameType (org.geotoolkit.ogc.xml.v100.PropertyNameType)20 BinaryComparisonOperator (org.opengis.filter.BinaryComparisonOperator)20 LiteralType (org.geotoolkit.ogc.xml.v100.LiteralType)16 FilterType (org.geotoolkit.ogc.xml.v110.FilterType)16 PropertyNameType (net.opengis.filter.v_1_1_0.PropertyNameType)13 FilterType (org.geotoolkit.ogc.xml.v100.FilterType)12 Expression (org.opengis.filter.Expression)12 ComparisonOpsType (org.geotoolkit.ogc.xml.v100.ComparisonOpsType)10 BinaryComparisonOpType (org.geotoolkit.ogc.xml.v100.BinaryComparisonOpType)9 BinaryComparisonOpType (org.geotoolkit.ogc.xml.v110.BinaryComparisonOpType)9 ComparisonOpsType (org.geotoolkit.ogc.xml.v110.ComparisonOpsType)9