Search in sources :

Example 1 with TEqualsDocument

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

the class FesEncoderv20 method encodeTemporalFilterEquals.

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

Aggregations

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