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