Search in sources :

Example 1 with LegislationCitation

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));
            }
        }
    }
}
Also used : SimpleAttrs(org.n52.shetland.w3c.xlink.SimpleAttrs) LegislationCitation(org.n52.shetland.inspire.base2.LegislationCitation) LegalBackground(eu.europa.ec.inspire.schemas.ef.x40.AbstractMonitoringObjectType.LegalBackground)

Aggregations

LegalBackground (eu.europa.ec.inspire.schemas.ef.x40.AbstractMonitoringObjectType.LegalBackground)1 LegislationCitation (org.n52.shetland.inspire.base2.LegislationCitation)1 SimpleAttrs (org.n52.shetland.w3c.xlink.SimpleAttrs)1