Search in sources :

Example 1 with ObservingCapability

use of org.n52.shetland.inspire.ef.ObservingCapability in project arctic-sea by 52North.

the class AbstractMonitoringObjectEncoder method setObservingCapability.

private void setObservingCapability(AbstractMonitoringObjectType amot, AbstractMonitoringObject abstractMonitoringObject) throws EncodingException {
    if (abstractMonitoringObject.isSetObservingCapability()) {
        for (ObservingCapability observingCapability : abstractMonitoringObject.getObservingCapability()) {
            if (observingCapability.isSetHref()) {
                eu.europa.ec.inspire.schemas.ef.x40.AbstractMonitoringObjectType.ObservingCapability oc = amot.addNewObservingCapability();
                oc.setHref(observingCapability.getHref());
                if (observingCapability.isSetTitle()) {
                    oc.setTitle(observingCapability.getTitle());
                }
            } else {
                amot.addNewObservingCapability().addNewObservingCapability().set(encodeEF(observingCapability));
            }
        }
    }
}
Also used : AbstractMonitoringObjectType(eu.europa.ec.inspire.schemas.ef.x40.AbstractMonitoringObjectType) ObservingCapability(org.n52.shetland.inspire.ef.ObservingCapability)

Aggregations

AbstractMonitoringObjectType (eu.europa.ec.inspire.schemas.ef.x40.AbstractMonitoringObjectType)1 ObservingCapability (org.n52.shetland.inspire.ef.ObservingCapability)1