Adding H2020 Classification, topic code and topic description to H2020 projects #46

Merged
claudio.atzori merged 59 commits from miriam.baglioni/dnet-hadoop:h2020classification into master 2020-10-05 14:14:39 +02:00
2 changed files with 5 additions and 15 deletions
Showing only changes of commit 9d8cb5f827 - Show all commits

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 {
Review

Consider adding some javadoc

Consider adding some javadoc
Review

LGTM

LGTM
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;
}