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;
}
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;
}
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;
}
Aggregations