use of eu.europa.ec.inspire.schemas.ef.x40.EnvironmentalMonitoringFacilityDocument 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 eu.europa.ec.inspire.schemas.ef.x40.EnvironmentalMonitoringFacilityDocument 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;
}
Aggregations