Search in sources :

Example 1 with AbstractMonitoringObjectPropertyType

use of eu.europa.ec.inspire.schemas.ef.x40.AbstractMonitoringObjectPropertyType in project arctic-sea by 52North.

the class AbstractMonitoringObjectEncoder method setSupersededBy.

private void setSupersededBy(AbstractMonitoringObjectType amot, AbstractMonitoringObject abstractMonitoringObject) throws EncodingException {
    if (abstractMonitoringObject.isSetSupersededBy()) {
        for (AbstractMonitoringObject supersededBy : abstractMonitoringObject.getSupersededBy()) {
            if (supersededBy.isSetSimpleAttrs()) {
                AbstractMonitoringObjectPropertyType sb = amot.addNewSupersededBy();
                sb.setHref(supersededBy.getSimpleAttrs().getHref());
                if (supersededBy.getSimpleAttrs().isSetTitle()) {
                    sb.setTitle(supersededBy.getSimpleAttrs().getTitle());
                }
            } else {
                amot.addNewSupersededBy().addNewAbstractMonitoringObject().set(encodeEF(supersededBy));
            }
        }
    }
}
Also used : AbstractMonitoringObject(org.n52.shetland.inspire.ef.AbstractMonitoringObject) AbstractMonitoringObjectPropertyType(eu.europa.ec.inspire.schemas.ef.x40.AbstractMonitoringObjectPropertyType)

Aggregations

AbstractMonitoringObjectPropertyType (eu.europa.ec.inspire.schemas.ef.x40.AbstractMonitoringObjectPropertyType)1 AbstractMonitoringObject (org.n52.shetland.inspire.ef.AbstractMonitoringObject)1