1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
package jalview.schemabinding.version2; |
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
import org.exolab.castor.xml.Marshaller; |
15 |
|
import org.exolab.castor.xml.Unmarshaller; |
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
@version |
21 |
|
|
|
|
| 37.8% |
Uncovered Elements: 46 (74) |
Complexity: 31 |
Complexity Density: 0.76 |
|
22 |
|
public class FeatureMatcher implements java.io.Serializable |
23 |
|
{ |
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
private jalview.schemabinding.version2.types.FeatureMatcherByType _by; |
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
private java.util.Vector _attributeNameList; |
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
private java.lang.String _condition; |
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
private java.lang.String _value; |
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
53 |
20 |
public FeatureMatcher()... |
54 |
|
{ |
55 |
20 |
super(); |
56 |
20 |
this._attributeNameList = new java.util.Vector(); |
57 |
|
} |
58 |
|
|
59 |
|
|
60 |
|
|
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
@param |
67 |
|
@throws |
68 |
|
|
69 |
|
|
|
|
| 60% |
Uncovered Elements: 2 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
70 |
6 |
public void addAttributeName(final java.lang.String vAttributeName)... |
71 |
|
throws java.lang.IndexOutOfBoundsException |
72 |
|
{ |
73 |
|
|
74 |
6 |
if (this._attributeNameList.size() >= 2) |
75 |
|
{ |
76 |
0 |
throw new IndexOutOfBoundsException( |
77 |
|
"addAttributeName has a maximum of 2"); |
78 |
|
} |
79 |
|
|
80 |
6 |
this._attributeNameList.addElement(vAttributeName); |
81 |
|
} |
82 |
|
|
83 |
|
|
84 |
|
|
85 |
|
|
86 |
|
@param |
87 |
|
@param |
88 |
|
@throws |
89 |
|
|
90 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
91 |
0 |
public void addAttributeName(final int index,... |
92 |
|
final java.lang.String vAttributeName) |
93 |
|
throws java.lang.IndexOutOfBoundsException |
94 |
|
{ |
95 |
|
|
96 |
0 |
if (this._attributeNameList.size() >= 2) |
97 |
|
{ |
98 |
0 |
throw new IndexOutOfBoundsException( |
99 |
|
"addAttributeName has a maximum of 2"); |
100 |
|
} |
101 |
|
|
102 |
0 |
this._attributeNameList.add(index, vAttributeName); |
103 |
|
} |
104 |
|
|
105 |
|
|
106 |
|
|
107 |
|
|
108 |
|
@return |
109 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
110 |
0 |
public java.util.Enumeration enumerateAttributeName()... |
111 |
|
{ |
112 |
0 |
return this._attributeNameList.elements(); |
113 |
|
} |
114 |
|
|
115 |
|
|
116 |
|
|
117 |
|
|
118 |
|
@param |
119 |
|
@throws |
120 |
|
|
121 |
|
@return |
122 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 3 |
Complexity Density: 1 |
|
123 |
0 |
public java.lang.String getAttributeName(final int index)... |
124 |
|
throws java.lang.IndexOutOfBoundsException |
125 |
|
{ |
126 |
|
|
127 |
0 |
if (index < 0 || index >= this._attributeNameList.size()) |
128 |
|
{ |
129 |
0 |
throw new IndexOutOfBoundsException("getAttributeName: Index value '" |
130 |
|
+ index + "' not in range [0.." |
131 |
|
+ (this._attributeNameList.size() - 1) + "]"); |
132 |
|
} |
133 |
|
|
134 |
0 |
return (java.lang.String) _attributeNameList.get(index); |
135 |
|
} |
136 |
|
|
137 |
|
|
138 |
|
|
139 |
|
|
140 |
|
|
141 |
|
|
142 |
|
|
143 |
|
|
144 |
|
@return |
145 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
146 |
29 |
public java.lang.String[] getAttributeName()... |
147 |
|
{ |
148 |
29 |
java.lang.String[] array = new java.lang.String[0]; |
149 |
29 |
return (java.lang.String[]) this._attributeNameList.toArray(array); |
150 |
|
} |
151 |
|
|
152 |
|
|
153 |
|
|
154 |
|
|
155 |
|
@return |
156 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
157 |
0 |
public int getAttributeNameCount()... |
158 |
|
{ |
159 |
0 |
return this._attributeNameList.size(); |
160 |
|
} |
161 |
|
|
162 |
|
|
163 |
|
|
164 |
|
|
165 |
|
@return |
166 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
167 |
35 |
public jalview.schemabinding.version2.types.FeatureMatcherByType getBy()... |
168 |
|
{ |
169 |
35 |
return this._by; |
170 |
|
} |
171 |
|
|
172 |
|
|
173 |
|
|
174 |
|
|
175 |
|
@return |
176 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
177 |
35 |
public java.lang.String getCondition()... |
178 |
|
{ |
179 |
35 |
return this._condition; |
180 |
|
} |
181 |
|
|
182 |
|
|
183 |
|
|
184 |
|
|
185 |
|
@return |
186 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
187 |
35 |
public java.lang.String getValue()... |
188 |
|
{ |
189 |
35 |
return this._value; |
190 |
|
} |
191 |
|
|
192 |
|
|
193 |
|
|
194 |
|
|
195 |
|
@return |
196 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
197 |
0 |
public boolean isValid()... |
198 |
|
{ |
199 |
0 |
try |
200 |
|
{ |
201 |
0 |
validate(); |
202 |
|
} catch (org.exolab.castor.xml.ValidationException vex) |
203 |
|
{ |
204 |
0 |
return false; |
205 |
|
} |
206 |
0 |
return true; |
207 |
|
} |
208 |
|
|
209 |
|
|
210 |
|
|
211 |
|
|
212 |
|
@param |
213 |
|
@throws |
214 |
|
|
215 |
|
|
216 |
|
@throws |
217 |
|
|
218 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
219 |
0 |
public void marshal(final java.io.Writer out)... |
220 |
|
throws org.exolab.castor.xml.MarshalException, |
221 |
|
org.exolab.castor.xml.ValidationException |
222 |
|
{ |
223 |
0 |
Marshaller.marshal(this, out); |
224 |
|
} |
225 |
|
|
226 |
|
|
227 |
|
|
228 |
|
|
229 |
|
@param |
230 |
|
@throws |
231 |
|
|
232 |
|
@throws |
233 |
|
|
234 |
|
@throws |
235 |
|
|
236 |
|
|
237 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
238 |
0 |
public void marshal(final org.xml.sax.ContentHandler handler)... |
239 |
|
throws java.io.IOException, |
240 |
|
org.exolab.castor.xml.MarshalException, |
241 |
|
org.exolab.castor.xml.ValidationException |
242 |
|
{ |
243 |
0 |
Marshaller.marshal(this, handler); |
244 |
|
} |
245 |
|
|
246 |
|
|
247 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
248 |
0 |
public void removeAllAttributeName()... |
249 |
|
{ |
250 |
0 |
this._attributeNameList.clear(); |
251 |
|
} |
252 |
|
|
253 |
|
|
254 |
|
|
255 |
|
|
256 |
|
@param |
257 |
|
@return |
258 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
259 |
0 |
public boolean removeAttributeName(final java.lang.String vAttributeName)... |
260 |
|
{ |
261 |
0 |
boolean removed = _attributeNameList.remove(vAttributeName); |
262 |
0 |
return removed; |
263 |
|
} |
264 |
|
|
265 |
|
|
266 |
|
|
267 |
|
|
268 |
|
@param |
269 |
|
@return |
270 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
271 |
0 |
public java.lang.String removeAttributeNameAt(final int index)... |
272 |
|
{ |
273 |
0 |
java.lang.Object obj = this._attributeNameList.remove(index); |
274 |
0 |
return (java.lang.String) obj; |
275 |
|
} |
276 |
|
|
277 |
|
|
278 |
|
|
279 |
|
|
280 |
|
@param |
281 |
|
@param |
282 |
|
@throws |
283 |
|
|
284 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 3 |
Complexity Density: 1 |
|
285 |
0 |
public void setAttributeName(final int index,... |
286 |
|
final java.lang.String vAttributeName) |
287 |
|
throws java.lang.IndexOutOfBoundsException |
288 |
|
{ |
289 |
|
|
290 |
0 |
if (index < 0 || index >= this._attributeNameList.size()) |
291 |
|
{ |
292 |
0 |
throw new IndexOutOfBoundsException("setAttributeName: Index value '" |
293 |
|
+ index + "' not in range [0.." |
294 |
|
+ (this._attributeNameList.size() - 1) + "]"); |
295 |
|
} |
296 |
|
|
297 |
0 |
this._attributeNameList.set(index, vAttributeName); |
298 |
|
} |
299 |
|
|
300 |
|
|
301 |
|
|
302 |
|
|
303 |
|
@param |
304 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
305 |
4 |
public void setAttributeName(final java.lang.String[] vAttributeNameArray)... |
306 |
|
{ |
307 |
|
|
308 |
4 |
_attributeNameList.clear(); |
309 |
|
|
310 |
10 |
for (int i = 0; i < vAttributeNameArray.length; i++) |
311 |
|
{ |
312 |
6 |
this._attributeNameList.add(vAttributeNameArray[i]); |
313 |
|
} |
314 |
|
} |
315 |
|
|
316 |
|
|
317 |
|
|
318 |
|
|
319 |
|
@param |
320 |
|
|
321 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
322 |
20 |
public void setBy(... |
323 |
|
final jalview.schemabinding.version2.types.FeatureMatcherByType by) |
324 |
|
{ |
325 |
20 |
this._by = by; |
326 |
|
} |
327 |
|
|
328 |
|
|
329 |
|
|
330 |
|
|
331 |
|
@param |
332 |
|
|
333 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
334 |
20 |
public void setCondition(final java.lang.String condition)... |
335 |
|
{ |
336 |
20 |
this._condition = condition; |
337 |
|
} |
338 |
|
|
339 |
|
|
340 |
|
|
341 |
|
|
342 |
|
@param |
343 |
|
|
344 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
345 |
20 |
public void setValue(final java.lang.String value)... |
346 |
|
{ |
347 |
20 |
this._value = value; |
348 |
|
} |
349 |
|
|
350 |
|
|
351 |
|
|
352 |
|
|
353 |
|
@param |
354 |
|
@throws |
355 |
|
|
356 |
|
|
357 |
|
@throws |
358 |
|
|
359 |
|
@return |
360 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
361 |
0 |
public static jalview.schemabinding.version2.FeatureMatcher unmarshal(... |
362 |
|
final java.io.Reader reader) |
363 |
|
throws org.exolab.castor.xml.MarshalException, |
364 |
|
org.exolab.castor.xml.ValidationException |
365 |
|
{ |
366 |
0 |
return (jalview.schemabinding.version2.FeatureMatcher) Unmarshaller |
367 |
|
.unmarshal(jalview.schemabinding.version2.FeatureMatcher.class, |
368 |
|
reader); |
369 |
|
} |
370 |
|
|
371 |
|
|
372 |
|
|
373 |
|
|
374 |
|
@throws |
375 |
|
|
376 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
377 |
0 |
public void validate() throws org.exolab.castor.xml.ValidationException... |
378 |
|
{ |
379 |
0 |
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); |
380 |
0 |
validator.validate(this); |
381 |
|
} |
382 |
|
|
383 |
|
} |