forked from D-Net/dnet-hadoop
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:
parent
1069cf243a
commit
9d8cb5f827
|
@ -3,7 +3,7 @@ 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;
|
||||||
|
@ -53,16 +53,6 @@ public class H2020classification implements Serializable {
|
||||||
this.classification = classification;
|
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
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
|
@ -71,7 +61,7 @@ public class H2020classification implements Serializable {
|
||||||
if (o == null || getClass() != o.getClass())
|
if (o == null || getClass() != o.getClass())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
H2020classification h2020classification = (H2020classification)o;
|
H2020Classification h2020classification = (H2020Classification)o;
|
||||||
|
|
||||||
return Objects.equals(level1, h2020classification.level1) &&
|
return Objects.equals(level1, h2020classification.level1) &&
|
||||||
Objects.equals(level2, h2020classification.level2) &&
|
Objects.equals(level2, h2020classification.level2) &&
|
|
@ -60,7 +60,7 @@ public class Project extends OafEntity implements Serializable {
|
||||||
|
|
||||||
private String topic;
|
private String topic;
|
||||||
|
|
||||||
private List<H2020classification> h2020classification;
|
private List<H2020Classification> h2020classification;
|
||||||
|
|
||||||
|
|
||||||
public String getTopic() {
|
public String getTopic() {
|
||||||
|
@ -71,11 +71,11 @@ public class Project extends OafEntity implements Serializable {
|
||||||
this.topic = topic;
|
this.topic = topic;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<H2020classification> getH2020classification() {
|
public List<H2020Classification> getH2020classification() {
|
||||||
return h2020classification;
|
return h2020classification;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setH2020classification(List<H2020classification> h2020classification) {
|
public void setH2020classification(List<H2020Classification> h2020classification) {
|
||||||
this.h2020classification = h2020classification;
|
this.h2020classification = h2020classification;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue