use of net.opengis.sosdo.x10.DeleteObservationType 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;
}
use of net.opengis.sosdo.x10.DeleteObservationType 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