use of org.n52.shetland.inspire.base2.LegislationCitation in project arctic-sea by 52North.
the class AbstractMonitoringObjectEncoder method setLegalBackground.
private void setLegalBackground(AbstractMonitoringObjectType amot, AbstractMonitoringObject abstractMonitoringObject) throws EncodingException {
if (abstractMonitoringObject.isSetLegalBackground()) {
for (LegislationCitation legislationCitation : abstractMonitoringObject.getLegalBackground()) {
if (legislationCitation.isSetSimpleAttrs()) {
SimpleAttrs simpleAttrs = legislationCitation.getSimpleAttrs();
if (simpleAttrs.isSetHref()) {
LegalBackground lb = amot.addNewLegalBackground();
lb.setHref(simpleAttrs.getHref());
if (simpleAttrs.isSetTitle()) {
lb.setTitle(simpleAttrs.getTitle());
}
}
} else {
amot.addNewLegalBackground().addNewLegislationCitation().set(encodeEF(legislationCitation));
}
}
}
}
Aggregations