use of org.n52.shetland.ogc.om.OmObservationConstellation in project arctic-sea by 52North.
the class ObservationDecoder method parseObservationConstellation.
public OmObservationConstellation parseObservationConstellation(JsonNode node) throws DecodingException {
OmObservationConstellation oc = new OmObservationConstellation();
oc.setProcedure(parseProcedure(node));
oc.setObservableProperty(parseObservableProperty(node));
oc.setObservationType(parseObservationType(node));
oc.setFeatureOfInterest(parseFeatureOfInterest(node));
return oc;
}
use of org.n52.shetland.ogc.om.OmObservationConstellation in project arctic-sea by 52North.
the class InsertResultTemplateRequestDecoder method parseObservationTemplate.
private OmObservationConstellation parseObservationTemplate(JsonNode node) throws DecodingException {
OmObservationConstellation oc = observationDecoder.parseObservationConstellation(node.path(JSONConstants.OBSERVATION_TEMPLATE));
oc.addOffering(node.path(JSONConstants.OFFERING).textValue());
return oc;
}
use of org.n52.shetland.ogc.om.OmObservationConstellation in project arctic-sea by 52North.
the class SosDecoderv20 method parseInsertResultTemplate.
private OwsServiceRequest parseInsertResultTemplate(final InsertResultTemplateDocument insertResultTemplateDoc) throws DecodingException {
InsertResultTemplateRequest sosInsertResultTemplate = new InsertResultTemplateRequest();
InsertResultTemplateType insertResultTemplate = insertResultTemplateDoc.getInsertResultTemplate();
sosInsertResultTemplate.setService(insertResultTemplate.getService());
sosInsertResultTemplate.setVersion(insertResultTemplate.getVersion());
ResultTemplateType resultTemplate = insertResultTemplate.getProposedTemplate().getResultTemplate();
sosInsertResultTemplate.setIdentifier(resultTemplate.getIdentifier());
OmObservationConstellation sosObservationConstellation = parseObservationTemplate(resultTemplate.getObservationTemplate());
sosObservationConstellation.addOffering(resultTemplate.getOffering());
sosInsertResultTemplate.setObservationTemplate(sosObservationConstellation);
try {
sosInsertResultTemplate.setResultStructure(parseResultStructure(XmlObject.Factory.parse(resultTemplate.getResultStructure().xmlText())));
sosInsertResultTemplate.setResultEncoding(parseResultEncoding(XmlObject.Factory.parse(resultTemplate.getResultEncoding().xmlText())));
} catch (XmlException e) {
throw new DecodingException(e, "Error while parsing InsertResultTemplate request!");
}
sosInsertResultTemplate.setExtensions(parseExtensibleRequest(insertResultTemplate));
return sosInsertResultTemplate;
}
use of org.n52.shetland.ogc.om.OmObservationConstellation in project arctic-sea by 52North.
the class OmDecoderv20 method getObservationConstellation.
private OmObservationConstellation getObservationConstellation(OMObservationType omot, Map<String, AbstractFeature> featureMap) throws DecodingException {
OmObservationConstellation observationConstellation = new OmObservationConstellation();
observationConstellation.setObservationType(getObservationType(omot));
observationConstellation.setProcedure(createProcedure(omot));
observationConstellation.setObservableProperty(getObservableProperty(omot));
observationConstellation.setFeatureOfInterest(createFeatureOfInterest(omot, featureMap));
return observationConstellation;
}
use of org.n52.shetland.ogc.om.OmObservationConstellation in project arctic-sea by 52North.
the class OmDecoderv20 method parseOmObservation.
private OmObservation parseOmObservation(OMObservationType omObservation) throws DecodingException {
Map<String, AbstractFeature> featureMap = Maps.newHashMap();
OmObservation sosObservation = new OmObservation();
// parse identifier, description
parseAbstractFeatureType(omObservation, sosObservation);
OmObservationConstellation observationConstallation = getObservationConstellation(omObservation, featureMap);
sosObservation.setObservationConstellation(observationConstallation);
sosObservation.setResultTime(getResultTime(omObservation));
sosObservation.setValidTime(getValidTime(omObservation));
if (omObservation.getParameterArray() != null) {
sosObservation.setParameter(parseNamedValueTypeArray(omObservation.getParameterArray()));
}
sosObservation.setValue(getObservationValue(omObservation));
return sosObservation;
}
Aggregations