use of org.n52.shetland.ogc.filter.TemporalFilter 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