Search in sources :

Example 1 with GetResultRequest

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

the class GetResultRequestDecoder method decodeRequest.

@Override
protected GetResultRequest decodeRequest(JsonNode node) throws DecodingException {
    GetResultRequest req = new GetResultRequest();
    req.setFeatureIdentifiers(parseFeatureIdentifiers(node));
    req.setObservationTemplateIdentifier(parseObservationTemplateIdentifier(node));
    req.setObservedProperty(parseObservedProperty(node));
    req.setOffering(parseOffering(node));
    req.setSpatialFilter(parseSpatialFilter(node));
    req.setTemporalFilter(parseTemporalFilters(node));
    return req;
}
Also used : GetResultRequest(org.n52.shetland.ogc.sos.request.GetResultRequest)

Example 2 with GetResultRequest

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

the class SosDecoderv20 method parseGetResult.

private OwsServiceRequest parseGetResult(final GetResultDocument getResultDoc) throws DecodingException {
    final GetResultType getResult = getResultDoc.getGetResult();
    final GetResultRequest sosGetResultRequest = new GetResultRequest();
    sosGetResultRequest.setService(getResult.getService());
    sosGetResultRequest.setVersion(getResult.getVersion());
    sosGetResultRequest.setOffering(getResult.getOffering());
    sosGetResultRequest.setObservedProperty(getResult.getObservedProperty());
    sosGetResultRequest.setFeatureIdentifiers(Arrays.asList(getResult.getFeatureOfInterestArray()));
    getResult.getFeatureOfInterestArray();
    if (getResult.isSetSpatialFilter()) {
        sosGetResultRequest.setSpatialFilter(parseSpatialFilter4GetResult(getResult.getSpatialFilter()));
    }
    sosGetResultRequest.setExtensions(parseExtensibleRequest(getResult));
    sosGetResultRequest.setTemporalFilter(parseTemporalFilters4GetResult(getResult.getTemporalFilterArray()));
    return sosGetResultRequest;
}
Also used : GetResultRequest(org.n52.shetland.ogc.sos.request.GetResultRequest) GetResultType(net.opengis.sos.x20.GetResultType)

Example 3 with GetResultRequest

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

the class SosRequestEncoderv20 method createGetResultRequest.

private XmlObject createGetResultRequest(final GetResultRequest request) throws EncodingException {
    final GetResultDocument getResultDoc = GetResultDocument.Factory.newInstance(getXmlOptions());
    final GetResultType getResult = getResultDoc.addNewGetResult();
    getResult.setService(request.getService());
    getResult.setVersion(request.getVersion());
    getResult.setOffering(request.getOffering());
    getResult.setObservedProperty(request.getObservedProperty());
    if (request.isSetFeatureOfInterest()) {
        request.getFeatureIdentifiers().forEach(getResult::addFeatureOfInterest);
    }
    if (request.hasTemporalFilter()) {
        for (final TemporalFilter temporalFilter : request.getTemporalFilter()) {
            createTemporalFilter(getResult.addNewTemporalFilter(), temporalFilter);
        }
    }
    if (request.isSetSpatialFilter()) {
        createSpatialFilter(getResult.addNewSpatialFilter(), request.getSpatialFilter());
    }
    return getResultDoc;
}
Also used : TemporalFilter(org.n52.shetland.ogc.filter.TemporalFilter) GetResultDocument(net.opengis.sos.x20.GetResultDocument) GetResultType(net.opengis.sos.x20.GetResultType)

Aggregations

GetResultType (net.opengis.sos.x20.GetResultType)2 GetResultRequest (org.n52.shetland.ogc.sos.request.GetResultRequest)2 GetResultDocument (net.opengis.sos.x20.GetResultDocument)1 TemporalFilter (org.n52.shetland.ogc.filter.TemporalFilter)1