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