Project

General

Profile

1
package eu.dnetlib.msro.workflows.dedup.conf;
2

    
3
import com.google.gson.GsonBuilder;
4

    
5
/**
6
 * The Class Entity.
7
 */
8
public class Entity {
9

    
10
	/** The name. */
11
	private String name;
12

    
13
	/** The code. */
14
	private String code;
15

    
16
	/** The label. */
17
	private String label;
18

    
19
	public Entity() {}
20

    
21
	/**
22
	 * Instantiates a new entity.
23
	 *
24
	 * @param name
25
	 *            the name
26
	 * @param code
27
	 *            the code
28
	 * @param label
29
	 *            the label
30
	 */
31
	public Entity(final String name, final String code, final String label) {
32
		super();
33
		this.setName(name);
34
		this.setCode(code);
35
		this.setLabel(label);
36
	}
37

    
38
	/**
39
	 * Gets the name.
40
	 *
41
	 * @return the name
42
	 */
43
	public String getName() {
44
		return name;
45
	}
46

    
47
	/**
48
	 * Gets the code.
49
	 *
50
	 * @return the code
51
	 */
52
	public String getCode() {
53
		return code;
54
	}
55

    
56
	/**
57
	 * Gets the label.
58
	 *
59
	 * @return the label
60
	 */
61
	public String getLabel() {
62
		return label;
63
	}
64

    
65
	public void setName(final String name) {
66
		this.name = name;
67
	}
68

    
69
	public void setCode(final String code) {
70
		this.code = code;
71
	}
72

    
73
	public void setLabel(final String label) {
74
		this.label = label;
75
	}
76

    
77
	/*
78
	 * (non-Javadoc)
79
	 *
80
	 * @see java.lang.Object#toString()
81
	 */
82
	@Override
83
	public String toString() {
84
		return new GsonBuilder().setPrettyPrinting().create().toJson(this);
85
	}
86

    
87
}
(3-3/3)