Search in sources :

Example 1 with BelongsTo

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

the class AbstractEnvironmentalMonitoringFaciltityEncoder method setBelongsTo.

private void setBelongsTo(EnvironmentalMonitoringFacilityType emft, EnvironmentalMonitoringFacility environmentalMonitoringFacility) throws EncodingException {
    if (environmentalMonitoringFacility.isSetBelongsTo()) {
        for (NetworkFacility belongsTo : environmentalMonitoringFacility.getBelongsTo()) {
            if (belongsTo.isSetSimpleAttrs()) {
                BelongsTo bt = emft.addNewBelongsTo();
                bt.setHref(belongsTo.getSimpleAttrs().getHref());
                if (belongsTo.getSimpleAttrs().isSetTitle()) {
                    bt.setTitle(belongsTo.getSimpleAttrs().getTitle());
                }
            } else {
                emft.addNewBelongsTo().addNewNetworkFacility().set(encodeEF(belongsTo));
            }
        }
    }
}
Also used : BelongsTo(eu.europa.ec.inspire.schemas.ef.x40.EnvironmentalMonitoringFacilityType.BelongsTo) NetworkFacility(org.n52.shetland.inspire.ef.NetworkFacility)

Aggregations

BelongsTo (eu.europa.ec.inspire.schemas.ef.x40.EnvironmentalMonitoringFacilityType.BelongsTo)1 NetworkFacility (org.n52.shetland.inspire.ef.NetworkFacility)1