Project

General

Profile

1
package eu.dnetlib.data.mapreduce.hbase.dedup;
2

    
3
import java.io.Serializable;
4
import java.util.Set;
5

    
6
import org.apache.hadoop.io.Text;
7

    
8
import com.google.gson.Gson;
9

    
10
public class DedupPersonBean implements Serializable {
11

    
12
	/**
13
	 * 
14
	 */
15
	private static final long serialVersionUID = -4107429095178989581L;
16

    
17
	private String id;
18
	private String name;
19
	private Set<String> results;
20

    
21
	public DedupPersonBean() {
22
	}
23

    
24
	public DedupPersonBean(String id, String name, Set<String> results) {
25
		this.id = id;
26
		this.name = name;
27
		this.results = results;
28
	}
29

    
30
	public String getId() {
31
		return id;
32
	}
33

    
34
	public void setId(String id) {
35
		this.id = id;
36
	}
37

    
38
	public String getName() {
39
		return name;
40
	}
41

    
42
	public void setName(String name) {
43
		this.name = name;
44
	}
45

    
46
	public Set<String> getResults() {
47
		return results;
48
	}
49

    
50
	public void setResults(Set<String> results) {
51
		this.results = results;
52
	}
53

    
54
	public Text toText() {
55
		return new Text((new Gson()).toJson(this));
56
	}
57

    
58
	public static DedupPersonBean fromText(Text text) {
59
		return (new Gson()).fromJson(text.toString(), DedupPersonBean.class);
60

    
61
	}
62

    
63
}
(9-9/16)