use of eu.europa.ec.inspire.schemas.ef.x40.EnvironmentalMonitoringFacilityType 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));
}
}
}
}
use of eu.europa.ec.inspire.schemas.ef.x40.EnvironmentalMonitoringFacilityType in project arctic-sea by 52North.
the class AbstractEnvironmentalMonitoringFaciltityEncoder method createFeature.
@Override
protected XmlObject createFeature(FeaturePropertyType featurePropertyType, AbstractFeature abstractFeature, EncodingContext context) throws EncodingException {
if (context.has(XmlBeansEncodingFlags.ENCODE) && !context.getBoolean(XmlBeansEncodingFlags.ENCODE)) {
featurePropertyType.setHref(abstractFeature.getIdentifierCodeWithAuthority().getValue());
if (abstractFeature.isSetName()) {
featurePropertyType.setTitle(abstractFeature.getFirstName().getValue());
}
return featurePropertyType;
}
EnvironmentalMonitoringFacilityType emft = createEnvironmentalMonitoringFaciltityType((EnvironmentalMonitoringFacility) abstractFeature);
EnvironmentalMonitoringFacilityDocument emfd = EnvironmentalMonitoringFacilityDocument.Factory.newInstance(getXmlOptions());
emfd.setEnvironmentalMonitoringFacility(emft);
return emfd;
}
use of eu.europa.ec.inspire.schemas.ef.x40.EnvironmentalMonitoringFacilityType 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