use of net.opengis.sosdo.x10.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.x10.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.x10.DeleteObservationDocument in project arctic-sea by 52North.
the class DeleteObservationDecoder 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_1_0);
delObsRequest.setVersion(xbDelObsType.getVersion());
delObsRequest.setService(xbDelObsType.getService());
delObsRequest.addObservationIdentifier(xbDelObsType.getObservation());
} else {
throw new DecodingException("Received XML document is not valid. Set log level to debug to get more details");
}
return delObsRequest;
}
Aggregations