1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.ws.jws2; |
22 |
|
|
23 |
|
import jalview.ws.AWsJob; |
24 |
|
|
25 |
|
import compbio.metadata.JobStatus; |
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
@author |
31 |
|
|
32 |
|
|
|
|
| 0% |
Uncovered Elements: 32 (32) |
Complexity: 16 |
Complexity Density: 1.6 |
|
33 |
|
public abstract class JWs2Job extends AWsJob |
34 |
|
{ |
35 |
|
JobStatus status = null; |
36 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
37 |
0 |
public void setjobStatus(JobStatus jobStatus)... |
38 |
|
{ |
39 |
0 |
status = jobStatus; |
40 |
|
|
41 |
|
} |
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
@see |
47 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
48 |
0 |
@Override... |
49 |
|
public void clearResponse() |
50 |
|
{ |
51 |
0 |
status = null; |
52 |
|
} |
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
@see |
58 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
59 |
0 |
@Override... |
60 |
|
public String getState() |
61 |
|
{ |
62 |
0 |
return status == null ? ("Unknown") : status.toString(); |
63 |
|
} |
64 |
|
|
65 |
|
|
66 |
|
|
67 |
|
|
68 |
|
@see |
69 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
70 |
0 |
@Override... |
71 |
|
public boolean hasResponse() |
72 |
|
{ |
73 |
|
|
74 |
0 |
return status != null; |
75 |
|
} |
76 |
|
|
77 |
|
|
78 |
|
|
79 |
|
|
80 |
|
@see |
81 |
|
|
82 |
|
|
83 |
|
|
84 |
|
|
85 |
|
@see |
86 |
|
|
87 |
|
|
88 |
|
|
89 |
|
|
90 |
|
|
91 |
|
|
92 |
|
|
93 |
|
@see |
94 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
95 |
0 |
@Override... |
96 |
|
public boolean isBroken() |
97 |
|
{ |
98 |
0 |
return status == null ? false : status.equals(status.UNDEFINED); |
99 |
|
} |
100 |
|
|
101 |
|
|
102 |
|
|
103 |
|
|
104 |
|
@see |
105 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
106 |
0 |
@Override... |
107 |
|
public boolean isFailed() |
108 |
|
{ |
109 |
0 |
return status == null ? false : status.equals(status.FAILED); |
110 |
|
} |
111 |
|
|
112 |
|
|
113 |
|
|
114 |
|
|
115 |
|
@see |
116 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
117 |
0 |
@Override... |
118 |
|
public boolean isFinished() |
119 |
|
{ |
120 |
0 |
return status == null ? false : status.equals(status.FINISHED); |
121 |
|
} |
122 |
|
|
123 |
|
|
124 |
|
|
125 |
|
|
126 |
|
@see |
127 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
128 |
0 |
@Override... |
129 |
|
public boolean isQueued() |
130 |
|
{ |
131 |
0 |
return status == null ? false |
132 |
|
: status.equals(status.SUBMITTED) |
133 |
|
|| status.equals(status.PENDING); |
134 |
|
} |
135 |
|
|
136 |
|
|
137 |
|
|
138 |
|
|
139 |
|
@see |
140 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
141 |
0 |
@Override... |
142 |
|
public boolean isRunning() |
143 |
|
{ |
144 |
|
|
145 |
0 |
return status != null && (status.equals(status.RUNNING) |
146 |
|
|| status.equals(status.STARTED)); |
147 |
|
} |
148 |
|
|
149 |
|
|
150 |
|
|
151 |
|
|
152 |
|
@see |
153 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
154 |
0 |
@Override... |
155 |
|
public boolean isServerError() |
156 |
|
{ |
157 |
|
|
158 |
0 |
return status == null ? false : false; |
159 |
|
} |
160 |
|
|
161 |
|
} |