Search in sources :

Example 1 with AnyDomainLink

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));
            }
        }
    }
}
Also used : AnyDomainLink(org.n52.shetland.inspire.ef.AnyDomainLink) RelatedTo(eu.europa.ec.inspire.schemas.ef.x40.EnvironmentalMonitoringFacilityType.RelatedTo)

Aggregations

RelatedTo (eu.europa.ec.inspire.schemas.ef.x40.EnvironmentalMonitoringFacilityType.RelatedTo)1 AnyDomainLink (org.n52.shetland.inspire.ef.AnyDomainLink)1