1
0
Fork 0

modification to the schema for h2020classification and h2020topic code

This commit is contained in:
Miriam Baglioni 2020-09-23 17:30:21 +02:00
parent 9d8cb5f827
commit 3c7ef5ca04
4 changed files with 127 additions and 74 deletions

View File

@ -0,0 +1,65 @@
package eu.dnetlib.dhp.schema.dump.oaf.graph;
import java.io.Serializable;
public class H2020Classification implements Serializable {
private Programme programme;
private String level1;
private String level2;
private String level3;
private String classification;
public Programme getProgramme() {
return programme;
}
public void setProgramme(Programme programme) {
this.programme = programme;
}
public String getLevel1() {
return level1;
}
public void setLevel1(String level1) {
this.level1 = level1;
}
public String getLevel2() {
return level2;
}
public void setLevel2(String level2) {
this.level2 = level2;
}
public String getLevel3() {
return level3;
}
public void setLevel3(String level3) {
this.level3 = level3;
}
public String getClassification() {
return classification;
}
public void setClassification(String classification) {
this.classification = classification;
}
public static H2020Classification newInstance(String programme_code, String programme_description, String level1,
String level2, String level3, String classification) {
H2020Classification h2020classification = new H2020Classification();
h2020classification.programme = Programme.newInstance(programme_code, programme_description);
h2020classification.level1 = level1;
h2020classification.level2 = level2;
h2020classification.level3 = level3;
h2020classification.classification = classification;
return h2020classification;
}
}

View File

@ -4,8 +4,6 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph;
import java.io.Serializable;
import java.util.List;
import eu.dnetlib.dhp.schema.dump.oaf.KeyValue;
/**
* This is the class representing the Project in the model used for the dumps of the whole graph. At the moment the dump
* of the Projects differs from the other dumps because we do not create relations between Funders (Organization) and
@ -62,7 +60,9 @@ public class Project implements Serializable {
private Granted granted;
private List<Programme> programme;
// private List<Programme> programme;
private List<H2020Classification> h2020Classifications;
public String getId() {
return id;
@ -184,12 +184,11 @@ public class Project implements Serializable {
this.granted = granted;
}
public List<Programme> getProgramme() {
return programme;
public List<H2020Classification> getH2020Classifications() {
return h2020Classifications;
}
public void setProgramme(List<Programme> programme) {
this.programme = programme;
public void setH2020Classifications(List<H2020Classification> h2020Classifications) {
this.h2020Classifications = h2020Classifications;
}
}

View File

@ -1,72 +1,70 @@
package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable;
import java.util.Objects;
public class H2020Classification implements Serializable {
private H2020Programme h2020Programme;
private String level1;
private String level2;
private String level3;
private H2020Programme h2020Programme;
private String level1;
private String level2;
private String level3;
private String classification;
private String classification;
public H2020Programme getH2020Programme() {
return h2020Programme;
}
public H2020Programme getH2020Programme() {
return h2020Programme;
}
public void setH2020Programme(H2020Programme h2020Programme) {
this.h2020Programme = h2020Programme;
}
public void setH2020Programme(H2020Programme h2020Programme) {
this.h2020Programme = h2020Programme;
}
public String getLevel1() {
return level1;
}
public void setLevel1(String level1) {
this.level1 = level1;
}
public String getLevel1() {
return level1;
}
public String getLevel2() {
return level2;
}
public void setLevel1(String level1) {
this.level1 = level1;
}
public void setLevel2(String level2) {
this.level2 = level2;
}
public String getLevel2() {
return level2;
}
public String getLevel3() {
return level3;
}
public void setLevel2(String level2) {
this.level2 = level2;
}
public void setLevel3(String level3) {
this.level3 = level3;
}
public String getLevel3() {
return level3;
}
public String getClassification() {
return classification;
}
public void setLevel3(String level3) {
this.level3 = level3;
}
public void setClassification(String classification) {
this.classification = classification;
}
public String getClassification() {
return classification;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
public void setClassification(String classification) {
this.classification = classification;
}
H2020Classification h2020classification = (H2020Classification) o;
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
H2020Classification h2020classification = (H2020Classification)o;
return Objects.equals(level1, h2020classification.level1) &&
Objects.equals(level2, h2020classification.level2) &&
Objects.equals(level3, h2020classification.level3) &&
Objects.equals(classification, h2020classification.classification) &&
h2020Programme.equals(h2020classification.h2020Programme);
}
return Objects.equals(level1, h2020classification.level1) &&
Objects.equals(level2, h2020classification.level2) &&
Objects.equals(level3, h2020classification.level3) &&
Objects.equals(classification, h2020classification.classification) &&
h2020Programme.equals(h2020classification.h2020Programme);
}
}

View File

@ -58,17 +58,16 @@ public class Project extends OafEntity implements Serializable {
private Float fundedamount;
private String topic;
private String h2020topiccode;
private List<H2020Classification> h2020classification;
public String getTopic() {
return topic;
public String getH2020topiccode() {
return h2020topiccode;
}
public void setTopic(String topic) {
this.topic = topic;
public void setH2020topiccode(String h2020topiccode) {
this.h2020topiccode = h2020topiccode;
}
public List<H2020Classification> getH2020classification() {
@ -287,14 +286,6 @@ public class Project extends OafEntity implements Serializable {
this.fundedamount = fundedamount;
}
// public List<Programme> getProgramme() {
// return programme;
// }
//
// public void setProgramme(List<Programme> programme) {
// this.programme = programme;
// }
@Override
public void mergeFrom(OafEntity e) {
super.mergeFrom(e);
@ -350,7 +341,7 @@ public class Project extends OafEntity implements Serializable {
? p.getFundedamount()
: fundedamount;
//programme = mergeLists(programme, p.getProgramme());
// programme = mergeLists(programme, p.getProgramme());
h2020classification = mergeLists(h2020classification, p.getH2020classification());