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