use of net.opengis.sos.x20.GetResultType 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 net.opengis.sos.x20.GetResultType 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