1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
package jalview.schemabinding.version2.descriptors; |
9 |
|
|
10 |
|
import jalview.schemabinding.version2.Colour; |
11 |
|
import jalview.schemabinding.version2.Filter; |
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
import jalview.schemabinding.version2.JalviewUserColours; |
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
@version |
23 |
|
|
|
|
| 77.4% |
Uncovered Elements: 26 (115) |
Complexity: 29 |
Complexity Density: 0.32 |
|
24 |
|
public class JalviewUserColoursDescriptor |
25 |
|
extends org.exolab.castor.xml.util.XMLClassDescriptorImpl |
26 |
|
{ |
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
private boolean _elementDefinition; |
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
private java.lang.String _nsPrefix; |
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
private java.lang.String _nsURI; |
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
private java.lang.String _xmlName; |
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (48) |
Complexity: 1 |
Complexity Density: 0.02 |
|
56 |
4 |
public JalviewUserColoursDescriptor()... |
57 |
|
{ |
58 |
4 |
super(); |
59 |
4 |
_nsURI = "www.jalview.org/colours"; |
60 |
4 |
_xmlName = "JalviewUserColours"; |
61 |
4 |
_elementDefinition = false; |
62 |
|
|
63 |
|
|
64 |
4 |
setCompositorAsSequence(); |
65 |
4 |
org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; |
66 |
4 |
org.exolab.castor.mapping.FieldHandler handler = null; |
67 |
4 |
org.exolab.castor.xml.FieldValidator fieldValidator = null; |
68 |
|
|
69 |
|
|
70 |
|
|
71 |
4 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
72 |
|
java.lang.String.class, "_schemeName", "schemeName", |
73 |
|
org.exolab.castor.xml.NodeType.Attribute); |
74 |
4 |
desc.setImmutable(true); |
75 |
4 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
76 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
77 |
3 |
@Override... |
78 |
|
public java.lang.Object getValue(java.lang.Object object) |
79 |
|
throws IllegalStateException |
80 |
|
{ |
81 |
3 |
JalviewUserColours target = (JalviewUserColours) object; |
82 |
3 |
return target.getSchemeName(); |
83 |
|
} |
84 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
85 |
1 |
@Override... |
86 |
|
public void setValue(java.lang.Object object, java.lang.Object value) |
87 |
|
throws IllegalStateException, IllegalArgumentException |
88 |
|
{ |
89 |
1 |
try |
90 |
|
{ |
91 |
1 |
JalviewUserColours target = (JalviewUserColours) object; |
92 |
1 |
target.setSchemeName((java.lang.String) value); |
93 |
|
} catch (java.lang.Exception ex) |
94 |
|
{ |
95 |
0 |
throw new IllegalStateException(ex.toString()); |
96 |
|
} |
97 |
|
} |
98 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
99 |
0 |
@Override... |
100 |
|
public java.lang.Object newInstance(java.lang.Object parent) |
101 |
|
{ |
102 |
0 |
return null; |
103 |
|
} |
104 |
|
}; |
105 |
4 |
desc.setHandler(handler); |
106 |
4 |
desc.setMultivalued(false); |
107 |
4 |
addFieldDescriptor(desc); |
108 |
|
|
109 |
|
|
110 |
4 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
111 |
|
{ |
112 |
4 |
org.exolab.castor.xml.validators.StringValidator typeValidator; |
113 |
4 |
typeValidator = new org.exolab.castor.xml.validators.StringValidator(); |
114 |
4 |
fieldValidator.setValidator(typeValidator); |
115 |
4 |
typeValidator.setWhiteSpace("preserve"); |
116 |
|
} |
117 |
4 |
desc.setValidator(fieldValidator); |
118 |
|
|
119 |
|
|
120 |
|
|
121 |
4 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
122 |
|
java.lang.String.class, "_version", "Version", |
123 |
|
org.exolab.castor.xml.NodeType.Element); |
124 |
4 |
desc.setImmutable(true); |
125 |
4 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
126 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
127 |
3 |
@Override... |
128 |
|
public java.lang.Object getValue(java.lang.Object object) |
129 |
|
throws IllegalStateException |
130 |
|
{ |
131 |
3 |
JalviewUserColours target = (JalviewUserColours) object; |
132 |
3 |
return target.getVersion(); |
133 |
|
} |
134 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
135 |
0 |
@Override... |
136 |
|
public void setValue(java.lang.Object object, java.lang.Object value) |
137 |
|
throws IllegalStateException, IllegalArgumentException |
138 |
|
{ |
139 |
0 |
try |
140 |
|
{ |
141 |
0 |
JalviewUserColours target = (JalviewUserColours) object; |
142 |
0 |
target.setVersion((java.lang.String) value); |
143 |
|
} catch (java.lang.Exception ex) |
144 |
|
{ |
145 |
0 |
throw new IllegalStateException(ex.toString()); |
146 |
|
} |
147 |
|
} |
148 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
149 |
0 |
@Override... |
150 |
|
public java.lang.Object newInstance(java.lang.Object parent) |
151 |
|
{ |
152 |
0 |
return null; |
153 |
|
} |
154 |
|
}; |
155 |
4 |
desc.setHandler(handler); |
156 |
4 |
desc.setMultivalued(false); |
157 |
4 |
addFieldDescriptor(desc); |
158 |
|
|
159 |
|
|
160 |
4 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
161 |
|
{ |
162 |
4 |
org.exolab.castor.xml.validators.StringValidator typeValidator; |
163 |
4 |
typeValidator = new org.exolab.castor.xml.validators.StringValidator(); |
164 |
4 |
fieldValidator.setValidator(typeValidator); |
165 |
4 |
typeValidator.setWhiteSpace("preserve"); |
166 |
|
} |
167 |
4 |
desc.setValidator(fieldValidator); |
168 |
|
|
169 |
4 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
170 |
|
Colour.class, "_colourList", "colour", |
171 |
|
org.exolab.castor.xml.NodeType.Element); |
172 |
4 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
173 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
174 |
3 |
@Override... |
175 |
|
public java.lang.Object getValue(java.lang.Object object) |
176 |
|
throws IllegalStateException |
177 |
|
{ |
178 |
3 |
JalviewUserColours target = (JalviewUserColours) object; |
179 |
3 |
return target.getColour(); |
180 |
|
} |
181 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
182 |
5 |
@Override... |
183 |
|
public void setValue(java.lang.Object object, java.lang.Object value) |
184 |
|
throws IllegalStateException, IllegalArgumentException |
185 |
|
{ |
186 |
5 |
try |
187 |
|
{ |
188 |
5 |
JalviewUserColours target = (JalviewUserColours) object; |
189 |
5 |
target.addColour((Colour) value); |
190 |
|
} catch (java.lang.Exception ex) |
191 |
|
{ |
192 |
0 |
throw new IllegalStateException(ex.toString()); |
193 |
|
} |
194 |
|
} |
195 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
196 |
0 |
@Override... |
197 |
|
public void resetValue(Object object) |
198 |
|
throws IllegalStateException, IllegalArgumentException |
199 |
|
{ |
200 |
0 |
try |
201 |
|
{ |
202 |
0 |
JalviewUserColours target = (JalviewUserColours) object; |
203 |
0 |
target.removeAllColour(); |
204 |
|
} catch (java.lang.Exception ex) |
205 |
|
{ |
206 |
0 |
throw new IllegalStateException(ex.toString()); |
207 |
|
} |
208 |
|
} |
209 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
210 |
5 |
@Override... |
211 |
|
public java.lang.Object newInstance(java.lang.Object parent) |
212 |
|
{ |
213 |
5 |
return new Colour(); |
214 |
|
} |
215 |
|
}; |
216 |
4 |
desc.setHandler(handler); |
217 |
4 |
desc.setMultivalued(true); |
218 |
4 |
addFieldDescriptor(desc); |
219 |
|
|
220 |
|
|
221 |
4 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
222 |
4 |
fieldValidator.setMinOccurs(0); |
223 |
|
{ |
224 |
|
} |
225 |
4 |
desc.setValidator(fieldValidator); |
226 |
|
|
227 |
4 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
228 |
|
Filter.class, "_filterList", "filter", |
229 |
|
org.exolab.castor.xml.NodeType.Element); |
230 |
4 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
231 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
232 |
3 |
@Override... |
233 |
|
public java.lang.Object getValue(java.lang.Object object) |
234 |
|
throws IllegalStateException |
235 |
|
{ |
236 |
3 |
JalviewUserColours target = (JalviewUserColours) object; |
237 |
3 |
return target.getFilter(); |
238 |
|
} |
239 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
240 |
3 |
@Override... |
241 |
|
public void setValue(java.lang.Object object, java.lang.Object value) |
242 |
|
throws IllegalStateException, IllegalArgumentException |
243 |
|
{ |
244 |
3 |
try |
245 |
|
{ |
246 |
3 |
JalviewUserColours target = (JalviewUserColours) object; |
247 |
3 |
target.addFilter((Filter) value); |
248 |
|
} catch (java.lang.Exception ex) |
249 |
|
{ |
250 |
0 |
throw new IllegalStateException(ex.toString()); |
251 |
|
} |
252 |
|
} |
253 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
254 |
0 |
@Override... |
255 |
|
public void resetValue(Object object) |
256 |
|
throws IllegalStateException, IllegalArgumentException |
257 |
|
{ |
258 |
0 |
try |
259 |
|
{ |
260 |
0 |
JalviewUserColours target = (JalviewUserColours) object; |
261 |
0 |
target.removeAllFilter(); |
262 |
|
} catch (java.lang.Exception ex) |
263 |
|
{ |
264 |
0 |
throw new IllegalStateException(ex.toString()); |
265 |
|
} |
266 |
|
} |
267 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
268 |
3 |
@Override... |
269 |
|
public java.lang.Object newInstance(java.lang.Object parent) |
270 |
|
{ |
271 |
3 |
return new Filter(); |
272 |
|
} |
273 |
|
}; |
274 |
4 |
desc.setHandler(handler); |
275 |
4 |
desc.setMultivalued(true); |
276 |
4 |
addFieldDescriptor(desc); |
277 |
|
|
278 |
|
|
279 |
4 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
280 |
4 |
fieldValidator.setMinOccurs(0); |
281 |
|
{ |
282 |
|
} |
283 |
4 |
desc.setValidator(fieldValidator); |
284 |
|
} |
285 |
|
|
286 |
|
|
287 |
|
|
288 |
|
|
289 |
|
|
290 |
|
|
291 |
|
|
292 |
|
|
293 |
|
@return |
294 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
295 |
0 |
@Override... |
296 |
|
public org.exolab.castor.mapping.AccessMode getAccessMode() |
297 |
|
{ |
298 |
0 |
return null; |
299 |
|
} |
300 |
|
|
301 |
|
|
302 |
|
|
303 |
|
|
304 |
|
@return |
305 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
306 |
3 |
@Override... |
307 |
|
public org.exolab.castor.mapping.FieldDescriptor getIdentity() |
308 |
|
{ |
309 |
3 |
return super.getIdentity(); |
310 |
|
} |
311 |
|
|
312 |
|
|
313 |
|
|
314 |
|
|
315 |
|
@return |
316 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
317 |
2 |
@Override... |
318 |
|
public java.lang.Class getJavaClass() |
319 |
|
{ |
320 |
2 |
return jalview.schemabinding.version2.JalviewUserColours.class; |
321 |
|
} |
322 |
|
|
323 |
|
|
324 |
|
|
325 |
|
|
326 |
|
@return |
327 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
328 |
1 |
@Override... |
329 |
|
public java.lang.String getNameSpacePrefix() |
330 |
|
{ |
331 |
1 |
return _nsPrefix; |
332 |
|
} |
333 |
|
|
334 |
|
|
335 |
|
|
336 |
|
|
337 |
|
@return |
338 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
339 |
1 |
@Override... |
340 |
|
public java.lang.String getNameSpaceURI() |
341 |
|
{ |
342 |
1 |
return _nsURI; |
343 |
|
} |
344 |
|
|
345 |
|
|
346 |
|
|
347 |
|
|
348 |
|
@return |
349 |
|
|
350 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
351 |
2 |
@Override... |
352 |
|
public org.exolab.castor.xml.TypeValidator getValidator() |
353 |
|
{ |
354 |
2 |
return this; |
355 |
|
} |
356 |
|
|
357 |
|
|
358 |
|
|
359 |
|
|
360 |
|
@return |
361 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
362 |
10 |
@Override... |
363 |
|
public java.lang.String getXMLName() |
364 |
|
{ |
365 |
10 |
return _xmlName; |
366 |
|
} |
367 |
|
|
368 |
|
|
369 |
|
|
370 |
|
|
371 |
|
@return |
372 |
|
|
373 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
374 |
0 |
@Override... |
375 |
|
public boolean isElementDefinition() |
376 |
|
{ |
377 |
0 |
return _elementDefinition; |
378 |
|
} |
379 |
|
|
380 |
|
} |