1
2
3
4
5
6
7
8 package org.exolab.castor.tests.framework.testDescriptor;
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 public class TestDescriptor implements java.io.Serializable {
24
25
26
27
28
29
30
31
32
33 private java.lang.String _name;
34
35
36
37
38 private java.lang.String _author;
39
40
41
42
43 private java.util.List _commentList;
44
45
46
47
48 private org.exolab.castor.tests.framework.testDescriptor.types.CategoryType _category;
49
50
51
52
53
54
55
56
57
58 private org.exolab.castor.tests.framework.testDescriptor.BugFix _bugFix;
59
60
61
62
63 private float _minimumJavaVersion;
64
65
66
67
68 private boolean _has_minimumJavaVersion;
69
70
71
72
73 private float _maximumJavaVersion;
74
75
76
77
78 private boolean _has_maximumJavaVersion;
79
80
81
82
83 private org.exolab.castor.tests.framework.testDescriptor.TestDescriptorChoice _testDescriptorChoice;
84
85
86
87
88
89
90 public TestDescriptor() {
91 super();
92 this._commentList = new java.util.ArrayList();
93 }
94
95
96
97
98
99
100
101
102
103
104
105
106
107 public void addComment(
108 final java.lang.String vComment)
109 throws java.lang.IndexOutOfBoundsException {
110 this._commentList.add(vComment);
111 }
112
113
114
115
116
117
118
119
120
121 public void addComment(
122 final int index,
123 final java.lang.String vComment)
124 throws java.lang.IndexOutOfBoundsException {
125 this._commentList.add(index, vComment);
126 }
127
128
129
130 public void deleteMaximumJavaVersion(
131 ) {
132 this._has_maximumJavaVersion= false;
133 }
134
135
136
137 public void deleteMinimumJavaVersion(
138 ) {
139 this._has_minimumJavaVersion= false;
140 }
141
142
143
144
145
146
147
148 public java.util.Enumeration enumerateComment(
149 ) {
150 return java.util.Collections.enumeration(this._commentList);
151 }
152
153
154
155
156
157
158 public java.lang.String getAuthor(
159 ) {
160 return this._author;
161 }
162
163
164
165
166
167
168
169
170
171
172
173
174 public org.exolab.castor.tests.framework.testDescriptor.BugFix getBugFix(
175 ) {
176 return this._bugFix;
177 }
178
179
180
181
182
183
184 public org.exolab.castor.tests.framework.testDescriptor.types.CategoryType getCategory(
185 ) {
186 return this._category;
187 }
188
189
190
191
192
193
194
195
196
197 public java.lang.String getComment(
198 final int index)
199 throws java.lang.IndexOutOfBoundsException {
200
201 if (index < 0 || index >= this._commentList.size()) {
202 throw new IndexOutOfBoundsException("getComment: Index value '" + index + "' not in range [0.." + (this._commentList.size() - 1) + "]");
203 }
204
205 return (java.lang.String) _commentList.get(index);
206 }
207
208
209
210
211
212
213
214
215
216
217 public java.lang.String[] getComment(
218 ) {
219 java.lang.String[] array = new java.lang.String[0];
220 return (java.lang.String[]) this._commentList.toArray(array);
221 }
222
223
224
225
226
227
228 public int getCommentCount(
229 ) {
230 return this._commentList.size();
231 }
232
233
234
235
236
237
238 public float getMaximumJavaVersion(
239 ) {
240 return this._maximumJavaVersion;
241 }
242
243
244
245
246
247
248 public float getMinimumJavaVersion(
249 ) {
250 return this._minimumJavaVersion;
251 }
252
253
254
255
256
257
258 public java.lang.String getName(
259 ) {
260 return this._name;
261 }
262
263
264
265
266
267
268 public org.exolab.castor.tests.framework.testDescriptor.TestDescriptorChoice getTestDescriptorChoice(
269 ) {
270 return this._testDescriptorChoice;
271 }
272
273
274
275
276
277
278 public boolean hasMaximumJavaVersion(
279 ) {
280 return this._has_maximumJavaVersion;
281 }
282
283
284
285
286
287
288 public boolean hasMinimumJavaVersion(
289 ) {
290 return this._has_minimumJavaVersion;
291 }
292
293
294
295
296
297
298 public boolean isValid(
299 ) {
300 try {
301 validate();
302 } catch (org.exolab.castor.xml.ValidationException vex) {
303 return false;
304 }
305 return true;
306 }
307
308
309
310
311
312
313
314 public java.util.Iterator iterateComment(
315 ) {
316 return this._commentList.iterator();
317 }
318
319
320
321
322
323
324
325
326
327
328 public void marshal(
329 final java.io.Writer out)
330 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
331 org.exolab.castor.xml.Marshaller.marshal(this, out);
332 }
333
334
335
336
337
338
339
340
341
342
343
344
345 public void marshal(
346 final org.xml.sax.ContentHandler handler)
347 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
348 org.exolab.castor.xml.Marshaller.marshal(this, handler);
349 }
350
351
352
353 public void removeAllComment(
354 ) {
355 this._commentList.clear();
356 }
357
358
359
360
361
362
363
364 public boolean removeComment(
365 final java.lang.String vComment) {
366 boolean removed = _commentList.remove(vComment);
367 return removed;
368 }
369
370
371
372
373
374
375
376 public java.lang.String removeCommentAt(
377 final int index) {
378 java.lang.Object obj = this._commentList.remove(index);
379 return (java.lang.String) obj;
380 }
381
382
383
384
385
386
387 public void setAuthor(
388 final java.lang.String author) {
389 this._author = author;
390 }
391
392
393
394
395
396
397
398
399
400
401
402
403 public void setBugFix(
404 final org.exolab.castor.tests.framework.testDescriptor.BugFix bugFix) {
405 this._bugFix = bugFix;
406 }
407
408
409
410
411
412
413 public void setCategory(
414 final org.exolab.castor.tests.framework.testDescriptor.types.CategoryType category) {
415 this._category = category;
416 }
417
418
419
420
421
422
423
424
425
426 public void setComment(
427 final int index,
428 final java.lang.String vComment)
429 throws java.lang.IndexOutOfBoundsException {
430
431 if (index < 0 || index >= this._commentList.size()) {
432 throw new IndexOutOfBoundsException("setComment: Index value '" + index + "' not in range [0.." + (this._commentList.size() - 1) + "]");
433 }
434
435 this._commentList.set(index, vComment);
436 }
437
438
439
440
441
442
443 public void setComment(
444 final java.lang.String[] vCommentArray) {
445
446 _commentList.clear();
447
448 for (int i = 0; i < vCommentArray.length; i++) {
449 this._commentList.add(vCommentArray[i]);
450 }
451 }
452
453
454
455
456
457
458
459 public void setMaximumJavaVersion(
460 final float maximumJavaVersion) {
461 this._maximumJavaVersion = maximumJavaVersion;
462 this._has_maximumJavaVersion = true;
463 }
464
465
466
467
468
469
470
471 public void setMinimumJavaVersion(
472 final float minimumJavaVersion) {
473 this._minimumJavaVersion = minimumJavaVersion;
474 this._has_minimumJavaVersion = true;
475 }
476
477
478
479
480
481
482 public void setName(
483 final java.lang.String name) {
484 this._name = name;
485 }
486
487
488
489
490
491
492
493 public void setTestDescriptorChoice(
494 final org.exolab.castor.tests.framework.testDescriptor.TestDescriptorChoice testDescriptorChoice) {
495 this._testDescriptorChoice = testDescriptorChoice;
496 }
497
498
499
500
501
502
503
504
505
506
507
508
509 public static org.exolab.castor.tests.framework.testDescriptor.TestDescriptor unmarshal(
510 final java.io.Reader reader)
511 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
512 return (org.exolab.castor.tests.framework.testDescriptor.TestDescriptor) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.tests.framework.testDescriptor.TestDescriptor.class, reader);
513 }
514
515
516
517
518
519
520
521 public void validate(
522 )
523 throws org.exolab.castor.xml.ValidationException {
524 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
525 validator.validate(this);
526 }
527
528 }