1
|
package eu.dnetlib.data.mdstore.plugins.objects;
|
2
|
|
3
|
import java.util.LinkedHashSet;
|
4
|
import java.util.Set;
|
5
|
|
6
|
import javax.xml.bind.annotation.XmlAccessType;
|
7
|
import javax.xml.bind.annotation.XmlAccessorType;
|
8
|
import javax.xml.bind.annotation.XmlElement;
|
9
|
|
10
|
@XmlAccessorType(XmlAccessType.FIELD)
|
11
|
public class CnrPerson {
|
12
|
|
13
|
@XmlElement(name = "infoId")
|
14
|
private String id;
|
15
|
@XmlElement(name = "name")
|
16
|
private String name;
|
17
|
|
18
|
@XmlElement(name = "affiliation")
|
19
|
private Set<Affiliation> affiliations = new LinkedHashSet<>();
|
20
|
|
21
|
public String getId() {
|
22
|
return id;
|
23
|
}
|
24
|
|
25
|
public void setId(final String id) {
|
26
|
this.id = id;
|
27
|
}
|
28
|
|
29
|
public String getName() {
|
30
|
return name;
|
31
|
}
|
32
|
|
33
|
public void setName(final String name) {
|
34
|
this.name = name;
|
35
|
}
|
36
|
|
37
|
public Set<Affiliation> getAffiliations() {
|
38
|
return affiliations;
|
39
|
}
|
40
|
|
41
|
public void setAffiliations(final Set<Affiliation> affiliations) {
|
42
|
this.affiliations = affiliations;
|
43
|
}
|
44
|
|
45
|
@Override
|
46
|
public int hashCode() {
|
47
|
return id == null ? 0 : id.hashCode();
|
48
|
}
|
49
|
|
50
|
@Override
|
51
|
public boolean equals(final Object obj) {
|
52
|
if (this == obj) { return true; }
|
53
|
if (obj == null) { return false; }
|
54
|
if (getClass() != obj.getClass()) { return false; }
|
55
|
final CnrPerson other = (CnrPerson) obj;
|
56
|
if (id == null) {
|
57
|
if (other.id != null) { return false; }
|
58
|
} else if (!id.equals(other.id)) { return false; }
|
59
|
return true;
|
60
|
}
|
61
|
|
62
|
}
|