From ce46df4f2a50d97226f374837ef95f53b0d0075f Mon Sep 17 00:00:00 2001 From: Claudio Atzori Date: Wed, 13 Jul 2022 11:11:22 +0200 Subject: [PATCH] moved EoscIfGuidelines field to Result and Datasource/Service --- .../java/eu/dnetlib/dhp/schema/oaf/Datasource.java | 13 +++++++++++++ .../java/eu/dnetlib/dhp/schema/oaf/OafEntity.java | 12 ------------ .../java/eu/dnetlib/dhp/schema/oaf/Result.java | 14 ++++++++++++++ 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Datasource.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Datasource.java index 54cfc8a..5067ada 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Datasource.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Datasource.java @@ -137,6 +137,11 @@ public class Datasource extends OafEntity implements Serializable { private String lastconsenttermsofusedate; + /** + * EOSC Interoperability Framework Guidelines + */ + private List eoscifguidelines; + public Qualifier getDatasourcetype() { return datasourcetype; } @@ -553,6 +558,14 @@ public class Datasource extends OafEntity implements Serializable { this.consenttermsofusedate = consenttermsofusedate; } + public List getEoscifguidelines() { + return eoscifguidelines; + } + + public void setEoscifguidelines(List eoscifguidelines) { + this.eoscifguidelines = eoscifguidelines; + } + @Override public void mergeFrom(final OafEntity e) { super.mergeFrom(e); diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/OafEntity.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/OafEntity.java index 4dd3caa..0411821 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/OafEntity.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/OafEntity.java @@ -21,8 +21,6 @@ public abstract class OafEntity extends Oaf implements Serializable { private OAIProvenance oaiprovenance; - private List eoscifguidelines; - public String getId() { return id; } @@ -79,14 +77,6 @@ public abstract class OafEntity extends Oaf implements Serializable { this.oaiprovenance = oaiprovenance; } - public List getEoscifguidelines() { - return eoscifguidelines; - } - - public void setEoscifguidelines(List eoscifguidelines) { - this.eoscifguidelines = eoscifguidelines; - } - public void mergeFrom(OafEntity e) { super.mergeFrom(e); @@ -94,8 +84,6 @@ public abstract class OafEntity extends Oaf implements Serializable { pid = mergeLists(pid, e.getPid()); - eoscifguidelines = mergeLists(eoscifguidelines, e.getEoscifguidelines()); - if (e.getDateofcollection() != null && compareTrust(this, e) < 0) dateofcollection = e.getDateofcollection(); diff --git a/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java b/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java index cd70b47..6386a19 100644 --- a/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java +++ b/src/main/java/eu/dnetlib/dhp/schema/oaf/Result.java @@ -142,6 +142,11 @@ public class Result extends OafEntity implements Serializable { */ private List instance; + /** + * EOSC Interoperability Framework Guidelines + */ + private List eoscifguidelines; + /** * Gets measures. * @@ -554,6 +559,13 @@ public class Result extends OafEntity implements Serializable { this.instance = instance; } + public List getEoscifguidelines() { + return eoscifguidelines; + } + + public void setEoscifguidelines(List eoscifguidelines) { + this.eoscifguidelines = eoscifguidelines; + } /** * Is an enrichment boolean. @@ -749,6 +761,8 @@ public class Result extends OafEntity implements Serializable { measures = mergeLists(measures, r.getMeasures()); + eoscifguidelines = mergeLists(eoscifguidelines, r.getEoscifguidelines()); + if( !isAnEnrichment(this) && !isAnEnrichment(e)) instance = mergeLists(instance, r.getInstance()); else {