use of org.n52.shetland.inspire.ef.EnvironmentalMonitoringFacility 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 org.n52.shetland.inspire.ef.EnvironmentalMonitoringFacility in project arctic-sea by 52North.
the class EnvironmentalMonitoringFaciltityDocumentEncoder method encode.
@Override
public XmlObject encode(AbstractFeature abstractFeature, EncodingContext context) throws EncodingException {
if (abstractFeature instanceof EnvironmentalMonitoringFacility) {
EnvironmentalMonitoringFacilityDocument emfpd = EnvironmentalMonitoringFacilityDocument.Factory.newInstance();
emfpd.setEnvironmentalMonitoringFacility(createEnvironmentalMonitoringFaciltityType((EnvironmentalMonitoringFacility) abstractFeature));
return emfpd;
}
throw new UnsupportedEncoderInputException(this, abstractFeature);
}
use of org.n52.shetland.inspire.ef.EnvironmentalMonitoringFacility in project arctic-sea by 52North.
the class EnvironmentalMonitoringFaciltityPropertyTypeEncoder method encode.
@Override
public XmlObject encode(AbstractFeature abstractFeature, EncodingContext context) throws EncodingException {
if (abstractFeature instanceof EnvironmentalMonitoringFacility) {
EnvironmentalMonitoringFacilityPropertyType emfpt = EnvironmentalMonitoringFacilityPropertyType.Factory.newInstance();
emfpt.setEnvironmentalMonitoringFacility(createEnvironmentalMonitoringFaciltityType((EnvironmentalMonitoringFacility) abstractFeature));
return emfpt;
}
throw new UnsupportedEncoderInputException(this, abstractFeature);
}
use of org.n52.shetland.inspire.ef.EnvironmentalMonitoringFacility 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