diff --git a/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/H2020Classification.java b/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/H2020Classification.java new file mode 100644 index 000000000..39fde5ebb --- /dev/null +++ b/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/H2020Classification.java @@ -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; + } +} diff --git a/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java b/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java index 25f106da5..1588b8657 100644 --- a/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java +++ b/dhp-schemas/src/main/java/eu/dnetlib/dhp/schema/dump/oaf/graph/Project.java @@ -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; + // private List programme; + + private List h2020Classifications; public String getId() { return id; @@ -184,12 +184,11 @@ public class Project implements Serializable { this.granted = granted; } - public List getProgramme() { - return programme; + public List getH2020Classifications() { + return h2020Classifications; } - public void setProgramme(List programme) { - this.programme = programme; + public void setH2020Classifications(List h2020Classifications) { + this.h2020Classifications = h2020Classifications; } - } 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 index 180e99fea..55f25d4b0 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 @@ -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); + } } 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 7a459f033..a47ba8157 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 @@ -58,17 +58,16 @@ public class Project extends OafEntity implements Serializable { private Float fundedamount; - private String topic; + private String h2020topiccode; private List 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 getH2020classification() { @@ -287,14 +286,6 @@ public class Project extends OafEntity implements Serializable { this.fundedamount = fundedamount; } -// public List getProgramme() { -// return programme; -// } -// -// public void setProgramme(List 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());