Search in sources :

Example 11 with PropertyNameType

use of org.geotoolkit.ogc.xml.v110.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.v110.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.v110.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.v110.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.v110.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)47 Test (org.junit.Test)39 Unmarshaller (javax.xml.bind.Unmarshaller)38 LiteralType (org.geotoolkit.ogc.xml.v110.LiteralType)38 Marshaller (javax.xml.bind.Marshaller)37 ValueReference (org.opengis.filter.ValueReference)37 Literal (org.opengis.filter.Literal)31 Filter (org.opengis.filter.Filter)27 PropertyNameType (org.geotoolkit.ogc.xml.v100.PropertyNameType)20 BinaryComparisonOperator (org.opengis.filter.BinaryComparisonOperator)20 FilterType (org.geotoolkit.ogc.xml.v110.FilterType)17 LiteralType (org.geotoolkit.ogc.xml.v100.LiteralType)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