use of net.opengis.sosdo.x20.DeleteObservationDocument in project arctic-sea by 52North.
the class DeleteObservationV20Decoder method decode.
public DeleteObservationRequest decode(XmlObject xmlObject) throws DecodingException {
LOGGER.debug(String.format("REQUESTTYPE: %s", xmlObject != null ? xmlObject.getClass() : "null recevied"));
// XmlHelper.validateDocument(xmlObject);
if (xmlObject instanceof DeleteObservationDocument) {
DeleteObservationDocument delObsDoc = (DeleteObservationDocument) xmlObject;
DeleteObservationRequest decodedRequest = parseDeleteObservation(delObsDoc);
LOGGER.debug(String.format("Decoded request: %s", decodedRequest));
return decodedRequest;
} else {
throw new UnsupportedDecoderInputException(this, xmlObject);
}
}
use of net.opengis.sosdo.x20.DeleteObservationDocument in project arctic-sea by 52North.
the class DeleteObservationDecoder method decode.
@Override
public DeleteObservationRequest decode(XmlObject xmlObject) throws DecodingException {
LOGGER.debug("REQUESTTYPE: {}", xmlObject != null ? xmlObject.getClass() : "null recevied");
// XmlHelper.validateDocument(xmlObject);
if (xmlObject instanceof DeleteObservationDocument) {
DeleteObservationDocument delObsDoc = (DeleteObservationDocument) xmlObject;
DeleteObservationRequest decodedRequest = parseDeleteObservation(delObsDoc);
LOGGER.debug("Decoded request: {}", decodedRequest);
return decodedRequest;
} else {
throw new UnsupportedDecoderInputException(this, xmlObject);
}
}
use of net.opengis.sosdo.x20.DeleteObservationDocument in project arctic-sea by 52North.
the class DeleteObservationV20Decoder method parseDeleteObservation.
private DeleteObservationRequest parseDeleteObservation(DeleteObservationDocument xbDelObsDoc) throws DecodingException {
DeleteObservationRequest delObsRequest = null;
DeleteObservationType xbDelObsType = xbDelObsDoc.getDeleteObservation();
if (xbDelObsType != null) {
delObsRequest = new DeleteObservationRequest(DeleteObservationConstants.NS_SOSDO_2_0);
delObsRequest.setVersion(xbDelObsType.getVersion());
delObsRequest.setService(xbDelObsType.getService());
if (CollectionHelper.isNotNullOrEmpty(xbDelObsType.getObservationArray())) {
delObsRequest.setObservationIdentifiers(Sets.newHashSet(xbDelObsType.getObservationArray()));
} else {
parseProcedure(xbDelObsType, delObsRequest);
parseObservedProperty(xbDelObsType, delObsRequest);
parseFeatureOfInterest(xbDelObsType, delObsRequest);
parseOffering(xbDelObsType, delObsRequest);
parseTemporalFilter(xbDelObsType, delObsRequest);
}
} else {
throw new DecodingException("Received XML document is not valid. Set log level to debug to get more details");
}
return delObsRequest;
}
Aggregations