Search in sources :

Example 1 with DuringDocument

use of net.opengis.fes.x20.DuringDocument in project arctic-sea by 52North.

the class FesEncoderv20 method encodeTemporalFilterDuring.

private XmlObject encodeTemporalFilterDuring(TemporalFilter temporalFilter) throws EncodingException {
    final DuringDocument duringDoc = DuringDocument.Factory.newInstance(getXmlOptions());
    final BinaryTemporalOpType during = duringDoc.addNewDuring();
    if (temporalFilter.getTime() instanceof TimePeriod) {
        during.set(encodeObjectToXml(GmlConstants.NS_GML_32, temporalFilter.getTime(), EncodingContext.of(XmlBeansEncodingFlags.DOCUMENT)));
    } else {
        throw new EncodingException("The temporal filter value is not a TimePeriod!");
    }
    checkAndAddValueReference(during, temporalFilter);
    return duringDoc;
}
Also used : EncodingException(org.n52.svalbard.encode.exception.EncodingException) TimePeriod(org.n52.shetland.ogc.gml.time.TimePeriod) DuringDocument(net.opengis.fes.x20.DuringDocument) BinaryTemporalOpType(net.opengis.fes.x20.BinaryTemporalOpType)

Aggregations

BinaryTemporalOpType (net.opengis.fes.x20.BinaryTemporalOpType)1 DuringDocument (net.opengis.fes.x20.DuringDocument)1 TimePeriod (org.n52.shetland.ogc.gml.time.TimePeriod)1 EncodingException (org.n52.svalbard.encode.exception.EncodingException)1