use of org.n52.shetland.inspire.ef.AbstractMonitoringObject in project arctic-sea by 52North.
the class AbstractMonitoringObjectEncoder method setNarrower.
private void setNarrower(AbstractMonitoringObjectType amot, AbstractMonitoringObject abstractMonitoringObject) throws EncodingException {
if (abstractMonitoringObject.isSetNarrower()) {
for (Hierarchy narrower : abstractMonitoringObject.getNarrower()) {
if (narrower.isSetSimpleAttrs()) {
Narrower n = amot.addNewNarrower();
n.setHref(narrower.getSimpleAttrs().getHref());
if (narrower.getSimpleAttrs().isSetTitle()) {
n.setTitle(narrower.getSimpleAttrs().getTitle());
}
} else {
amot.addNewNarrower().addNewHierarchy().set(encodeEF(narrower));
}
}
}
}
use of org.n52.shetland.inspire.ef.AbstractMonitoringObject in project arctic-sea by 52North.
the class AbstractMonitoringObjectEncoder method setBroader.
private void setBroader(AbstractMonitoringObjectType amot, AbstractMonitoringObject abstractMonitoringObject) throws EncodingException {
if (abstractMonitoringObject.isSetBroader()) {
Hierarchy broader = abstractMonitoringObject.getBroader();
if (broader.isSetSimpleAttrs()) {
Broader b = amot.addNewBroader();
b.setHref(broader.getSimpleAttrs().getHref());
if (broader.getSimpleAttrs().isSetTitle()) {
b.setTitle(broader.getSimpleAttrs().getTitle());
}
} else {
amot.addNewBroader().addNewHierarchy().set(encodeEF(broader));
}
}
}
use of org.n52.shetland.inspire.ef.AbstractMonitoringObject in project arctic-sea by 52North.
the class AbstractMonitoringObjectEncoder method setSupersedes.
private void setSupersedes(AbstractMonitoringObjectType amot, AbstractMonitoringObject abstractMonitoringObject) throws EncodingException {
if (abstractMonitoringObject.isSetSupersedes()) {
for (AbstractMonitoringObject supersedes : abstractMonitoringObject.getSupersedes()) {
if (supersedes.isSetSimpleAttrs()) {
Supersedes s = amot.addNewSupersedes();
s.setHref(supersedes.getSimpleAttrs().getHref());
if (supersedes.getSimpleAttrs().isSetTitle()) {
s.setTitle(supersedes.getSimpleAttrs().getTitle());
}
} else {
amot.addNewSupersedes().addNewAbstractMonitoringObject().set(encodeEF(supersedes));
}
}
}
}
use of org.n52.shetland.inspire.ef.AbstractMonitoringObject 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));
}
}
}
}
use of org.n52.shetland.inspire.ef.AbstractMonitoringObject in project arctic-sea by 52North.
the class AbstractMonitoringObjectEncoder method setObservingCapability.
private void setObservingCapability(AbstractMonitoringObjectType amot, AbstractMonitoringObject abstractMonitoringObject) throws EncodingException {
if (abstractMonitoringObject.isSetObservingCapability()) {
for (ObservingCapability observingCapability : abstractMonitoringObject.getObservingCapability()) {
if (observingCapability.isSetHref()) {
eu.europa.ec.inspire.schemas.ef.x40.AbstractMonitoringObjectType.ObservingCapability oc = amot.addNewObservingCapability();
oc.setHref(observingCapability.getHref());
if (observingCapability.isSetTitle()) {
oc.setTitle(observingCapability.getTitle());
}
} else {
amot.addNewObservingCapability().addNewObservingCapability().set(encodeEF(observingCapability));
}
}
}
}
Aggregations