Search in sources :

Example 1 with GetObservationByIdRequest

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

the class GetObservationByIdRequestDecoder method decodeRequest.

@Override
protected GetObservationByIdRequest decodeRequest(JsonNode node) {
    GetObservationByIdRequest req = new GetObservationByIdRequest();
    req.setObservationIdentifier(parseObservationIdentifiers(node));
    return req;
}
Also used : GetObservationByIdRequest(org.n52.shetland.ogc.sos.request.GetObservationByIdRequest)

Example 2 with GetObservationByIdRequest

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

the class SosDecoderv100 method parseGetObservationById.

private OwsServiceRequest parseGetObservationById(GetObservationByIdDocument getObsByIdDoc) throws DecodingException {
    GetObservationByIdRequest getObsByIdRequest = new GetObservationByIdRequest();
    GetObservationById getObsById = getObsByIdDoc.getGetObservationById();
    getObsByIdRequest.setService(getObsById.getService());
    getObsByIdRequest.setVersion(getObsById.getVersion());
    if (getObsById.isSetResponseFormat()) {
        getObsByIdRequest.setResponseFormat(decodeResponseFormat(getObsById.getResponseFormat()));
    } else {
        getObsByIdRequest.setResponseFormat(OmConstants.CONTENT_TYPE_OM.toString());
    }
    net.opengis.sos.x10.ResponseModeType.Enum responseMode = getObsById.getResponseMode();
    if (responseMode != null && responseMode.toString().equalsIgnoreCase(SosConstants.RESPONSE_MODE_INLINE)) {
        getObsByIdRequest.setResponseMode(SosConstants.RESPONSE_MODE_INLINE);
    }
    if (getObsById.isSetResultModel()) {
        getObsByIdRequest.setResultModel(OMHelper.getObservationTypeFor(getObsById.getResultModel()));
    }
    getObsByIdRequest.setObservationIdentifier(Arrays.asList(getObsById.getObservationId()));
    return getObsByIdRequest;
}
Also used : GetObservationById(net.opengis.sos.x10.GetObservationByIdDocument.GetObservationById) GetObservationByIdRequest(org.n52.shetland.ogc.sos.request.GetObservationByIdRequest)

Example 3 with GetObservationByIdRequest

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

the class SosDecoderv20 method parseGetObservationById.

private OwsServiceRequest parseGetObservationById(final GetObservationByIdDocument getObsByIdDoc) throws DecodingException {
    final GetObservationByIdRequest getObsByIdRequest = new GetObservationByIdRequest();
    final GetObservationByIdType getObsByIdType = getObsByIdDoc.getGetObservationById();
    getObsByIdRequest.setService(getObsByIdType.getService());
    getObsByIdRequest.setVersion(getObsByIdType.getVersion());
    getObsByIdRequest.setObservationIdentifier(Arrays.asList(getObsByIdType.getObservationArray()));
    getObsByIdRequest.setExtensions(parseExtensibleRequest(getObsByIdType));
    return getObsByIdRequest;
}
Also used : GetObservationByIdType(net.opengis.sos.x20.GetObservationByIdType) GetObservationByIdRequest(org.n52.shetland.ogc.sos.request.GetObservationByIdRequest)

Aggregations

GetObservationByIdRequest (org.n52.shetland.ogc.sos.request.GetObservationByIdRequest)3 GetObservationById (net.opengis.sos.x10.GetObservationByIdDocument.GetObservationById)1 GetObservationByIdType (net.opengis.sos.x20.GetObservationByIdType)1