use of eu.europa.ec.inspire.schemas.ef.x40.EnvironmentalMonitoringFacilityType.RelatedTo in project arctic-sea by 52North.
the class AbstractEnvironmentalMonitoringFaciltityEncoder method setRelatedTo.
private void setRelatedTo(EnvironmentalMonitoringFacilityType emft, EnvironmentalMonitoringFacility environmentalMonitoringFacility) throws EncodingException {
if (environmentalMonitoringFacility.isSetRelatedTo()) {
for (AnyDomainLink relatedTo : environmentalMonitoringFacility.getRelatedTo()) {
if (relatedTo.isSetSimpleAttrs()) {
RelatedTo rt = emft.addNewRelatedTo();
rt.setHref(relatedTo.getSimpleAttrs().getHref());
if (relatedTo.getSimpleAttrs().isSetTitle()) {
rt.setTitle(relatedTo.getSimpleAttrs().getTitle());
}
} else {
emft.addNewRelatedTo().addNewAnyDomainLink().set(encodeEF(relatedTo));
}
}
}
}
Aggregations