From 9d8cb5f827d36a4eeb36c3339a91961dbb180c58 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Tue, 22 Sep 2020 14:58:53 +0200 Subject: [PATCH] H2020classification renamed as H2020Classification. Moved a method from model definition that was associated to mapping issue, and change the char to split the levels from $ to | --- ...lassification.java => H2020Classification.java} | 14 ++------------ .../java/eu/dnetlib/dhp/schema/oaf/Project.java | 6 +++--- 2 files changed, 5 insertions(+), 15 deletions(-) rename dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/{H2020classification.java => H2020Classification.java} (81%) diff --git a/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020classification.java b/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Classification.java similarity index 81% rename from dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020classification.java rename to dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Classification.java index cebe3f427..180e99fea 100644 --- a/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020classification.java +++ b/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/H2020Classification.java @@ -3,7 +3,7 @@ package eu.dnetlib.dhp.schema.oaf; import java.io.Serializable; import java.util.Objects; -public class H2020classification implements Serializable { +public class H2020Classification implements Serializable { private H2020Programme h2020Programme; private String level1; private String level2; @@ -53,16 +53,6 @@ public class H2020classification implements Serializable { this.classification = classification; } - public void setLevels() { - String[] tmp = classification.split(" $ "); - level1 = tmp[0]; - if(tmp.length > 1){ - level2 = tmp[1]; - } - if(tmp.length > 2){ - level3 = tmp[2]; - } - } @Override public boolean equals(Object o) { @@ -71,7 +61,7 @@ public class H2020classification implements Serializable { if (o == null || getClass() != o.getClass()) return false; - H2020classification h2020classification = (H2020classification)o; + H2020Classification h2020classification = (H2020Classification)o; return Objects.equals(level1, h2020classification.level1) && Objects.equals(level2, h2020classification.level2) && diff --git a/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/Project.java b/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/Project.java index ce0baa074..7a459f033 100644 --- a/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/Project.java +++ b/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/oaf/Project.java @@ -60,7 +60,7 @@ public class Project extends OafEntity implements Serializable { private String topic; - private List h2020classification; + private List h2020classification; public String getTopic() { @@ -71,11 +71,11 @@ public class Project extends OafEntity implements Serializable { this.topic = topic; } - public List getH2020classification() { + public List getH2020classification() { return h2020classification; } - public void setH2020classification(List h2020classification) { + public void setH2020classification(List h2020classification) { this.h2020classification = h2020classification; }