Search in sources :

Example 1 with LiteralType

use of net.opengis.fes.x20.LiteralType in project ddf by codice.

the class WfsFilterDelegate method createLiteralType.

private JAXBElement<LiteralType> createLiteralType(Object literalValue) {
    JAXBElement<LiteralType> literalType = filterObjectFactory.createLiteral(new LiteralType());
    literalType.getValue().getContent().add(literalValue.toString());
    return literalType;
}
Also used : LiteralType(net.opengis.filter.v_2_0_0.LiteralType)

Example 2 with LiteralType

use of net.opengis.fes.x20.LiteralType in project ddf by codice.

the class CswQueryFactoryTest method createTemporalBinaryComparisonOpType.

private BinaryComparisonOpType createTemporalBinaryComparisonOpType(String attr, String comparison) {
    BinaryComparisonOpType comparisonOp = new BinaryComparisonOpType();
    PropertyNameType propName = new PropertyNameType();
    propName.getContent().add(attr);
    comparisonOp.getExpression().add(filterObjectFactory.createPropertyName(propName));
    LiteralType literal = new LiteralType();
    literal.getContent().add(comparison);
    comparisonOp.getExpression().add(filterObjectFactory.createLiteral(literal));
    return comparisonOp;
}
Also used : LiteralType(net.opengis.filter.v_1_1_0.LiteralType) BinaryComparisonOpType(net.opengis.filter.v_1_1_0.BinaryComparisonOpType) PropertyNameType(net.opengis.filter.v_1_1_0.PropertyNameType)

Example 3 with LiteralType

use of net.opengis.fes.x20.LiteralType in project arctic-sea by 52North.

the class FesDecoderv20 method parsePropertyIsBetweenFilter.

/**
 * Parse XML propertyIsBetween element
 *
 * @param comparisonOpsType
 *            XML propertyIsBetween element
 * @return SOS comparison filter
 * @throws DecodingException
 *             If an error occurs of the filter is not supported
 */
private ComparisonFilter parsePropertyIsBetweenFilter(PropertyIsBetweenType comparisonOpsType) throws DecodingException {
    ComparisonFilter comparisonFilter = new ComparisonFilter();
    comparisonFilter.setOperator(ComparisonOperator.PropertyIsBetween);
    try {
        comparisonFilter.setValueReference(parseValueReference(comparisonOpsType.getExpression()));
    } catch (XmlException xmle) {
        throw valueReferenceParsingException(xmle);
    }
    if (comparisonOpsType.getLowerBoundary().getExpression() instanceof LiteralType) {
        comparisonFilter.setValue(parseLiteralValue((LiteralType) comparisonOpsType.getLowerBoundary().getExpression()));
    }
    if (comparisonOpsType.getUpperBoundary().getExpression() instanceof LiteralType) {
        comparisonFilter.setValueUpper(parseLiteralValue((LiteralType) comparisonOpsType.getUpperBoundary().getExpression()));
    }
    return comparisonFilter;
}
Also used : ComparisonFilter(org.n52.shetland.ogc.filter.ComparisonFilter) XmlException(org.apache.xmlbeans.XmlException) LiteralType(net.opengis.fes.x20.LiteralType)

Example 4 with LiteralType

use of net.opengis.fes.x20.LiteralType in project ddf by codice.

the class CswFilterFactory method createLiteralType.

private JAXBElement<LiteralType> createLiteralType(Object literalValue) {
    JAXBElement<LiteralType> literalType = filterObjectFactory.createLiteral(new LiteralType());
    literalType.getValue().getContent().add(literalValue.toString());
    return literalType;
}
Also used : LiteralType(net.opengis.filter.v_1_1_0.LiteralType)

Example 5 with LiteralType

use of net.opengis.fes.x20.LiteralType in project ddf by codice.

the class WfsFilterDelegate method createLiteralType.

private JAXBElement<LiteralType> createLiteralType(Object literalValue) {
    JAXBElement<LiteralType> literalType = filterObjectFactory.createLiteral(new LiteralType());
    literalType.getValue().getContent().add(literalValue.toString());
    return literalType;
}
Also used : LiteralType(ogc.schema.opengis.filter.v_1_0_0.LiteralType)

Aggregations

LiteralType (net.opengis.fes.x20.LiteralType)2 LiteralType (net.opengis.filter.v_1_1_0.LiteralType)2 ComparisonFilter (org.n52.shetland.ogc.filter.ComparisonFilter)2 BinaryComparisonOpType (net.opengis.fes.x20.BinaryComparisonOpType)1 FilterDocument (net.opengis.fes.x20.FilterDocument)1 FilterType (net.opengis.fes.x20.FilterType)1 PropertyIsEqualToDocument (net.opengis.fes.x20.PropertyIsEqualToDocument)1 BinaryComparisonOpType (net.opengis.filter.v_1_1_0.BinaryComparisonOpType)1 PropertyNameType (net.opengis.filter.v_1_1_0.PropertyNameType)1 LiteralType (net.opengis.filter.v_2_0_0.LiteralType)1 LiteralType (ogc.schema.opengis.filter.v_1_0_0.LiteralType)1 XmlException (org.apache.xmlbeans.XmlException)1 XmlString (org.apache.xmlbeans.XmlString)1 Test (org.junit.Test)1