dnet50/modules/dnet-wds/trunk/src/main/java/eu/dnetlib/msro/workflows/nodes/dedup/utils/Entity.java @ 43444
1 |
package eu.dnetlib.msro.workflows.nodes.dedup.utils; |
---|---|
2 |
|
3 |
import com.google.gson.GsonBuilder; |
4 |
|
5 |
/**
|
6 |
* The Class Entity.
|
7 |
*/
|
8 |
public class Entity { |
9 |
|
10 |
/**
|
11 |
* The name.
|
12 |
*/
|
13 |
private String name; |
14 |
|
15 |
/**
|
16 |
* The code.
|
17 |
*/
|
18 |
private String code; |
19 |
|
20 |
/**
|
21 |
* The label.
|
22 |
*/
|
23 |
private String label; |
24 |
|
25 |
public Entity() { |
26 |
}
|
27 |
|
28 |
/**
|
29 |
* Instantiates a new entity.
|
30 |
*
|
31 |
* @param name the name
|
32 |
* @param code the code
|
33 |
* @param label the label
|
34 |
*/
|
35 |
public Entity(final String name, final String code, final String label) { |
36 |
super(); |
37 |
this.setName(name); |
38 |
this.setCode(code); |
39 |
this.setLabel(label); |
40 |
}
|
41 |
|
42 |
/**
|
43 |
* Gets the name.
|
44 |
*
|
45 |
* @return the name
|
46 |
*/
|
47 |
public String getName() { |
48 |
return name; |
49 |
}
|
50 |
|
51 |
public void setName(final String name) { |
52 |
this.name = name; |
53 |
}
|
54 |
|
55 |
/**
|
56 |
* Gets the code.
|
57 |
*
|
58 |
* @return the code
|
59 |
*/
|
60 |
public String getCode() { |
61 |
return code; |
62 |
}
|
63 |
|
64 |
public void setCode(final String code) { |
65 |
this.code = code; |
66 |
}
|
67 |
|
68 |
/**
|
69 |
* Gets the label.
|
70 |
*
|
71 |
* @return the label
|
72 |
*/
|
73 |
public String getLabel() { |
74 |
return label; |
75 |
}
|
76 |
|
77 |
public void setLabel(final String label) { |
78 |
this.label = label; |
79 |
}
|
80 |
|
81 |
/*
|
82 |
* (non-Javadoc)
|
83 |
*
|
84 |
* @see java.lang.Object#toString()
|
85 |
*/
|
86 |
@Override
|
87 |
public String toString() { |
88 |
return new GsonBuilder().setPrettyPrinting().create().toJson(this); |
89 |
}
|
90 |
|
91 |
}
|
- « Previous
- 1
- 2
- 3
- Next »