forked from D-Net/dnet-hadoop
modification to the schema for h2020classification and h2020topic code
This commit is contained in:
parent
9d8cb5f827
commit
3c7ef5ca04
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,8 +4,6 @@ package eu.dnetlib.dhp.schema.dump.oaf.graph;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
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
|
* 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
|
* 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 Granted granted;
|
||||||
|
|
||||||
private List<Programme> programme;
|
// private List<Programme> programme;
|
||||||
|
|
||||||
|
private List<H2020Classification> h2020Classifications;
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
|
@ -184,12 +184,11 @@ public class Project implements Serializable {
|
||||||
this.granted = granted;
|
this.granted = granted;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Programme> getProgramme() {
|
public List<H2020Classification> getH2020Classifications() {
|
||||||
return programme;
|
return h2020Classifications;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setProgramme(List<Programme> programme) {
|
public void setH2020Classifications(List<H2020Classification> h2020Classifications) {
|
||||||
this.programme = programme;
|
this.h2020Classifications = h2020Classifications;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,72 +1,70 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.schema.oaf;
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
public class H2020Classification implements Serializable {
|
public class H2020Classification implements Serializable {
|
||||||
private H2020Programme h2020Programme;
|
private H2020Programme h2020Programme;
|
||||||
private String level1;
|
private String level1;
|
||||||
private String level2;
|
private String level2;
|
||||||
private String level3;
|
private String level3;
|
||||||
|
|
||||||
private String classification;
|
private String classification;
|
||||||
|
|
||||||
|
public H2020Programme getH2020Programme() {
|
||||||
|
return h2020Programme;
|
||||||
|
}
|
||||||
|
|
||||||
public H2020Programme getH2020Programme() {
|
public void setH2020Programme(H2020Programme h2020Programme) {
|
||||||
return h2020Programme;
|
this.h2020Programme = h2020Programme;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setH2020Programme(H2020Programme h2020Programme) {
|
public String getLevel1() {
|
||||||
this.h2020Programme = h2020Programme;
|
return level1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setLevel1(String level1) {
|
||||||
|
this.level1 = level1;
|
||||||
|
}
|
||||||
|
|
||||||
public String getLevel1() {
|
public String getLevel2() {
|
||||||
return level1;
|
return level2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLevel1(String level1) {
|
public void setLevel2(String level2) {
|
||||||
this.level1 = level1;
|
this.level2 = level2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLevel2() {
|
public String getLevel3() {
|
||||||
return level2;
|
return level3;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLevel2(String level2) {
|
public void setLevel3(String level3) {
|
||||||
this.level2 = level2;
|
this.level3 = level3;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLevel3() {
|
public String getClassification() {
|
||||||
return level3;
|
return classification;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLevel3(String level3) {
|
public void setClassification(String classification) {
|
||||||
this.level3 = level3;
|
this.classification = classification;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getClassification() {
|
@Override
|
||||||
return classification;
|
public boolean equals(Object o) {
|
||||||
}
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (o == null || getClass() != o.getClass())
|
||||||
|
return false;
|
||||||
|
|
||||||
public void setClassification(String classification) {
|
H2020Classification h2020classification = (H2020Classification) o;
|
||||||
this.classification = classification;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
return Objects.equals(level1, h2020classification.level1) &&
|
||||||
@Override
|
Objects.equals(level2, h2020classification.level2) &&
|
||||||
public boolean equals(Object o) {
|
Objects.equals(level3, h2020classification.level3) &&
|
||||||
if (this == o)
|
Objects.equals(classification, h2020classification.classification) &&
|
||||||
return true;
|
h2020Programme.equals(h2020classification.h2020Programme);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,17 +58,16 @@ public class Project extends OafEntity implements Serializable {
|
||||||
|
|
||||||
private Float fundedamount;
|
private Float fundedamount;
|
||||||
|
|
||||||
private String topic;
|
private String h2020topiccode;
|
||||||
|
|
||||||
private List<H2020Classification> h2020classification;
|
private List<H2020Classification> h2020classification;
|
||||||
|
|
||||||
|
public String getH2020topiccode() {
|
||||||
public String getTopic() {
|
return h2020topiccode;
|
||||||
return topic;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTopic(String topic) {
|
public void setH2020topiccode(String h2020topiccode) {
|
||||||
this.topic = topic;
|
this.h2020topiccode = h2020topiccode;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<H2020Classification> getH2020classification() {
|
public List<H2020Classification> getH2020classification() {
|
||||||
|
@ -287,14 +286,6 @@ public class Project extends OafEntity implements Serializable {
|
||||||
this.fundedamount = fundedamount;
|
this.fundedamount = fundedamount;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public List<Programme> getProgramme() {
|
|
||||||
// return programme;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setProgramme(List<Programme> programme) {
|
|
||||||
// this.programme = programme;
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void mergeFrom(OafEntity e) {
|
public void mergeFrom(OafEntity e) {
|
||||||
super.mergeFrom(e);
|
super.mergeFrom(e);
|
||||||
|
@ -350,7 +341,7 @@ public class Project extends OafEntity implements Serializable {
|
||||||
? p.getFundedamount()
|
? p.getFundedamount()
|
||||||
: fundedamount;
|
: fundedamount;
|
||||||
|
|
||||||
//programme = mergeLists(programme, p.getProgramme());
|
// programme = mergeLists(programme, p.getProgramme());
|
||||||
|
|
||||||
h2020classification = mergeLists(h2020classification, p.getH2020classification());
|
h2020classification = mergeLists(h2020classification, p.getH2020classification());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue