1
|
package eu.dnetlib.functionality.modular.ui.workflows.objects;
|
2
|
|
3
|
import java.util.Date;
|
4
|
|
5
|
import com.googlecode.sarasvati.GraphProcess;
|
6
|
|
7
|
import eu.dnetlib.msro.workflows.util.ProcessUtils;
|
8
|
|
9
|
public class ProcessListEntry {
|
10
|
|
11
|
private String procId;
|
12
|
private String wfId;
|
13
|
private String name;
|
14
|
private String family;
|
15
|
private String status;
|
16
|
private long date;
|
17
|
private String repo;
|
18
|
private String repoId;
|
19
|
private String apiId;
|
20
|
|
21
|
public ProcessListEntry() {}
|
22
|
|
23
|
public ProcessListEntry(final String procId, final String wfId, final String name, final String family, final String status, final long date,
|
24
|
final String repo, final String repoId, final String apiId) {
|
25
|
this.procId = procId;
|
26
|
this.wfId = wfId;
|
27
|
this.name = name;
|
28
|
this.family = family;
|
29
|
this.status = status;
|
30
|
this.date = date;
|
31
|
this.repo = repo;
|
32
|
this.repoId = repoId;
|
33
|
this.apiId = apiId;
|
34
|
}
|
35
|
|
36
|
public ProcessListEntry(final String procId, final String wfId, final String name, final String family, final String status, final Date date,
|
37
|
final String repo, final String repoId, final String apiId) {
|
38
|
this(procId, wfId, name, family, status, dateToLong(date), repo, repoId, apiId);
|
39
|
}
|
40
|
|
41
|
public ProcessListEntry(final String procId, final GraphProcess process) {
|
42
|
this(procId,
|
43
|
ProcessUtils.calculateWfId(process),
|
44
|
ProcessUtils.calculateName(process),
|
45
|
ProcessUtils.calculateFamily(process),
|
46
|
ProcessUtils.calculateStatus(process),
|
47
|
ProcessUtils.calculateLastActivityDate(process),
|
48
|
ProcessUtils.calculateRepo(process),
|
49
|
ProcessUtils.calculateRepoId(process),
|
50
|
ProcessUtils.calculateApiId(process));
|
51
|
}
|
52
|
|
53
|
public String getProcId() {
|
54
|
return procId;
|
55
|
}
|
56
|
|
57
|
public void setProcId(final String procId) {
|
58
|
this.procId = procId;
|
59
|
}
|
60
|
|
61
|
public String getName() {
|
62
|
return name;
|
63
|
}
|
64
|
|
65
|
public void setName(final String name) {
|
66
|
this.name = name;
|
67
|
}
|
68
|
|
69
|
public String getStatus() {
|
70
|
return status;
|
71
|
}
|
72
|
|
73
|
public void setStatus(final String status) {
|
74
|
this.status = status;
|
75
|
}
|
76
|
|
77
|
public String getFamily() {
|
78
|
return family;
|
79
|
}
|
80
|
|
81
|
public String getWfId() {
|
82
|
return wfId;
|
83
|
}
|
84
|
|
85
|
public void setWfId(final String wfId) {
|
86
|
this.wfId = wfId;
|
87
|
}
|
88
|
|
89
|
public long getDate() {
|
90
|
return date;
|
91
|
}
|
92
|
|
93
|
public void setDate(final long date) {
|
94
|
this.date = date;
|
95
|
}
|
96
|
|
97
|
public void setFamily(final String family) {
|
98
|
this.family = family;
|
99
|
}
|
100
|
|
101
|
public String getRepo() {
|
102
|
return repo;
|
103
|
}
|
104
|
|
105
|
public void setRepo(final String repo) {
|
106
|
this.repo = repo;
|
107
|
}
|
108
|
|
109
|
private static long dateToLong(final Date date) {
|
110
|
return date == null ? Long.MAX_VALUE : date.getTime();
|
111
|
}
|
112
|
|
113
|
public String getRepoId() {
|
114
|
return repoId;
|
115
|
}
|
116
|
|
117
|
public void setRepoId(final String repoId) {
|
118
|
this.repoId = repoId;
|
119
|
}
|
120
|
|
121
|
public String getApiId() {
|
122
|
return apiId;
|
123
|
}
|
124
|
|
125
|
public void setApiId(final String apiId) {
|
126
|
this.apiId = apiId;
|
127
|
}
|
128
|
|
129
|
}
|