Search in sources :

Example 1 with DeleteResultTemplateRequest

use of org.n52.shetland.ogc.sos.drt.DeleteResultTemplateRequest in project arctic-sea by 52North.

the class DeleteResultTemplateDecoder method decode.

@Override
public DeleteResultTemplateRequest decode(XmlObject xmlObject) throws DecodingException {
    LOGGER.debug(String.format("REQUESTTYPE: %s", xmlObject != null ? xmlObject.getClass() : "null recevied"));
    XmlHelper.validateDocument(xmlObject);
    if (xmlObject instanceof DeleteResultTemplateDocument) {
        DeleteResultTemplateDocument drtd = (DeleteResultTemplateDocument) xmlObject;
        DeleteResultTemplateRequest decodedRequest = parseDeleteResultTemplate(drtd);
        LOGGER.debug(String.format("Decoded request: %s", decodedRequest));
        return decodedRequest;
    } else {
        throw new UnsupportedDecoderInputException(this, xmlObject);
    }
}
Also used : DeleteResultTemplateDocument(net.opengis.drt.x10.DeleteResultTemplateDocument) UnsupportedDecoderInputException(org.n52.svalbard.decode.exception.UnsupportedDecoderInputException) DeleteResultTemplateRequest(org.n52.shetland.ogc.sos.drt.DeleteResultTemplateRequest)

Example 2 with DeleteResultTemplateRequest

use of org.n52.shetland.ogc.sos.drt.DeleteResultTemplateRequest in project arctic-sea by 52North.

the class DeleteResultTemplateDecoder method parseDeleteResultTemplate.

private DeleteResultTemplateRequest parseDeleteResultTemplate(DeleteResultTemplateDocument drtd) throws DecodingException {
    DeleteResultTemplateRequest request = null;
    DeleteResultTemplateType drtt = drtd.getDeleteResultTemplate();
    request = new DeleteResultTemplateRequest();
    request.setVersion(drtt.getVersion());
    request.setService(drtt.getService());
    if (drtt.sizeOfResultTemplateArray() > 0) {
        parseResultTemplates(drtt.getResultTemplateArray(), request);
    }
    if (drtt.sizeOfTupleArray() > 0) {
        parseObservedPropertyOfferingPairs(drtt.getTupleArray(), request);
    }
    return request;
}
Also used : DeleteResultTemplateType(net.opengis.drt.x10.DeleteResultTemplateType) DeleteResultTemplateRequest(org.n52.shetland.ogc.sos.drt.DeleteResultTemplateRequest)

Aggregations

DeleteResultTemplateRequest (org.n52.shetland.ogc.sos.drt.DeleteResultTemplateRequest)2 DeleteResultTemplateDocument (net.opengis.drt.x10.DeleteResultTemplateDocument)1 DeleteResultTemplateType (net.opengis.drt.x10.DeleteResultTemplateType)1 UnsupportedDecoderInputException (org.n52.svalbard.decode.exception.UnsupportedDecoderInputException)1