Search in sources :

Example 6 with AbstractMonitoringObject

use of org.n52.shetland.inspire.ef.AbstractMonitoringObject 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

AbstractMonitoringObject (org.n52.shetland.inspire.ef.AbstractMonitoringObject)2 Hierarchy (org.n52.shetland.inspire.ef.Hierarchy)2 AbstractMonitoringObjectPropertyType (eu.europa.ec.inspire.schemas.ef.x40.AbstractMonitoringObjectPropertyType)1 AbstractMonitoringObjectType (eu.europa.ec.inspire.schemas.ef.x40.AbstractMonitoringObjectType)1 Broader (eu.europa.ec.inspire.schemas.ef.x40.AbstractMonitoringObjectType.Broader)1 LegalBackground (eu.europa.ec.inspire.schemas.ef.x40.AbstractMonitoringObjectType.LegalBackground)1 Narrower (eu.europa.ec.inspire.schemas.ef.x40.AbstractMonitoringObjectType.Narrower)1 Supersedes (eu.europa.ec.inspire.schemas.ef.x40.AbstractMonitoringObjectType.Supersedes)1 LegislationCitation (org.n52.shetland.inspire.base2.LegislationCitation)1 ObservingCapability (org.n52.shetland.inspire.ef.ObservingCapability)1 SimpleAttrs (org.n52.shetland.w3c.xlink.SimpleAttrs)1