1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
package jalview.schemabinding.version2.descriptors; |
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
import jalview.schemabinding.version2.Colour; |
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
@version |
20 |
|
|
|
|
| 81.5% |
Uncovered Elements: 58 (314) |
Complexity: 67 |
Complexity Density: 0.27 |
|
21 |
|
public class ColourDescriptor |
22 |
|
extends 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 (133) |
Complexity: 1 |
Complexity Density: 0.01 |
|
53 |
20 |
public ColourDescriptor()... |
54 |
|
{ |
55 |
20 |
super(); |
56 |
20 |
_xmlName = "colour"; |
57 |
20 |
_elementDefinition = true; |
58 |
|
|
59 |
|
|
60 |
20 |
setCompositorAsSequence(); |
61 |
20 |
org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; |
62 |
20 |
org.exolab.castor.mapping.FieldHandler handler = null; |
63 |
20 |
org.exolab.castor.xml.FieldValidator fieldValidator = null; |
64 |
|
|
65 |
|
|
66 |
|
|
67 |
20 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
68 |
|
java.lang.String.class, "_name", "Name", |
69 |
|
org.exolab.castor.xml.NodeType.Attribute); |
70 |
20 |
desc.setImmutable(true); |
71 |
20 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
72 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
73 |
15 |
public java.lang.Object getValue(java.lang.Object object)... |
74 |
|
throws IllegalStateException |
75 |
|
{ |
76 |
15 |
Colour target = (Colour) object; |
77 |
15 |
return target.getName(); |
78 |
|
} |
79 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
80 |
5 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
81 |
|
throws IllegalStateException, IllegalArgumentException |
82 |
|
{ |
83 |
5 |
try |
84 |
|
{ |
85 |
5 |
Colour target = (Colour) object; |
86 |
5 |
target.setName((java.lang.String) value); |
87 |
|
} catch (java.lang.Exception ex) |
88 |
|
{ |
89 |
0 |
throw new IllegalStateException(ex.toString()); |
90 |
|
} |
91 |
|
} |
92 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
93 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
94 |
|
{ |
95 |
0 |
return null; |
96 |
|
} |
97 |
|
}; |
98 |
20 |
desc.setHandler(handler); |
99 |
20 |
desc.setMultivalued(false); |
100 |
20 |
addFieldDescriptor(desc); |
101 |
|
|
102 |
|
|
103 |
20 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
104 |
|
{ |
105 |
20 |
org.exolab.castor.xml.validators.StringValidator typeValidator; |
106 |
20 |
typeValidator = new org.exolab.castor.xml.validators.StringValidator(); |
107 |
20 |
fieldValidator.setValidator(typeValidator); |
108 |
20 |
typeValidator.setWhiteSpace("preserve"); |
109 |
|
} |
110 |
20 |
desc.setValidator(fieldValidator); |
111 |
|
|
112 |
20 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
113 |
|
java.lang.String.class, "_RGB", "RGB", |
114 |
|
org.exolab.castor.xml.NodeType.Attribute); |
115 |
20 |
desc.setImmutable(true); |
116 |
20 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
117 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
118 |
15 |
public java.lang.Object getValue(java.lang.Object object)... |
119 |
|
throws IllegalStateException |
120 |
|
{ |
121 |
15 |
Colour target = (Colour) object; |
122 |
15 |
return target.getRGB(); |
123 |
|
} |
124 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
125 |
5 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
126 |
|
throws IllegalStateException, IllegalArgumentException |
127 |
|
{ |
128 |
5 |
try |
129 |
|
{ |
130 |
5 |
Colour target = (Colour) object; |
131 |
5 |
target.setRGB((java.lang.String) value); |
132 |
|
} catch (java.lang.Exception ex) |
133 |
|
{ |
134 |
0 |
throw new IllegalStateException(ex.toString()); |
135 |
|
} |
136 |
|
} |
137 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
138 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
139 |
|
{ |
140 |
0 |
return null; |
141 |
|
} |
142 |
|
}; |
143 |
20 |
desc.setHandler(handler); |
144 |
20 |
desc.setRequired(true); |
145 |
20 |
desc.setMultivalued(false); |
146 |
20 |
addFieldDescriptor(desc); |
147 |
|
|
148 |
|
|
149 |
20 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
150 |
20 |
fieldValidator.setMinOccurs(1); |
151 |
|
{ |
152 |
20 |
org.exolab.castor.xml.validators.StringValidator typeValidator; |
153 |
20 |
typeValidator = new org.exolab.castor.xml.validators.StringValidator(); |
154 |
20 |
fieldValidator.setValidator(typeValidator); |
155 |
20 |
typeValidator.setWhiteSpace("preserve"); |
156 |
|
} |
157 |
20 |
desc.setValidator(fieldValidator); |
158 |
|
|
159 |
20 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
160 |
|
java.lang.String.class, "_minRGB", "minRGB", |
161 |
|
org.exolab.castor.xml.NodeType.Attribute); |
162 |
20 |
desc.setImmutable(true); |
163 |
20 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
164 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
165 |
15 |
public java.lang.Object getValue(java.lang.Object object)... |
166 |
|
throws IllegalStateException |
167 |
|
{ |
168 |
15 |
Colour target = (Colour) object; |
169 |
15 |
return target.getMinRGB(); |
170 |
|
} |
171 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
172 |
4 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
173 |
|
throws IllegalStateException, IllegalArgumentException |
174 |
|
{ |
175 |
4 |
try |
176 |
|
{ |
177 |
4 |
Colour target = (Colour) object; |
178 |
4 |
target.setMinRGB((java.lang.String) value); |
179 |
|
} catch (java.lang.Exception ex) |
180 |
|
{ |
181 |
0 |
throw new IllegalStateException(ex.toString()); |
182 |
|
} |
183 |
|
} |
184 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
185 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
186 |
|
{ |
187 |
0 |
return null; |
188 |
|
} |
189 |
|
}; |
190 |
20 |
desc.setHandler(handler); |
191 |
20 |
desc.setMultivalued(false); |
192 |
20 |
addFieldDescriptor(desc); |
193 |
|
|
194 |
|
|
195 |
20 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
196 |
|
{ |
197 |
20 |
org.exolab.castor.xml.validators.StringValidator typeValidator; |
198 |
20 |
typeValidator = new org.exolab.castor.xml.validators.StringValidator(); |
199 |
20 |
fieldValidator.setValidator(typeValidator); |
200 |
20 |
typeValidator.setWhiteSpace("preserve"); |
201 |
|
} |
202 |
20 |
desc.setValidator(fieldValidator); |
203 |
|
|
204 |
20 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
205 |
|
jalview.schemabinding.version2.types.NoValueColour.class, |
206 |
|
"_noValueColour", "noValueColour", |
207 |
|
org.exolab.castor.xml.NodeType.Attribute); |
208 |
20 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
209 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
210 |
15 |
public java.lang.Object getValue(java.lang.Object object)... |
211 |
|
throws IllegalStateException |
212 |
|
{ |
213 |
15 |
Colour target = (Colour) object; |
214 |
15 |
return target.getNoValueColour(); |
215 |
|
} |
216 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
217 |
5 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
218 |
|
throws IllegalStateException, IllegalArgumentException |
219 |
|
{ |
220 |
5 |
try |
221 |
|
{ |
222 |
5 |
Colour target = (Colour) object; |
223 |
5 |
target.setNoValueColour( |
224 |
|
(jalview.schemabinding.version2.types.NoValueColour) value); |
225 |
|
} catch (java.lang.Exception ex) |
226 |
|
{ |
227 |
0 |
throw new IllegalStateException(ex.toString()); |
228 |
|
} |
229 |
|
} |
230 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
231 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
232 |
|
{ |
233 |
0 |
return null; |
234 |
|
} |
235 |
|
}; |
236 |
20 |
handler = new org.exolab.castor.xml.handlers.EnumFieldHandler( |
237 |
|
jalview.schemabinding.version2.types.NoValueColour.class, |
238 |
|
handler); |
239 |
20 |
desc.setImmutable(true); |
240 |
20 |
desc.setHandler(handler); |
241 |
20 |
desc.setMultivalued(false); |
242 |
20 |
addFieldDescriptor(desc); |
243 |
|
|
244 |
|
|
245 |
20 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
246 |
|
{ |
247 |
|
} |
248 |
20 |
desc.setValidator(fieldValidator); |
249 |
|
|
250 |
20 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
251 |
|
jalview.schemabinding.version2.types.ColourThreshTypeType.class, |
252 |
|
"_threshType", "threshType", |
253 |
|
org.exolab.castor.xml.NodeType.Attribute); |
254 |
20 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
255 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
256 |
15 |
public java.lang.Object getValue(java.lang.Object object)... |
257 |
|
throws IllegalStateException |
258 |
|
{ |
259 |
15 |
Colour target = (Colour) object; |
260 |
15 |
return target.getThreshType(); |
261 |
|
} |
262 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
263 |
4 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
264 |
|
throws IllegalStateException, IllegalArgumentException |
265 |
|
{ |
266 |
4 |
try |
267 |
|
{ |
268 |
4 |
Colour target = (Colour) object; |
269 |
4 |
target.setThreshType( |
270 |
|
(jalview.schemabinding.version2.types.ColourThreshTypeType) value); |
271 |
|
} catch (java.lang.Exception ex) |
272 |
|
{ |
273 |
0 |
throw new IllegalStateException(ex.toString()); |
274 |
|
} |
275 |
|
} |
276 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
277 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
278 |
|
{ |
279 |
0 |
return null; |
280 |
|
} |
281 |
|
}; |
282 |
20 |
handler = new org.exolab.castor.xml.handlers.EnumFieldHandler( |
283 |
|
jalview.schemabinding.version2.types.ColourThreshTypeType.class, |
284 |
|
handler); |
285 |
20 |
desc.setImmutable(true); |
286 |
20 |
desc.setHandler(handler); |
287 |
20 |
desc.setMultivalued(false); |
288 |
20 |
addFieldDescriptor(desc); |
289 |
|
|
290 |
|
|
291 |
20 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
292 |
|
{ |
293 |
|
} |
294 |
20 |
desc.setValidator(fieldValidator); |
295 |
|
|
296 |
20 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
297 |
|
java.lang.Float.TYPE, "_threshold", "threshold", |
298 |
|
org.exolab.castor.xml.NodeType.Attribute); |
299 |
20 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
300 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
301 |
15 |
public java.lang.Object getValue(java.lang.Object object)... |
302 |
|
throws IllegalStateException |
303 |
|
{ |
304 |
15 |
Colour target = (Colour) object; |
305 |
15 |
if (!target.hasThreshold()) |
306 |
|
{ |
307 |
3 |
return null; |
308 |
|
} |
309 |
12 |
return new java.lang.Float(target.getThreshold()); |
310 |
|
} |
311 |
|
|
|
|
| 55.6% |
Uncovered Elements: 4 (9) |
Complexity: 3 |
Complexity Density: 0.43 |
|
312 |
4 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
313 |
|
throws IllegalStateException, IllegalArgumentException |
314 |
|
{ |
315 |
4 |
try |
316 |
|
{ |
317 |
4 |
Colour target = (Colour) object; |
318 |
|
|
319 |
4 |
if (value == null) |
320 |
|
{ |
321 |
0 |
target.deleteThreshold(); |
322 |
0 |
return; |
323 |
|
} |
324 |
4 |
target.setThreshold(((java.lang.Float) value).floatValue()); |
325 |
|
} catch (java.lang.Exception ex) |
326 |
|
{ |
327 |
0 |
throw new IllegalStateException(ex.toString()); |
328 |
|
} |
329 |
|
} |
330 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
331 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
332 |
|
{ |
333 |
0 |
return null; |
334 |
|
} |
335 |
|
}; |
336 |
20 |
desc.setHandler(handler); |
337 |
20 |
desc.setMultivalued(false); |
338 |
20 |
addFieldDescriptor(desc); |
339 |
|
|
340 |
|
|
341 |
20 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
342 |
|
{ |
343 |
20 |
org.exolab.castor.xml.validators.FloatValidator typeValidator; |
344 |
20 |
typeValidator = new org.exolab.castor.xml.validators.FloatValidator(); |
345 |
20 |
fieldValidator.setValidator(typeValidator); |
346 |
20 |
typeValidator.setMinInclusive((float) -3.4028235E38); |
347 |
20 |
typeValidator.setMaxInclusive((float) 3.4028235E38); |
348 |
|
} |
349 |
20 |
desc.setValidator(fieldValidator); |
350 |
|
|
351 |
20 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
352 |
|
java.lang.Float.TYPE, "_max", "max", |
353 |
|
org.exolab.castor.xml.NodeType.Attribute); |
354 |
20 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
355 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
356 |
15 |
public java.lang.Object getValue(java.lang.Object object)... |
357 |
|
throws IllegalStateException |
358 |
|
{ |
359 |
15 |
Colour target = (Colour) object; |
360 |
15 |
if (!target.hasMax()) |
361 |
|
{ |
362 |
3 |
return null; |
363 |
|
} |
364 |
12 |
return new java.lang.Float(target.getMax()); |
365 |
|
} |
366 |
|
|
|
|
| 55.6% |
Uncovered Elements: 4 (9) |
Complexity: 3 |
Complexity Density: 0.43 |
|
367 |
4 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
368 |
|
throws IllegalStateException, IllegalArgumentException |
369 |
|
{ |
370 |
4 |
try |
371 |
|
{ |
372 |
4 |
Colour target = (Colour) object; |
373 |
|
|
374 |
4 |
if (value == null) |
375 |
|
{ |
376 |
0 |
target.deleteMax(); |
377 |
0 |
return; |
378 |
|
} |
379 |
4 |
target.setMax(((java.lang.Float) value).floatValue()); |
380 |
|
} catch (java.lang.Exception ex) |
381 |
|
{ |
382 |
0 |
throw new IllegalStateException(ex.toString()); |
383 |
|
} |
384 |
|
} |
385 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
386 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
387 |
|
{ |
388 |
0 |
return null; |
389 |
|
} |
390 |
|
}; |
391 |
20 |
desc.setHandler(handler); |
392 |
20 |
desc.setMultivalued(false); |
393 |
20 |
addFieldDescriptor(desc); |
394 |
|
|
395 |
|
|
396 |
20 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
397 |
|
{ |
398 |
20 |
org.exolab.castor.xml.validators.FloatValidator typeValidator; |
399 |
20 |
typeValidator = new org.exolab.castor.xml.validators.FloatValidator(); |
400 |
20 |
fieldValidator.setValidator(typeValidator); |
401 |
20 |
typeValidator.setMinInclusive((float) -3.4028235E38); |
402 |
20 |
typeValidator.setMaxInclusive((float) 3.4028235E38); |
403 |
|
} |
404 |
20 |
desc.setValidator(fieldValidator); |
405 |
|
|
406 |
20 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
407 |
|
java.lang.Float.TYPE, "_min", "min", |
408 |
|
org.exolab.castor.xml.NodeType.Attribute); |
409 |
20 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
410 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
411 |
15 |
public java.lang.Object getValue(java.lang.Object object)... |
412 |
|
throws IllegalStateException |
413 |
|
{ |
414 |
15 |
Colour target = (Colour) object; |
415 |
15 |
if (!target.hasMin()) |
416 |
|
{ |
417 |
3 |
return null; |
418 |
|
} |
419 |
12 |
return new java.lang.Float(target.getMin()); |
420 |
|
} |
421 |
|
|
|
|
| 55.6% |
Uncovered Elements: 4 (9) |
Complexity: 3 |
Complexity Density: 0.43 |
|
422 |
4 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
423 |
|
throws IllegalStateException, IllegalArgumentException |
424 |
|
{ |
425 |
4 |
try |
426 |
|
{ |
427 |
4 |
Colour target = (Colour) object; |
428 |
|
|
429 |
4 |
if (value == null) |
430 |
|
{ |
431 |
0 |
target.deleteMin(); |
432 |
0 |
return; |
433 |
|
} |
434 |
4 |
target.setMin(((java.lang.Float) value).floatValue()); |
435 |
|
} catch (java.lang.Exception ex) |
436 |
|
{ |
437 |
0 |
throw new IllegalStateException(ex.toString()); |
438 |
|
} |
439 |
|
} |
440 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
441 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
442 |
|
{ |
443 |
0 |
return null; |
444 |
|
} |
445 |
|
}; |
446 |
20 |
desc.setHandler(handler); |
447 |
20 |
desc.setMultivalued(false); |
448 |
20 |
addFieldDescriptor(desc); |
449 |
|
|
450 |
|
|
451 |
20 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
452 |
|
{ |
453 |
20 |
org.exolab.castor.xml.validators.FloatValidator typeValidator; |
454 |
20 |
typeValidator = new org.exolab.castor.xml.validators.FloatValidator(); |
455 |
20 |
fieldValidator.setValidator(typeValidator); |
456 |
20 |
typeValidator.setMinInclusive((float) -3.4028235E38); |
457 |
20 |
typeValidator.setMaxInclusive((float) 3.4028235E38); |
458 |
|
} |
459 |
20 |
desc.setValidator(fieldValidator); |
460 |
|
|
461 |
20 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
462 |
|
java.lang.Boolean.TYPE, "_colourByLabel", "colourByLabel", |
463 |
|
org.exolab.castor.xml.NodeType.Attribute); |
464 |
20 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
465 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 3 |
Complexity Density: 0.75 |
|
466 |
15 |
public java.lang.Object getValue(java.lang.Object object)... |
467 |
|
throws IllegalStateException |
468 |
|
{ |
469 |
15 |
Colour target = (Colour) object; |
470 |
15 |
if (!target.hasColourByLabel()) |
471 |
|
{ |
472 |
3 |
return null; |
473 |
|
} |
474 |
12 |
return (target.getColourByLabel() ? java.lang.Boolean.TRUE |
475 |
|
: java.lang.Boolean.FALSE); |
476 |
|
} |
477 |
|
|
|
|
| 55.6% |
Uncovered Elements: 4 (9) |
Complexity: 3 |
Complexity Density: 0.43 |
|
478 |
4 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
479 |
|
throws IllegalStateException, IllegalArgumentException |
480 |
|
{ |
481 |
4 |
try |
482 |
|
{ |
483 |
4 |
Colour target = (Colour) object; |
484 |
|
|
485 |
4 |
if (value == null) |
486 |
|
{ |
487 |
0 |
target.deleteColourByLabel(); |
488 |
0 |
return; |
489 |
|
} |
490 |
4 |
target.setColourByLabel( |
491 |
|
((java.lang.Boolean) value).booleanValue()); |
492 |
|
} catch (java.lang.Exception ex) |
493 |
|
{ |
494 |
0 |
throw new IllegalStateException(ex.toString()); |
495 |
|
} |
496 |
|
} |
497 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
498 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
499 |
|
{ |
500 |
0 |
return null; |
501 |
|
} |
502 |
|
}; |
503 |
20 |
desc.setHandler(handler); |
504 |
20 |
desc.setMultivalued(false); |
505 |
20 |
addFieldDescriptor(desc); |
506 |
|
|
507 |
|
|
508 |
20 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
509 |
|
{ |
510 |
20 |
org.exolab.castor.xml.validators.BooleanValidator typeValidator; |
511 |
20 |
typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); |
512 |
20 |
fieldValidator.setValidator(typeValidator); |
513 |
|
} |
514 |
20 |
desc.setValidator(fieldValidator); |
515 |
|
|
516 |
20 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
517 |
|
java.lang.Boolean.TYPE, "_autoScale", "autoScale", |
518 |
|
org.exolab.castor.xml.NodeType.Attribute); |
519 |
20 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
520 |
|
{ |
|
|
| 87.5% |
Uncovered Elements: 1 (8) |
Complexity: 3 |
Complexity Density: 0.75 |
|
521 |
15 |
public java.lang.Object getValue(java.lang.Object object)... |
522 |
|
throws IllegalStateException |
523 |
|
{ |
524 |
15 |
Colour target = (Colour) object; |
525 |
15 |
if (!target.hasAutoScale()) |
526 |
|
{ |
527 |
3 |
return null; |
528 |
|
} |
529 |
12 |
return (target.getAutoScale() ? java.lang.Boolean.TRUE |
530 |
|
: java.lang.Boolean.FALSE); |
531 |
|
} |
532 |
|
|
|
|
| 55.6% |
Uncovered Elements: 4 (9) |
Complexity: 3 |
Complexity Density: 0.43 |
|
533 |
4 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
534 |
|
throws IllegalStateException, IllegalArgumentException |
535 |
|
{ |
536 |
4 |
try |
537 |
|
{ |
538 |
4 |
Colour target = (Colour) object; |
539 |
|
|
540 |
4 |
if (value == null) |
541 |
|
{ |
542 |
0 |
target.deleteAutoScale(); |
543 |
0 |
return; |
544 |
|
} |
545 |
4 |
target.setAutoScale(((java.lang.Boolean) value).booleanValue()); |
546 |
|
} catch (java.lang.Exception ex) |
547 |
|
{ |
548 |
0 |
throw new IllegalStateException(ex.toString()); |
549 |
|
} |
550 |
|
} |
551 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
552 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
553 |
|
{ |
554 |
0 |
return null; |
555 |
|
} |
556 |
|
}; |
557 |
20 |
desc.setHandler(handler); |
558 |
20 |
desc.setMultivalued(false); |
559 |
20 |
addFieldDescriptor(desc); |
560 |
|
|
561 |
|
|
562 |
20 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
563 |
|
{ |
564 |
20 |
org.exolab.castor.xml.validators.BooleanValidator typeValidator; |
565 |
20 |
typeValidator = new org.exolab.castor.xml.validators.BooleanValidator(); |
566 |
20 |
fieldValidator.setValidator(typeValidator); |
567 |
|
} |
568 |
20 |
desc.setValidator(fieldValidator); |
569 |
|
|
570 |
|
|
571 |
|
|
572 |
20 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
573 |
|
java.lang.String.class, "_attributeNameList", "attributeName", |
574 |
|
org.exolab.castor.xml.NodeType.Element); |
575 |
20 |
desc.setImmutable(true); |
576 |
20 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
577 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
578 |
15 |
public java.lang.Object getValue(java.lang.Object object)... |
579 |
|
throws IllegalStateException |
580 |
|
{ |
581 |
15 |
Colour target = (Colour) object; |
582 |
15 |
return target.getAttributeName(); |
583 |
|
} |
584 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
585 |
3 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
586 |
|
throws IllegalStateException, IllegalArgumentException |
587 |
|
{ |
588 |
3 |
try |
589 |
|
{ |
590 |
3 |
Colour target = (Colour) object; |
591 |
3 |
target.addAttributeName((java.lang.String) value); |
592 |
|
} catch (java.lang.Exception ex) |
593 |
|
{ |
594 |
0 |
throw new IllegalStateException(ex.toString()); |
595 |
|
} |
596 |
|
} |
597 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
598 |
0 |
public void resetValue(Object object)... |
599 |
|
throws IllegalStateException, IllegalArgumentException |
600 |
|
{ |
601 |
0 |
try |
602 |
|
{ |
603 |
0 |
Colour target = (Colour) object; |
604 |
0 |
target.removeAllAttributeName(); |
605 |
|
} catch (java.lang.Exception ex) |
606 |
|
{ |
607 |
0 |
throw new IllegalStateException(ex.toString()); |
608 |
|
} |
609 |
|
} |
610 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
611 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
612 |
|
{ |
613 |
0 |
return null; |
614 |
|
} |
615 |
|
}; |
616 |
20 |
desc.setHandler(handler); |
617 |
20 |
desc.setMultivalued(true); |
618 |
20 |
addFieldDescriptor(desc); |
619 |
|
|
620 |
|
|
621 |
20 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
622 |
20 |
fieldValidator.setMinOccurs(0); |
623 |
20 |
fieldValidator.setMaxOccurs(2); |
624 |
|
{ |
625 |
20 |
org.exolab.castor.xml.validators.StringValidator typeValidator; |
626 |
20 |
typeValidator = new org.exolab.castor.xml.validators.StringValidator(); |
627 |
20 |
fieldValidator.setValidator(typeValidator); |
628 |
20 |
typeValidator.setWhiteSpace("preserve"); |
629 |
|
} |
630 |
20 |
desc.setValidator(fieldValidator); |
631 |
|
} |
632 |
|
|
633 |
|
|
634 |
|
|
635 |
|
|
636 |
|
|
637 |
|
|
638 |
|
|
639 |
|
|
640 |
|
@return |
641 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
642 |
0 |
public org.exolab.castor.mapping.AccessMode getAccessMode()... |
643 |
|
{ |
644 |
0 |
return null; |
645 |
|
} |
646 |
|
|
647 |
|
|
648 |
|
|
649 |
|
|
650 |
|
@return |
651 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
652 |
53 |
public org.exolab.castor.mapping.FieldDescriptor getIdentity()... |
653 |
|
{ |
654 |
53 |
return super.getIdentity(); |
655 |
|
} |
656 |
|
|
657 |
|
|
658 |
|
|
659 |
|
|
660 |
|
@return |
661 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
662 |
15 |
public java.lang.Class getJavaClass()... |
663 |
|
{ |
664 |
15 |
return jalview.schemabinding.version2.Colour.class; |
665 |
|
} |
666 |
|
|
667 |
|
|
668 |
|
|
669 |
|
|
670 |
|
@return |
671 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
672 |
5 |
public java.lang.String getNameSpacePrefix()... |
673 |
|
{ |
674 |
5 |
return _nsPrefix; |
675 |
|
} |
676 |
|
|
677 |
|
|
678 |
|
|
679 |
|
|
680 |
|
@return |
681 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
682 |
5 |
public java.lang.String getNameSpaceURI()... |
683 |
|
{ |
684 |
5 |
return _nsURI; |
685 |
|
} |
686 |
|
|
687 |
|
|
688 |
|
|
689 |
|
|
690 |
|
@return |
691 |
|
|
692 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
693 |
10 |
public org.exolab.castor.xml.TypeValidator getValidator()... |
694 |
|
{ |
695 |
10 |
return this; |
696 |
|
} |
697 |
|
|
698 |
|
|
699 |
|
|
700 |
|
|
701 |
|
@return |
702 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
703 |
40 |
public java.lang.String getXMLName()... |
704 |
|
{ |
705 |
40 |
return _xmlName; |
706 |
|
} |
707 |
|
|
708 |
|
|
709 |
|
|
710 |
|
|
711 |
|
@return |
712 |
|
|
713 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
714 |
0 |
public boolean isElementDefinition()... |
715 |
|
{ |
716 |
0 |
return _elementDefinition; |
717 |
|
} |
718 |
|
|
719 |
|
} |