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