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 |

This commit is contained in:
Miriam Baglioni 2020-09-22 14:58:53 +02:00
parent 1069cf243a
commit 9d8cb5f827
2 changed files with 5 additions and 15 deletions

View File

@ -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) &&

View File

@ -60,7 +60,7 @@ public class Project extends OafEntity implements Serializable {
private String topic;
private List<H2020classification> h2020classification;
private List<H2020Classification> h2020classification;
public String getTopic() {
@ -71,11 +71,11 @@ public class Project extends OafEntity implements Serializable {
this.topic = topic;
}
public List<H2020classification> getH2020classification() {
public List<H2020Classification> getH2020classification() {
return h2020classification;
}
public void setH2020classification(List<H2020classification> h2020classification) {
public void setH2020classification(List<H2020Classification> h2020classification) {
this.h2020classification = h2020classification;
}