Search in sources :

Example 1 with InsertObservationResponseType

use of net.opengis.sos.x20.InsertObservationResponseType in project arctic-sea by 52North.

the class InsertObservationResponseV20Decoder method decode.

@Override
public InsertObservationResponse decode(XmlObject xmlObject) throws DecodingException {
    LOGGER.debug("REQUESTTYPE: {}", xmlObject != null ? xmlObject.getClass() : "null recevied");
    if (!(xmlObject instanceof InsertObservationResponseDocument)) {
        throw new UnsupportedDecoderInputException(this, xmlObject);
    }
    InsertObservationResponseType isr = ((InsertObservationResponseDocument) xmlObject).getInsertObservationResponse();
    if (isr == null) {
        throw new DecodingException("Received XML document is not valid. Set log level to debug to get more details");
    }
    return new InsertObservationResponse();
}
Also used : InsertObservationResponseDocument(net.opengis.sos.x20.InsertObservationResponseDocument) DecodingException(org.n52.svalbard.decode.exception.DecodingException) InsertObservationResponseType(net.opengis.sos.x20.InsertObservationResponseType) UnsupportedDecoderInputException(org.n52.svalbard.decode.exception.UnsupportedDecoderInputException) InsertObservationResponse(org.n52.shetland.ogc.sos.response.InsertObservationResponse)

Aggregations

InsertObservationResponseDocument (net.opengis.sos.x20.InsertObservationResponseDocument)1 InsertObservationResponseType (net.opengis.sos.x20.InsertObservationResponseType)1 InsertObservationResponse (org.n52.shetland.ogc.sos.response.InsertObservationResponse)1 DecodingException (org.n52.svalbard.decode.exception.DecodingException)1 UnsupportedDecoderInputException (org.n52.svalbard.decode.exception.UnsupportedDecoderInputException)1