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.dm; |
22 |
|
|
23 |
|
import jalview.util.MessageManager; |
24 |
|
import jalview.ws.jws2.ParameterUtils; |
25 |
|
import jalview.ws.params.OptionI; |
26 |
|
|
27 |
|
import java.net.MalformedURLException; |
28 |
|
import java.net.URL; |
29 |
|
import java.util.List; |
30 |
|
|
31 |
|
import compbio.metadata.Option; |
32 |
|
|
|
|
| 0% |
Uncovered Elements: 25 (25) |
Complexity: 13 |
Complexity Density: 0.87 |
|
33 |
|
public class JabaOption implements jalview.ws.params.OptionI |
34 |
|
{ |
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
35 |
0 |
public JabaOption(Option rg)... |
36 |
|
{ |
37 |
0 |
opt = rg; |
38 |
|
} |
39 |
|
|
40 |
|
Option opt; |
41 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
42 |
0 |
@Override... |
43 |
|
public String getValue() |
44 |
|
{ |
45 |
0 |
return opt.getDefaultValue(); |
46 |
|
} |
47 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
48 |
0 |
@Override... |
49 |
|
public String getName() |
50 |
|
{ |
51 |
0 |
return opt.getName(); |
52 |
|
} |
53 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 3 |
Complexity Density: 1 |
|
54 |
0 |
@Override... |
55 |
|
public URL getFurtherDetails() |
56 |
|
{ |
57 |
0 |
try |
58 |
|
{ |
59 |
0 |
return new URL(opt.getBasicURL().toExternalForm() + "/" |
60 |
|
+ opt.getFurtherDetails()); |
61 |
|
} catch (NullPointerException q) |
62 |
|
{ |
63 |
|
} catch (MalformedURLException q) |
64 |
|
{ |
65 |
|
|
66 |
|
} |
67 |
0 |
return null; |
68 |
|
} |
69 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
70 |
0 |
@Override... |
71 |
|
public boolean isRequired() |
72 |
|
{ |
73 |
0 |
return opt.isRequired(); |
74 |
|
} |
75 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
76 |
0 |
@Override... |
77 |
|
public String getDescription() |
78 |
|
{ |
79 |
0 |
return opt.getDescription(); |
80 |
|
} |
81 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
82 |
0 |
@Override... |
83 |
|
public List<String> getPossibleValues() |
84 |
|
{ |
85 |
|
|
86 |
0 |
return opt.getPossibleValues(); |
87 |
|
} |
88 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
89 |
0 |
@Override... |
90 |
|
public void setValue(String selectedItem) |
91 |
|
{ |
92 |
0 |
try |
93 |
|
{ |
94 |
0 |
opt.setDefaultValue(selectedItem); |
95 |
|
} catch (Exception e) |
96 |
|
{ |
97 |
0 |
e.printStackTrace(); |
98 |
0 |
throw new Error(MessageManager.getString( |
99 |
|
"error.implementation_error_cannot_set_jaba_option")); |
100 |
|
} |
101 |
|
} |
102 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
103 |
0 |
@Override... |
104 |
|
public OptionI copy() |
105 |
|
{ |
106 |
0 |
return new JabaOption(ParameterUtils.copyOption(opt)); |
107 |
|
} |
108 |
|
|
109 |
|
|
110 |
|
|
111 |
|
|
112 |
|
|
113 |
|
@return |
114 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
115 |
0 |
public Option getOption()... |
116 |
|
{ |
117 |
0 |
return opt; |
118 |
|
} |
119 |
|
|
120 |
|
} |