1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
package jalview.schemabinding.version2.descriptors; |
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
import jalview.schemabinding.version2.AnnotationElement; |
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
@version |
20 |
|
|
|
|
| 82.1% |
Uncovered Elements: 34 (190) |
Complexity: 39 |
Complexity Density: 0.26 |
|
21 |
|
public class AnnotationElementDescriptor 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 (87) |
Complexity: 1 |
Complexity Density: 0.01 |
|
53 |
128689 |
public AnnotationElementDescriptor()... |
54 |
|
{ |
55 |
128689 |
super(); |
56 |
128689 |
_nsURI = "www.vamsas.ac.uk/jalview/version2"; |
57 |
128689 |
_xmlName = "annotationElement"; |
58 |
128689 |
_elementDefinition = true; |
59 |
|
|
60 |
|
|
61 |
128689 |
setCompositorAsSequence(); |
62 |
128689 |
org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; |
63 |
128689 |
org.exolab.castor.mapping.FieldHandler handler = null; |
64 |
128689 |
org.exolab.castor.xml.FieldValidator fieldValidator = null; |
65 |
|
|
66 |
|
|
67 |
|
|
68 |
128689 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
69 |
|
java.lang.Integer.TYPE, "_position", "position", |
70 |
|
org.exolab.castor.xml.NodeType.Attribute); |
71 |
128689 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
72 |
|
{ |
|
|
| 66.7% |
Uncovered Elements: 2 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
73 |
66326 |
public java.lang.Object getValue(java.lang.Object object)... |
74 |
|
throws IllegalStateException |
75 |
|
{ |
76 |
66326 |
AnnotationElement target = (AnnotationElement) object; |
77 |
66326 |
if (!target.hasPosition()) |
78 |
|
{ |
79 |
0 |
return null; |
80 |
|
} |
81 |
66326 |
return new java.lang.Integer(target.getPosition()); |
82 |
|
} |
83 |
|
|
|
|
| 62.5% |
Uncovered Elements: 3 (8) |
Complexity: 3 |
Complexity Density: 0.5 |
|
84 |
62363 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
85 |
|
throws IllegalStateException, IllegalArgumentException |
86 |
|
{ |
87 |
62363 |
try |
88 |
|
{ |
89 |
62363 |
AnnotationElement target = (AnnotationElement) object; |
90 |
|
|
91 |
62363 |
if (value == null) |
92 |
|
{ |
93 |
0 |
return; |
94 |
|
} |
95 |
|
|
96 |
62363 |
target.setPosition(((java.lang.Integer) value).intValue()); |
97 |
|
} catch (java.lang.Exception ex) |
98 |
|
{ |
99 |
0 |
throw new IllegalStateException(ex.toString()); |
100 |
|
} |
101 |
|
} |
102 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
103 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
104 |
|
{ |
105 |
0 |
return null; |
106 |
|
} |
107 |
|
}; |
108 |
128689 |
desc.setHandler(handler); |
109 |
128689 |
desc.setRequired(true); |
110 |
128689 |
desc.setMultivalued(false); |
111 |
128689 |
addFieldDescriptor(desc); |
112 |
|
|
113 |
|
|
114 |
128689 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
115 |
128689 |
fieldValidator.setMinOccurs(1); |
116 |
|
{ |
117 |
128689 |
org.exolab.castor.xml.validators.IntValidator typeValidator; |
118 |
128689 |
typeValidator = new org.exolab.castor.xml.validators.IntValidator(); |
119 |
128689 |
fieldValidator.setValidator(typeValidator); |
120 |
128689 |
typeValidator.setMinInclusive(-2147483648); |
121 |
128689 |
typeValidator.setMaxInclusive(2147483647); |
122 |
|
} |
123 |
128689 |
desc.setValidator(fieldValidator); |
124 |
|
|
125 |
128689 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
126 |
|
java.lang.Integer.TYPE, "_colour", "colour", |
127 |
|
org.exolab.castor.xml.NodeType.Attribute); |
128 |
128689 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
129 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
130 |
66326 |
public java.lang.Object getValue(java.lang.Object object)... |
131 |
|
throws IllegalStateException |
132 |
|
{ |
133 |
66326 |
AnnotationElement target = (AnnotationElement) object; |
134 |
66326 |
if (!target.hasColour()) |
135 |
|
{ |
136 |
33686 |
return null; |
137 |
|
} |
138 |
32640 |
return new java.lang.Integer(target.getColour()); |
139 |
|
} |
140 |
|
|
|
|
| 55.6% |
Uncovered Elements: 4 (9) |
Complexity: 3 |
Complexity Density: 0.43 |
|
141 |
33730 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
142 |
|
throws IllegalStateException, IllegalArgumentException |
143 |
|
{ |
144 |
33730 |
try |
145 |
|
{ |
146 |
33730 |
AnnotationElement target = (AnnotationElement) object; |
147 |
|
|
148 |
33730 |
if (value == null) |
149 |
|
{ |
150 |
0 |
target.deleteColour(); |
151 |
0 |
return; |
152 |
|
} |
153 |
33730 |
target.setColour(((java.lang.Integer) value).intValue()); |
154 |
|
} catch (java.lang.Exception ex) |
155 |
|
{ |
156 |
0 |
throw new IllegalStateException(ex.toString()); |
157 |
|
} |
158 |
|
} |
159 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
160 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
161 |
|
{ |
162 |
0 |
return null; |
163 |
|
} |
164 |
|
}; |
165 |
128689 |
desc.setHandler(handler); |
166 |
128689 |
desc.setMultivalued(false); |
167 |
128689 |
addFieldDescriptor(desc); |
168 |
|
|
169 |
|
|
170 |
128689 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
171 |
|
{ |
172 |
128689 |
org.exolab.castor.xml.validators.IntValidator typeValidator; |
173 |
128689 |
typeValidator = new org.exolab.castor.xml.validators.IntValidator(); |
174 |
128689 |
fieldValidator.setValidator(typeValidator); |
175 |
128689 |
typeValidator.setMinInclusive(-2147483648); |
176 |
128689 |
typeValidator.setMaxInclusive(2147483647); |
177 |
|
} |
178 |
128689 |
desc.setValidator(fieldValidator); |
179 |
|
|
180 |
|
|
181 |
|
|
182 |
128689 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
183 |
|
java.lang.String.class, "_displayCharacter", |
184 |
|
"displayCharacter", org.exolab.castor.xml.NodeType.Element); |
185 |
128689 |
desc.setImmutable(true); |
186 |
128689 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
187 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
188 |
66326 |
public java.lang.Object getValue(java.lang.Object object)... |
189 |
|
throws IllegalStateException |
190 |
|
{ |
191 |
66326 |
AnnotationElement target = (AnnotationElement) object; |
192 |
66326 |
return target.getDisplayCharacter(); |
193 |
|
} |
194 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
195 |
58866 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
196 |
|
throws IllegalStateException, IllegalArgumentException |
197 |
|
{ |
198 |
58866 |
try |
199 |
|
{ |
200 |
58866 |
AnnotationElement target = (AnnotationElement) object; |
201 |
58866 |
target.setDisplayCharacter((java.lang.String) value); |
202 |
|
} catch (java.lang.Exception ex) |
203 |
|
{ |
204 |
0 |
throw new IllegalStateException(ex.toString()); |
205 |
|
} |
206 |
|
} |
207 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
208 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
209 |
|
{ |
210 |
0 |
return null; |
211 |
|
} |
212 |
|
}; |
213 |
128689 |
desc.setHandler(handler); |
214 |
128689 |
desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); |
215 |
128689 |
desc.setMultivalued(false); |
216 |
128689 |
addFieldDescriptor(desc); |
217 |
|
|
218 |
|
|
219 |
128689 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
220 |
|
{ |
221 |
128689 |
org.exolab.castor.xml.validators.StringValidator typeValidator; |
222 |
128689 |
typeValidator = new org.exolab.castor.xml.validators.StringValidator(); |
223 |
128689 |
fieldValidator.setValidator(typeValidator); |
224 |
128689 |
typeValidator.setWhiteSpace("preserve"); |
225 |
|
} |
226 |
128689 |
desc.setValidator(fieldValidator); |
227 |
|
|
228 |
128689 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
229 |
|
java.lang.String.class, "_description", "description", |
230 |
|
org.exolab.castor.xml.NodeType.Element); |
231 |
128689 |
desc.setImmutable(true); |
232 |
128689 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
233 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
234 |
66326 |
public java.lang.Object getValue(java.lang.Object object)... |
235 |
|
throws IllegalStateException |
236 |
|
{ |
237 |
66326 |
AnnotationElement target = (AnnotationElement) object; |
238 |
66326 |
return target.getDescription(); |
239 |
|
} |
240 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
241 |
56334 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
242 |
|
throws IllegalStateException, IllegalArgumentException |
243 |
|
{ |
244 |
56334 |
try |
245 |
|
{ |
246 |
56334 |
AnnotationElement target = (AnnotationElement) object; |
247 |
56334 |
target.setDescription((java.lang.String) value); |
248 |
|
} catch (java.lang.Exception ex) |
249 |
|
{ |
250 |
0 |
throw new IllegalStateException(ex.toString()); |
251 |
|
} |
252 |
|
} |
253 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
254 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
255 |
|
{ |
256 |
0 |
return null; |
257 |
|
} |
258 |
|
}; |
259 |
128689 |
desc.setHandler(handler); |
260 |
128689 |
desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); |
261 |
128689 |
desc.setMultivalued(false); |
262 |
128689 |
addFieldDescriptor(desc); |
263 |
|
|
264 |
|
|
265 |
128689 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
266 |
|
{ |
267 |
128689 |
org.exolab.castor.xml.validators.StringValidator typeValidator; |
268 |
128689 |
typeValidator = new org.exolab.castor.xml.validators.StringValidator(); |
269 |
128689 |
fieldValidator.setValidator(typeValidator); |
270 |
128689 |
typeValidator.setWhiteSpace("preserve"); |
271 |
|
} |
272 |
128689 |
desc.setValidator(fieldValidator); |
273 |
|
|
274 |
128689 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
275 |
|
java.lang.String.class, "_secondaryStructure", |
276 |
|
"secondaryStructure", org.exolab.castor.xml.NodeType.Element); |
277 |
128689 |
desc.setImmutable(true); |
278 |
128689 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
279 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
280 |
66326 |
public java.lang.Object getValue(java.lang.Object object)... |
281 |
|
throws IllegalStateException |
282 |
|
{ |
283 |
66326 |
AnnotationElement target = (AnnotationElement) object; |
284 |
66326 |
return target.getSecondaryStructure(); |
285 |
|
} |
286 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
287 |
6788 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
288 |
|
throws IllegalStateException, IllegalArgumentException |
289 |
|
{ |
290 |
6788 |
try |
291 |
|
{ |
292 |
6788 |
AnnotationElement target = (AnnotationElement) object; |
293 |
6788 |
target.setSecondaryStructure((java.lang.String) value); |
294 |
|
} catch (java.lang.Exception ex) |
295 |
|
{ |
296 |
0 |
throw new IllegalStateException(ex.toString()); |
297 |
|
} |
298 |
|
} |
299 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
300 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
301 |
|
{ |
302 |
0 |
return null; |
303 |
|
} |
304 |
|
}; |
305 |
128689 |
desc.setHandler(handler); |
306 |
128689 |
desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); |
307 |
128689 |
desc.setMultivalued(false); |
308 |
128689 |
addFieldDescriptor(desc); |
309 |
|
|
310 |
|
|
311 |
128689 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
312 |
|
{ |
313 |
128689 |
org.exolab.castor.xml.validators.StringValidator typeValidator; |
314 |
128689 |
typeValidator = new org.exolab.castor.xml.validators.StringValidator(); |
315 |
128689 |
fieldValidator.setValidator(typeValidator); |
316 |
128689 |
typeValidator.setWhiteSpace("preserve"); |
317 |
128689 |
typeValidator.setLength(1); |
318 |
|
} |
319 |
128689 |
desc.setValidator(fieldValidator); |
320 |
|
|
321 |
128689 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
322 |
|
java.lang.Float.TYPE, "_value", "value", |
323 |
|
org.exolab.castor.xml.NodeType.Element); |
324 |
128689 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
325 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
326 |
66326 |
public java.lang.Object getValue(java.lang.Object object)... |
327 |
|
throws IllegalStateException |
328 |
|
{ |
329 |
66326 |
AnnotationElement target = (AnnotationElement) object; |
330 |
66326 |
if (!target.hasValue()) |
331 |
|
{ |
332 |
2736 |
return null; |
333 |
|
} |
334 |
63590 |
return new java.lang.Float(target.getValue()); |
335 |
|
} |
336 |
|
|
|
|
| 55.6% |
Uncovered Elements: 4 (9) |
Complexity: 3 |
Complexity Density: 0.43 |
|
337 |
60845 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
338 |
|
throws IllegalStateException, IllegalArgumentException |
339 |
|
{ |
340 |
60845 |
try |
341 |
|
{ |
342 |
60845 |
AnnotationElement target = (AnnotationElement) object; |
343 |
|
|
344 |
60845 |
if (value == null) |
345 |
|
{ |
346 |
0 |
target.deleteValue(); |
347 |
0 |
return; |
348 |
|
} |
349 |
60845 |
target.setValue(((java.lang.Float) value).floatValue()); |
350 |
|
} catch (java.lang.Exception ex) |
351 |
|
{ |
352 |
0 |
throw new IllegalStateException(ex.toString()); |
353 |
|
} |
354 |
|
} |
355 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
356 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
357 |
|
{ |
358 |
0 |
return null; |
359 |
|
} |
360 |
|
}; |
361 |
128689 |
desc.setHandler(handler); |
362 |
128689 |
desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); |
363 |
128689 |
desc.setMultivalued(false); |
364 |
128689 |
addFieldDescriptor(desc); |
365 |
|
|
366 |
|
|
367 |
128689 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
368 |
|
{ |
369 |
128689 |
org.exolab.castor.xml.validators.FloatValidator typeValidator; |
370 |
128689 |
typeValidator = new org.exolab.castor.xml.validators.FloatValidator(); |
371 |
128689 |
fieldValidator.setValidator(typeValidator); |
372 |
128689 |
typeValidator.setMinInclusive((float) -3.4028235E38); |
373 |
128689 |
typeValidator.setMaxInclusive((float) 3.4028235E38); |
374 |
|
} |
375 |
128689 |
desc.setValidator(fieldValidator); |
376 |
|
} |
377 |
|
|
378 |
|
|
379 |
|
|
380 |
|
|
381 |
|
|
382 |
|
|
383 |
|
|
384 |
|
|
385 |
|
@return |
386 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
387 |
0 |
public org.exolab.castor.mapping.AccessMode getAccessMode()... |
388 |
|
{ |
389 |
0 |
return null; |
390 |
|
} |
391 |
|
|
392 |
|
|
393 |
|
|
394 |
|
|
395 |
|
@return |
396 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
397 |
312089 |
public org.exolab.castor.mapping.FieldDescriptor getIdentity()... |
398 |
|
{ |
399 |
312089 |
return super.getIdentity(); |
400 |
|
} |
401 |
|
|
402 |
|
|
403 |
|
|
404 |
|
|
405 |
|
@return |
406 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
407 |
95526 |
public java.lang.Class getJavaClass()... |
408 |
|
{ |
409 |
95526 |
return jalview.schemabinding.version2.AnnotationElement.class; |
410 |
|
} |
411 |
|
|
412 |
|
|
413 |
|
|
414 |
|
|
415 |
|
@return |
416 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
417 |
33163 |
public java.lang.String getNameSpacePrefix()... |
418 |
|
{ |
419 |
33163 |
return _nsPrefix; |
420 |
|
} |
421 |
|
|
422 |
|
|
423 |
|
|
424 |
|
|
425 |
|
@return |
426 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
427 |
0 |
public java.lang.String getNameSpaceURI()... |
428 |
|
{ |
429 |
0 |
return _nsURI; |
430 |
|
} |
431 |
|
|
432 |
|
|
433 |
|
|
434 |
|
|
435 |
|
@return |
436 |
|
|
437 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
438 |
33163 |
public org.exolab.castor.xml.TypeValidator getValidator()... |
439 |
|
{ |
440 |
33163 |
return this; |
441 |
|
} |
442 |
|
|
443 |
|
|
444 |
|
|
445 |
|
|
446 |
|
@return |
447 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
448 |
257378 |
public java.lang.String getXMLName()... |
449 |
|
{ |
450 |
257378 |
return _xmlName; |
451 |
|
} |
452 |
|
|
453 |
|
|
454 |
|
|
455 |
|
|
456 |
|
@return |
457 |
|
|
458 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
459 |
0 |
public boolean isElementDefinition()... |
460 |
|
{ |
461 |
0 |
return _elementDefinition; |
462 |
|
} |
463 |
|
|
464 |
|
} |