use of org.n52.shetland.inspire.ef.NetworkFacility 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));
}
}
}
}
Aggregations