Search in sources :

Example 6 with TemporalFilter

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;
}
Also used : TemporalFilter(org.n52.shetland.ogc.filter.TemporalFilter) GetResultDocument(net.opengis.sos.x20.GetResultDocument) GetResultType(net.opengis.sos.x20.GetResultType)

Aggregations

TemporalFilter (org.n52.shetland.ogc.filter.TemporalFilter)4 BinaryTemporalOpType (net.opengis.fes.x20.BinaryTemporalOpType)3 XmlObject (org.apache.xmlbeans.XmlObject)3 XmlException (org.apache.xmlbeans.XmlException)2 TimeOperator (org.n52.shetland.ogc.filter.FilterConstants.TimeOperator)2 Time (org.n52.shetland.ogc.gml.time.Time)2 TimeInstant (org.n52.shetland.ogc.gml.time.TimeInstant)2 TimePeriod (org.n52.shetland.ogc.gml.time.TimePeriod)2 DecodingException (org.n52.svalbard.decode.exception.DecodingException)2 EncodingException (org.n52.svalbard.encode.exception.EncodingException)2 NodeList (org.w3c.dom.NodeList)2 DuringDocument (net.opengis.fes.x20.DuringDocument)1 TEqualsDocument (net.opengis.fes.x20.TEqualsDocument)1 PropertyNameType (net.opengis.ogc.PropertyNameType)1 GetResultDocument (net.opengis.sos.x20.GetResultDocument)1 GetResultType (net.opengis.sos.x20.GetResultType)1