Search in sources :

Example 26 with TextValue

use of org.n52.shetland.ogc.om.values.TextValue in project arctic-sea by 52North.

the class FieldDecoder method decodeTime.

protected SweAbstractDataComponent decodeTime(JsonNode node) throws DecodingException {
    SweTime swe = new SweTime();
    if (node.hasNonNull(JSONConstants.VALUE)) {
        String value = node.path(JSONConstants.VALUE).textValue();
        swe.setValue(parseDateTime(value));
    }
    return swe.setUom(node.path(JSONConstants.UOM).textValue());
}
Also used : SweTime(org.n52.shetland.ogc.swe.simpleType.SweTime)

Example 27 with TextValue

use of org.n52.shetland.ogc.om.values.TextValue in project arctic-sea by 52North.

the class SpellingJSONDecoder method decodeJSON.

@Override
public Spelling decodeJSON(JsonNode node, boolean validate) throws DecodingException {
    Spelling spelling = new Spelling();
    spelling.setScript(parseNillableString(node.path(AQDJSONConstants.SCRIPT)));
    spelling.setText(node.path(AQDJSONConstants.TEXT).textValue());
    spelling.setTransliterationScheme(parseNillableString(node.path(AQDJSONConstants.TRANSLITERATION_SCHEME)));
    return spelling;
}
Also used : Spelling(org.n52.shetland.inspire.Spelling)

Example 28 with TextValue

use of org.n52.shetland.ogc.om.values.TextValue in project arctic-sea by 52North.

the class UpdateSensorRequestDecoder method decodeRequest.

@Override
protected UpdateSensorRequest decodeRequest(JsonNode node) throws DecodingException {
    UpdateSensorRequest req = new UpdateSensorRequest();
    req.setProcedureIdentifier(node.path(JSONConstants.PROCEDURE).textValue());
    String pdf = node.path(JSONConstants.PROCEDURE_DESCRIPTION_FORMAT).textValue();
    req.setProcedureDescriptionFormat(pdf);
    JsonNode procedureDescriptionNode = node.path(JSONConstants.PROCEDURE_DESCRIPTION);
    if (procedureDescriptionNode.isArray()) {
        for (JsonNode n : procedureDescriptionNode) {
            req.addProcedureDescriptionString(decodeProcedureDescription(n, pdf));
        }
    } else {
        req.addProcedureDescriptionString(decodeProcedureDescription(procedureDescriptionNode, pdf));
    }
    return req;
}
Also used : UpdateSensorRequest(org.n52.shetland.ogc.sos.request.UpdateSensorRequest) JsonNode(com.fasterxml.jackson.databind.JsonNode)

Example 29 with TextValue

use of org.n52.shetland.ogc.om.values.TextValue in project arctic-sea by 52North.

the class GetResultTemplateRequestDecoder method decodeRequest.

@Override
protected GetResultTemplateRequest decodeRequest(JsonNode node) {
    GetResultTemplateRequest req = new GetResultTemplateRequest();
    req.setObservedProperty(node.path(JSONConstants.OBSERVED_PROPERTY).textValue());
    req.setOffering(node.path(JSONConstants.OFFERING).textValue());
    return req;
}
Also used : GetResultTemplateRequest(org.n52.shetland.ogc.sos.request.GetResultTemplateRequest)

Example 30 with TextValue

use of org.n52.shetland.ogc.om.values.TextValue in project arctic-sea by 52North.

the class InsertResultRequestDecoder method decodeRequest.

@Override
protected InsertResultRequest decodeRequest(JsonNode node) {
    InsertResultRequest irr = new InsertResultRequest();
    irr.setTemplateIdentifier(node.path(JSONConstants.TEMPLATE_IDENTIFIER).textValue());
    irr.setResultValues(node.path(JSONConstants.RESULT_VALUES).textValue());
    return irr;
}
Also used : InsertResultRequest(org.n52.shetland.ogc.sos.request.InsertResultRequest)

Aggregations

TextValue (org.n52.shetland.ogc.om.values.TextValue)9 Test (org.junit.Test)8 CategoryValue (org.n52.shetland.ogc.om.values.CategoryValue)6 QuantityValue (org.n52.shetland.ogc.om.values.QuantityValue)6 ComparisonFilter (org.n52.shetland.ogc.filter.ComparisonFilter)5 BooleanValue (org.n52.shetland.ogc.om.values.BooleanValue)5 CountValue (org.n52.shetland.ogc.om.values.CountValue)5 JsonNode (com.fasterxml.jackson.databind.JsonNode)4 GeometryValue (org.n52.shetland.ogc.om.values.GeometryValue)4 SweCount (org.n52.shetland.ogc.swe.simpleType.SweCount)4 XmlBoolean (org.apache.xmlbeans.XmlBoolean)3 XmlInteger (org.apache.xmlbeans.XmlInteger)3 XmlObject (org.apache.xmlbeans.XmlObject)3 XmlString (org.apache.xmlbeans.XmlString)3 SweField (org.n52.shetland.ogc.swe.SweField)3 BigDecimal (java.math.BigDecimal)2 XmlException (org.apache.xmlbeans.XmlException)2 DateTime (org.joda.time.DateTime)2 Geometry (org.locationtech.jts.geom.Geometry)2 BinaryLogicFilter (org.n52.shetland.ogc.filter.BinaryLogicFilter)2