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