Project

General

Profile

1 26600 sandro.lab
package eu.dnetlib.actionmanager.set;
2
3
import java.util.UUID;
4
5
import javax.xml.bind.annotation.XmlRootElement;
6
7
import eu.dnetlib.miscutils.datetime.DateUtils;
8
9
@XmlRootElement
10
public class RawSet {
11
12
	public static final String RAWSET_PREFIX = "rawset";
13
14
	private String id = null;
15
	private String creationDate = null;
16
	private String lastUpdate = null;
17
18
	public RawSet() {
19
20
	}
21
22
	protected RawSet(final String id, final String creationDate, final String lastUpdate) {
23
		super();
24
		this.id = id;
25
		this.creationDate = creationDate;
26
		this.lastUpdate = lastUpdate;
27
	}
28
29
	public String getId() {
30
		return id;
31
	}
32
33
	public void setId(final String id) {
34
		this.id = id;
35
	}
36
37
	public String getCreationDate() {
38
		return creationDate;
39
	}
40
41
	public void setCreationDate(final String creationDate) {
42
		this.creationDate = creationDate;
43
	}
44
45
	public String getLastUpdate() {
46
		return lastUpdate;
47
	}
48
49
	public void setLastUpdate(final String lastUpdate) {
50
		this.lastUpdate = lastUpdate;
51
	}
52
53
	public static RawSet newInstance() {
54
		long now = DateUtils.now();
55
		return new RawSet(RAWSET_PREFIX + "_" + UUID.randomUUID() + "_" + now, DateUtils.calculate_ISO8601(now), null);
56
	}
57
58
	public static RawSet newInstance(final String id, final String creationDate, final String lastUpdate) {
59
		return new RawSet(id, creationDate, lastUpdate);
60
	}
61
62
}