Project

General

Profile

1
package eu.dnetlib.data.mdstore.plugins.objects;
2

    
3
import javax.xml.bind.annotation.XmlAccessType;
4
import javax.xml.bind.annotation.XmlAccessorType;
5
import javax.xml.bind.annotation.XmlAttribute;
6

    
7
@XmlAccessorType(XmlAccessType.FIELD)
8
public class Affiliation {
9

    
10
	@XmlAttribute(name = "code")
11
	private String code;
12

    
13
	@XmlAttribute(name = "type")
14
	private String type;
15

    
16
	@XmlAttribute(name = "groupAcronym")
17
	private String groupAcronym;
18

    
19
	@XmlAttribute(name = "group")
20
	private String group;
21

    
22
	public Affiliation() {}
23

    
24
	public Affiliation(final String code, final String type, final String groupAcronym, final String group) {
25
		super();
26
		this.code = code;
27
		this.type = type;
28
		this.groupAcronym = groupAcronym;
29
		this.group = group;
30
	}
31

    
32
	public String getGroupAcronym() {
33
		return groupAcronym;
34
	}
35

    
36
	public void setGroupAcronym(final String groupAcronym) {
37
		this.groupAcronym = groupAcronym;
38
	}
39

    
40
	public String getGroup() {
41
		return group;
42
	}
43

    
44
	public void setGroup(final String group) {
45
		this.group = group;
46
	}
47

    
48
	public String getType() {
49
		return type;
50
	}
51

    
52
	public void setType(final String type) {
53
		this.type = type;
54
	}
55

    
56
	public String getCode() {
57
		return code;
58
	}
59

    
60
	public void setCode(final String code) {
61
		this.code = code;
62
	}
63

    
64
	@Override
65
	public int hashCode() {
66
		return groupAcronym == null ? 0 : groupAcronym.hashCode();
67

    
68
	}
69

    
70
	@Override
71
	public boolean equals(final Object obj) {
72
		if (this == obj) { return true; }
73
		if (obj == null) { return false; }
74
		if (getClass() != obj.getClass()) { return false; }
75
		final Affiliation other = (Affiliation) obj;
76
		if (groupAcronym == null) {
77
			if (other.groupAcronym != null) { return false; }
78
		} else if (!groupAcronym.equals(other.groupAcronym)) { return false; }
79
		return true;
80
	}
81

    
82
}
(1-1/7)