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());
}
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;
}
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;
}
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;
}
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;
}
Aggregations