Project

General

Profile

1
package eu.dnetlib.functionality.modular.ui.workflows.objects;
2

    
3
import java.util.List;
4

    
5
import com.google.common.collect.Lists;
6
import eu.dnetlib.msro.workflows.graph.Process;
7
import eu.dnetlib.msro.workflows.util.ProcessUtils;
8

    
9
/**
10
 * Created by michele on 09/11/15.
11
 */
12
public class ProcessInfo {
13

    
14
	private String procId;
15
	private String wfId;
16
	private String name;
17
	private String family;
18
	private String status = "CREATED";
19
	private String datasource;
20
	private long date = Long.MAX_VALUE;
21
	private long startDate = 0;
22
	private long endDate = 0;
23
	private List<EnvParam> currentEnv = Lists.newArrayList();
24

    
25
	public ProcessInfo() {
26
	}
27

    
28
	public ProcessInfo(final String procId) {
29
		this.procId = procId;
30
	}
31

    
32
	public ProcessInfo(final Process process) {
33
		this.procId = process.getId();
34
		this.wfId = ProcessUtils.calculateWfId(process);
35
		this.name = process.getName();
36
		this.family = ProcessUtils.calculateFamily(process);
37
		this.status = ProcessUtils.calculateStatus(process);
38
		this.datasource = ProcessUtils.calculateRepo(process);
39
		this.date = ProcessUtils.calculateLastActivityDate(process);
40
		this.startDate = ProcessUtils.calculateStartDate(process);
41
		this.endDate = ProcessUtils.calculateEndDate(process);
42
	}
43

    
44
	public String getProcId() {
45
		return procId;
46
	}
47

    
48
	public void setProcId(final String processId) {
49
		this.procId = processId;
50
	}
51

    
52
	public String getWfId() {
53
		return wfId;
54
	}
55

    
56
	public void setWfId(final String wfId) {
57
		this.wfId = wfId;
58
	}
59

    
60
	public String getName() {
61
		return name;
62
	}
63

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

    
68
	public String getFamily() {
69
		return family;
70
	}
71

    
72
	public void setFamily(final String family) {
73
		this.family = family;
74
	}
75

    
76
	public String getStatus() {
77
		return status;
78
	}
79

    
80
	public void setStatus(final String status) {
81
		this.status = status;
82
	}
83

    
84
	public long getStartDate() {
85
		return startDate;
86
	}
87

    
88
	public void setStartDate(final long startDate) {
89
		this.startDate = startDate;
90
	}
91

    
92
	public long getEndDate() {
93
		return endDate;
94
	}
95

    
96
	public void setEndDate(final long endDate) {
97
		this.endDate = endDate;
98
	}
99

    
100
	public String getDatasource() {
101
		return datasource;
102
	}
103

    
104
	public void setDatasource(final String datasource) {
105
		this.datasource = datasource;
106
	}
107

    
108
	public long getDate() {
109
		return date;
110
	}
111

    
112
	public void setDate(final long date) {
113
		this.date = date;
114
	}
115

    
116
	public List<EnvParam> getCurrentEnv() {
117
		return currentEnv;
118
	}
119

    
120
	public void setCurrentEnv(final List<EnvParam> currentEnv) {
121
		this.currentEnv = currentEnv;
122
	}
123
}
(5-5/9)