1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
package jalview.schemabinding.version2.descriptors; |
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
import jalview.schemabinding.version2.SequenceType; |
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
@version |
20 |
|
|
|
|
| 79.1% |
Uncovered Elements: 24 (115) |
Complexity: 25 |
Complexity Density: 0.27 |
|
21 |
|
public class SequenceTypeDescriptor 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 (58) |
Complexity: 1 |
Complexity Density: 0.02 |
|
53 |
2252 |
public SequenceTypeDescriptor()... |
54 |
|
{ |
55 |
2252 |
super(); |
56 |
2252 |
_nsURI = "www.vamsas.ac.uk/jalview/version2"; |
57 |
2252 |
_xmlName = "SequenceType"; |
58 |
2252 |
_elementDefinition = false; |
59 |
|
|
60 |
|
|
61 |
2252 |
setCompositorAsSequence(); |
62 |
2252 |
org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; |
63 |
2252 |
org.exolab.castor.mapping.FieldHandler handler = null; |
64 |
2252 |
org.exolab.castor.xml.FieldValidator fieldValidator = null; |
65 |
|
|
66 |
|
|
67 |
|
|
68 |
2252 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
69 |
|
java.lang.String.class, "_id", "id", |
70 |
|
org.exolab.castor.xml.NodeType.Attribute); |
71 |
2252 |
desc.setImmutable(true); |
72 |
2252 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
73 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
74 |
644 |
public java.lang.Object getValue(java.lang.Object object)... |
75 |
|
throws IllegalStateException |
76 |
|
{ |
77 |
644 |
SequenceType target = (SequenceType) object; |
78 |
644 |
return target.getId(); |
79 |
|
} |
80 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
81 |
482 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
82 |
|
throws IllegalStateException, IllegalArgumentException |
83 |
|
{ |
84 |
482 |
try |
85 |
|
{ |
86 |
482 |
SequenceType target = (SequenceType) object; |
87 |
482 |
target.setId((java.lang.String) value); |
88 |
|
} catch (java.lang.Exception ex) |
89 |
|
{ |
90 |
0 |
throw new IllegalStateException(ex.toString()); |
91 |
|
} |
92 |
|
} |
93 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
94 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
95 |
|
{ |
96 |
0 |
return null; |
97 |
|
} |
98 |
|
}; |
99 |
2252 |
desc.setHandler(handler); |
100 |
2252 |
desc.setMultivalued(false); |
101 |
2252 |
addFieldDescriptor(desc); |
102 |
|
|
103 |
|
|
104 |
2252 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
105 |
|
{ |
106 |
2252 |
org.exolab.castor.xml.validators.StringValidator typeValidator; |
107 |
2252 |
typeValidator = new org.exolab.castor.xml.validators.StringValidator(); |
108 |
2252 |
fieldValidator.setValidator(typeValidator); |
109 |
2252 |
typeValidator.setWhiteSpace("preserve"); |
110 |
|
} |
111 |
2252 |
desc.setValidator(fieldValidator); |
112 |
|
|
113 |
2252 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
114 |
|
java.lang.String.class, "_description", "description", |
115 |
|
org.exolab.castor.xml.NodeType.Attribute); |
116 |
2252 |
desc.setImmutable(true); |
117 |
2252 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
118 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
119 |
644 |
public java.lang.Object getValue(java.lang.Object object)... |
120 |
|
throws IllegalStateException |
121 |
|
{ |
122 |
644 |
SequenceType target = (SequenceType) object; |
123 |
644 |
return target.getDescription(); |
124 |
|
} |
125 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
126 |
330 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
127 |
|
throws IllegalStateException, IllegalArgumentException |
128 |
|
{ |
129 |
330 |
try |
130 |
|
{ |
131 |
330 |
SequenceType target = (SequenceType) object; |
132 |
330 |
target.setDescription((java.lang.String) value); |
133 |
|
} catch (java.lang.Exception ex) |
134 |
|
{ |
135 |
0 |
throw new IllegalStateException(ex.toString()); |
136 |
|
} |
137 |
|
} |
138 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
139 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
140 |
|
{ |
141 |
0 |
return null; |
142 |
|
} |
143 |
|
}; |
144 |
2252 |
desc.setHandler(handler); |
145 |
2252 |
desc.setMultivalued(false); |
146 |
2252 |
addFieldDescriptor(desc); |
147 |
|
|
148 |
|
|
149 |
2252 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
150 |
|
{ |
151 |
2252 |
org.exolab.castor.xml.validators.StringValidator typeValidator; |
152 |
2252 |
typeValidator = new org.exolab.castor.xml.validators.StringValidator(); |
153 |
2252 |
fieldValidator.setValidator(typeValidator); |
154 |
2252 |
typeValidator.setWhiteSpace("preserve"); |
155 |
|
} |
156 |
2252 |
desc.setValidator(fieldValidator); |
157 |
|
|
158 |
|
|
159 |
|
|
160 |
2252 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
161 |
|
java.lang.String.class, "_sequence", "sequence", |
162 |
|
org.exolab.castor.xml.NodeType.Element); |
163 |
2252 |
desc.setImmutable(true); |
164 |
2252 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
165 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
166 |
644 |
public java.lang.Object getValue(java.lang.Object object)... |
167 |
|
throws IllegalStateException |
168 |
|
{ |
169 |
644 |
SequenceType target = (SequenceType) object; |
170 |
644 |
return target.getSequence(); |
171 |
|
} |
172 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
173 |
482 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
174 |
|
throws IllegalStateException, IllegalArgumentException |
175 |
|
{ |
176 |
482 |
try |
177 |
|
{ |
178 |
482 |
SequenceType target = (SequenceType) object; |
179 |
482 |
target.setSequence((java.lang.String) value); |
180 |
|
} catch (java.lang.Exception ex) |
181 |
|
{ |
182 |
0 |
throw new IllegalStateException(ex.toString()); |
183 |
|
} |
184 |
|
} |
185 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
186 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
187 |
|
{ |
188 |
0 |
return null; |
189 |
|
} |
190 |
|
}; |
191 |
2252 |
desc.setHandler(handler); |
192 |
2252 |
desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); |
193 |
2252 |
desc.setMultivalued(false); |
194 |
2252 |
addFieldDescriptor(desc); |
195 |
|
|
196 |
|
|
197 |
2252 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
198 |
|
{ |
199 |
2252 |
org.exolab.castor.xml.validators.StringValidator typeValidator; |
200 |
2252 |
typeValidator = new org.exolab.castor.xml.validators.StringValidator(); |
201 |
2252 |
fieldValidator.setValidator(typeValidator); |
202 |
2252 |
typeValidator.setWhiteSpace("preserve"); |
203 |
|
} |
204 |
2252 |
desc.setValidator(fieldValidator); |
205 |
|
|
206 |
2252 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl( |
207 |
|
java.lang.String.class, "_name", "name", |
208 |
|
org.exolab.castor.xml.NodeType.Element); |
209 |
2252 |
desc.setImmutable(true); |
210 |
2252 |
handler = new org.exolab.castor.xml.XMLFieldHandler() |
211 |
|
{ |
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
212 |
644 |
public java.lang.Object getValue(java.lang.Object object)... |
213 |
|
throws IllegalStateException |
214 |
|
{ |
215 |
644 |
SequenceType target = (SequenceType) object; |
216 |
644 |
return target.getName(); |
217 |
|
} |
218 |
|
|
|
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
219 |
482 |
public void setValue(java.lang.Object object, java.lang.Object value)... |
220 |
|
throws IllegalStateException, IllegalArgumentException |
221 |
|
{ |
222 |
482 |
try |
223 |
|
{ |
224 |
482 |
SequenceType target = (SequenceType) object; |
225 |
482 |
target.setName((java.lang.String) value); |
226 |
|
} catch (java.lang.Exception ex) |
227 |
|
{ |
228 |
0 |
throw new IllegalStateException(ex.toString()); |
229 |
|
} |
230 |
|
} |
231 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
232 |
0 |
public java.lang.Object newInstance(java.lang.Object parent)... |
233 |
|
{ |
234 |
0 |
return null; |
235 |
|
} |
236 |
|
}; |
237 |
2252 |
desc.setHandler(handler); |
238 |
2252 |
desc.setNameSpaceURI("www.vamsas.ac.uk/jalview/version2"); |
239 |
2252 |
desc.setMultivalued(false); |
240 |
2252 |
addFieldDescriptor(desc); |
241 |
|
|
242 |
|
|
243 |
2252 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
244 |
|
{ |
245 |
2252 |
org.exolab.castor.xml.validators.StringValidator typeValidator; |
246 |
2252 |
typeValidator = new org.exolab.castor.xml.validators.StringValidator(); |
247 |
2252 |
fieldValidator.setValidator(typeValidator); |
248 |
2252 |
typeValidator.setWhiteSpace("preserve"); |
249 |
|
} |
250 |
2252 |
desc.setValidator(fieldValidator); |
251 |
|
} |
252 |
|
|
253 |
|
|
254 |
|
|
255 |
|
|
256 |
|
|
257 |
|
|
258 |
|
|
259 |
|
|
260 |
|
@return |
261 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
262 |
0 |
public org.exolab.castor.mapping.AccessMode getAccessMode()... |
263 |
|
{ |
264 |
0 |
return null; |
265 |
|
} |
266 |
|
|
267 |
|
|
268 |
|
|
269 |
|
|
270 |
|
@return |
271 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
272 |
2902 |
public org.exolab.castor.mapping.FieldDescriptor getIdentity()... |
273 |
|
{ |
274 |
2902 |
return super.getIdentity(); |
275 |
|
} |
276 |
|
|
277 |
|
|
278 |
|
|
279 |
|
|
280 |
|
@return |
281 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
282 |
322 |
public java.lang.Class getJavaClass()... |
283 |
|
{ |
284 |
322 |
return jalview.schemabinding.version2.SequenceType.class; |
285 |
|
} |
286 |
|
|
287 |
|
|
288 |
|
|
289 |
|
|
290 |
|
@return |
291 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
292 |
0 |
public java.lang.String getNameSpacePrefix()... |
293 |
|
{ |
294 |
0 |
return _nsPrefix; |
295 |
|
} |
296 |
|
|
297 |
|
|
298 |
|
|
299 |
|
|
300 |
|
@return |
301 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
302 |
0 |
public java.lang.String getNameSpaceURI()... |
303 |
|
{ |
304 |
0 |
return _nsURI; |
305 |
|
} |
306 |
|
|
307 |
|
|
308 |
|
|
309 |
|
|
310 |
|
@return |
311 |
|
|
312 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
313 |
0 |
public org.exolab.castor.xml.TypeValidator getValidator()... |
314 |
|
{ |
315 |
0 |
return this; |
316 |
|
} |
317 |
|
|
318 |
|
|
319 |
|
|
320 |
|
|
321 |
|
@return |
322 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
323 |
0 |
public java.lang.String getXMLName()... |
324 |
|
{ |
325 |
0 |
return _xmlName; |
326 |
|
} |
327 |
|
|
328 |
|
|
329 |
|
|
330 |
|
|
331 |
|
@return |
332 |
|
|
333 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
334 |
0 |
public boolean isElementDefinition()... |
335 |
|
{ |
336 |
0 |
return _elementDefinition; |
337 |
|
} |
338 |
|
|
339 |
|
} |