1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
package jalview.schemabinding.version2.descriptors; |
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
import jalview.schemabinding.version2.ThresholdLine; |
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
@version |
20 |
|
|
|
|
| 76.9% |
Uncovered Elements: 25 (108) |
Complexity: 25 |
Complexity Density: 0.3 |
|
21 |
|
public class ThresholdLineDescriptor extends |
22 |
|
org.exolab.castor.xml.util.XMLClassDescriptorImpl |
23 |
|
{ |
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
private boolean _elementDefinition; |
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
private java.lang.String _nsPrefix; |
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
private java.lang.String _nsURI; |
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
private java.lang.String _xmlName; |
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (43) |
Complexity: 1 |
Complexity Density: 0.02 |
|
53 |
90 |
public ThresholdLineDescriptor()... |
54 |
|
{ |
55 |
90 |
super(); |
56 |
90 |
_nsURI = "www.vamsas.ac.uk/jalview/version2"; |
57 |
90 |
_xmlName = "thresholdLine"; |
58 |
90 |
_elementDefinition = true; |
59 |
90 |
org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; |
60 |
90 |
org.exolab.castor.mapping.FieldHandler handler = null; |
61 |
90 |
org.exolab.castor.xml.FieldValidator fieldValidator = null; |
62 |
|
|
63 |
|
|
64 |
|
|
65 |
90 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
66 |
|
java.lang.String.class, "_label", "label", |
67 |
|
org.exolab.castor.xml.NodeType.Attribute); |
68 |
90 |
desc.setImmutable(true); |
69 |
90 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
70 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
71 |
60 |
public java.lang.Object getValue(java.lang.Object object)... |
72 |
|
throws IllegalStateException |
73 |
|
{ |
74 |
60 |
ThresholdLine target = (ThresholdLine) object; |
75 |
60 |
return target.getLabel(); |
76 |
|
} |
77 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
78 |
30 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
79 |
|
throws IllegalStateException, IllegalArgumentException |
80 |
|
{ |
81 |
30 |
try |
82 |
|
{ |
83 |
30 |
ThresholdLine target = (ThresholdLine) object; |
84 |
30 |
target.setLabel((java.lang.String) value); |
85 |
|
} catch (java.lang.Exception ex) |
86 |
|
{ |
87 |
0 |
throw new IllegalStateException(ex.toString()); |
88 |
|
} |
89 |
|
} |
90 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
91 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
92 |
|
{ |
93 |
0 |
return null; |
94 |
|
} |
95 |
|
}; |
96 |
90 |
desc.setHandler(handler); |
97 |
90 |
desc.setMultivalued(false); |
98 |
90 |
addFieldDescriptor(desc); |
99 |
|
|
100 |
|
|
101 |
90 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
102 |
|
{ |
103 |
90 |
org.exolab.castor.xml.validators.StringValidator typeValidator; |
104 |
90 |
typeValidator = new org.exolab.castor.xml.validators.StringValidator(); |
105 |
90 |
fieldValidator.setValidator(typeValidator); |
106 |
90 |
typeValidator.setWhiteSpace("preserve"); |
107 |
|
} |
108 |
90 |
desc.setValidator(fieldValidator); |
109 |
|
|
110 |
90 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
111 |
|
java.lang.Float.TYPE, "_value", "value", |
112 |
|
org.exolab.castor.xml.NodeType.Attribute); |
113 |
90 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
114 |
|
{ |
|
|
| 66.7% |
Uncovered Elements: 2 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
115 |
60 |
public java.lang.Object getValue(java.lang.Object object)... |
116 |
|
throws IllegalStateException |
117 |
|
{ |
118 |
60 |
ThresholdLine target = (ThresholdLine) object; |
119 |
60 |
if (!target.hasValue()) |
120 |
|
{ |
121 |
0 |
return null; |
122 |
|
} |
123 |
60 |
return new java.lang.Float(target.getValue()); |
124 |
|
} |
125 |
|
|
|
|
| 55.6% |
Uncovered Elements: 4 (9) |
Complexity: 3 |
Complexity Density: 0.43 |
|
126 |
30 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
127 |
|
throws IllegalStateException, IllegalArgumentException |
128 |
|
{ |
129 |
30 |
try |
130 |
|
{ |
131 |
30 |
ThresholdLine target = (ThresholdLine) object; |
132 |
|
|
133 |
30 |
if (value == null) |
134 |
|
{ |
135 |
0 |
target.deleteValue(); |
136 |
0 |
return; |
137 |
|
} |
138 |
30 |
target.setValue(((java.lang.Float) value).floatValue()); |
139 |
|
} catch (java.lang.Exception ex) |
140 |
|
{ |
141 |
0 |
throw new IllegalStateException(ex.toString()); |
142 |
|
} |
143 |
|
} |
144 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
145 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
146 |
|
{ |
147 |
0 |
return null; |
148 |
|
} |
149 |
|
}; |
150 |
90 |
desc.setHandler(handler); |
151 |
90 |
desc.setMultivalued(false); |
152 |
90 |
addFieldDescriptor(desc); |
153 |
|
|
154 |
|
|
155 |
90 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
156 |
|
{ |
157 |
90 |
org.exolab.castor.xml.validators.FloatValidator typeValidator; |
158 |
90 |
typeValidator = new org.exolab.castor.xml.validators.FloatValidator(); |
159 |
90 |
fieldValidator.setValidator(typeValidator); |
160 |
90 |
typeValidator.setMinInclusive((float) -3.4028235E38); |
161 |
90 |
typeValidator.setMaxInclusive((float) 3.4028235E38); |
162 |
|
} |
163 |
90 |
desc.setValidator(fieldValidator); |
164 |
|
|
165 |
90 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
166 |
|
java.lang.Integer.TYPE, "_colour", "colour", |
167 |
|
org.exolab.castor.xml.NodeType.Attribute); |
168 |
90 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
169 |
|
{ |
|
|
| 66.7% |
Uncovered Elements: 2 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
170 |
60 |
public java.lang.Object getValue(java.lang.Object object)... |
171 |
|
throws IllegalStateException |
172 |
|
{ |
173 |
60 |
ThresholdLine target = (ThresholdLine) object; |
174 |
60 |
if (!target.hasColour()) |
175 |
|
{ |
176 |
0 |
return null; |
177 |
|
} |
178 |
60 |
return new java.lang.Integer(target.getColour()); |
179 |
|
} |
180 |
|
|
|
|
| 55.6% |
Uncovered Elements: 4 (9) |
Complexity: 3 |
Complexity Density: 0.43 |
|
181 |
30 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
182 |
|
throws IllegalStateException, IllegalArgumentException |
183 |
|
{ |
184 |
30 |
try |
185 |
|
{ |
186 |
30 |
ThresholdLine target = (ThresholdLine) object; |
187 |
|
|
188 |
30 |
if (value == null) |
189 |
|
{ |
190 |
0 |
target.deleteColour(); |
191 |
0 |
return; |
192 |
|
} |
193 |
30 |
target.setColour(((java.lang.Integer) value).intValue()); |
194 |
|
} catch (java.lang.Exception ex) |
195 |
|
{ |
196 |
0 |
throw new IllegalStateException(ex.toString()); |
197 |
|
} |
198 |
|
} |
199 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
200 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
201 |
|
{ |
202 |
0 |
return null; |
203 |
|
} |
204 |
|
}; |
205 |
90 |
desc.setHandler(handler); |
206 |
90 |
desc.setMultivalued(false); |
207 |
90 |
addFieldDescriptor(desc); |
208 |
|
|
209 |
|
|
210 |
90 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
211 |
|
{ |
212 |
90 |
org.exolab.castor.xml.validators.IntValidator typeValidator; |
213 |
90 |
typeValidator = new org.exolab.castor.xml.validators.IntValidator(); |
214 |
90 |
fieldValidator.setValidator(typeValidator); |
215 |
90 |
typeValidator.setMinInclusive(-2147483648); |
216 |
90 |
typeValidator.setMaxInclusive(2147483647); |
217 |
|
} |
218 |
90 |
desc.setValidator(fieldValidator); |
219 |
|
|
220 |
|
|
221 |
|
} |
222 |
|
|
223 |
|
|
224 |
|
|
225 |
|
|
226 |
|
|
227 |
|
|
228 |
|
|
229 |
|
|
230 |
|
@return |
231 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
232 |
0 |
public org.exolab.castor.mapping.AccessMode getAccessMode()... |
233 |
|
{ |
234 |
0 |
return null; |
235 |
|
} |
236 |
|
|
237 |
|
|
238 |
|
|
239 |
|
|
240 |
|
@return |
241 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
242 |
120 |
public org.exolab.castor.mapping.FieldDescriptor getIdentity()... |
243 |
|
{ |
244 |
120 |
return super.getIdentity(); |
245 |
|
} |
246 |
|
|
247 |
|
|
248 |
|
|
249 |
|
|
250 |
|
@return |
251 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
252 |
60 |
public java.lang.Class getJavaClass()... |
253 |
|
{ |
254 |
60 |
return jalview.schemabinding.version2.ThresholdLine.class; |
255 |
|
} |
256 |
|
|
257 |
|
|
258 |
|
|
259 |
|
|
260 |
|
@return |
261 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
262 |
30 |
public java.lang.String getNameSpacePrefix()... |
263 |
|
{ |
264 |
30 |
return _nsPrefix; |
265 |
|
} |
266 |
|
|
267 |
|
|
268 |
|
|
269 |
|
|
270 |
|
@return |
271 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
272 |
0 |
public java.lang.String getNameSpaceURI()... |
273 |
|
{ |
274 |
0 |
return _nsURI; |
275 |
|
} |
276 |
|
|
277 |
|
|
278 |
|
|
279 |
|
|
280 |
|
@return |
281 |
|
|
282 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
283 |
30 |
public org.exolab.castor.xml.TypeValidator getValidator()... |
284 |
|
{ |
285 |
30 |
return this; |
286 |
|
} |
287 |
|
|
288 |
|
|
289 |
|
|
290 |
|
|
291 |
|
@return |
292 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
293 |
180 |
public java.lang.String getXMLName()... |
294 |
|
{ |
295 |
180 |
return _xmlName; |
296 |
|
} |
297 |
|
|
298 |
|
|
299 |
|
|
300 |
|
|
301 |
|
@return |
302 |
|
|
303 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
304 |
0 |
public boolean isElementDefinition()... |
305 |
|
{ |
306 |
0 |
return _elementDefinition; |
307 |
|
} |
308 |
|
|
309 |
|
} |