1
2
3
4
5
6
7
8 package fr.in2p3.jsaga.generated.session;
9
10
11
12
13
14 import java.io.IOException;
15 import java.io.Reader;
16 import java.io.Serializable;
17 import java.io.Writer;
18 import java.util.ArrayList;
19 import java.util.Enumeration;
20 import org.exolab.castor.xml.MarshalException;
21 import org.exolab.castor.xml.Marshaller;
22 import org.exolab.castor.xml.Unmarshaller;
23 import org.exolab.castor.xml.ValidationException;
24 import org.xml.sax.ContentHandler;
25
26
27
28
29
30
31 public class ServiceType extends fr.in2p3.jsaga.generated.session.ConfigurableType
32 implements java.io.Serializable
33 {
34
35
36
37
38
39
40
41
42
43 private java.util.ArrayList _aliasList;
44
45
46
47
48 private java.util.ArrayList _includeList;
49
50
51
52
53 private java.util.ArrayList _excludeList;
54
55
56
57
58
59
60 public ServiceType()
61 {
62 super();
63 _aliasList = new ArrayList();
64 _includeList = new ArrayList();
65 _excludeList = new ArrayList();
66 }
67
68
69
70
71
72
73
74
75
76
77
78
79
80 public void addAlias(java.lang.String vAlias)
81 throws java.lang.IndexOutOfBoundsException
82 {
83 _aliasList.add(vAlias);
84 }
85
86
87
88
89
90
91
92
93
94 public void addAlias(int index, java.lang.String vAlias)
95 throws java.lang.IndexOutOfBoundsException
96 {
97 _aliasList.add(index, vAlias);
98 }
99
100
101
102
103
104
105
106
107 public void addExclude(fr.in2p3.jsaga.generated.session.Exclude vExclude)
108 throws java.lang.IndexOutOfBoundsException
109 {
110 _excludeList.add(vExclude);
111 }
112
113
114
115
116
117
118
119
120
121 public void addExclude(int index, fr.in2p3.jsaga.generated.session.Exclude vExclude)
122 throws java.lang.IndexOutOfBoundsException
123 {
124 _excludeList.add(index, vExclude);
125 }
126
127
128
129
130
131
132
133
134 public void addInclude(fr.in2p3.jsaga.generated.session.Include vInclude)
135 throws java.lang.IndexOutOfBoundsException
136 {
137 _includeList.add(vInclude);
138 }
139
140
141
142
143
144
145
146
147
148 public void addInclude(int index, fr.in2p3.jsaga.generated.session.Include vInclude)
149 throws java.lang.IndexOutOfBoundsException
150 {
151 _includeList.add(index, vInclude);
152 }
153
154
155
156
157
158 public void clearAlias()
159 {
160 _aliasList.clear();
161 }
162
163
164
165
166
167 public void clearExclude()
168 {
169 _excludeList.clear();
170 }
171
172
173
174
175
176 public void clearInclude()
177 {
178 _includeList.clear();
179 }
180
181
182
183
184
185
186
187
188 public java.util.Enumeration enumerateAlias()
189 {
190 return new org.exolab.castor.util.IteratorEnumeration(_aliasList.iterator());
191 }
192
193
194
195
196
197
198
199
200 public java.util.Enumeration enumerateExclude()
201 {
202 return new org.exolab.castor.util.IteratorEnumeration(_excludeList.iterator());
203 }
204
205
206
207
208
209
210
211
212 public java.util.Enumeration enumerateInclude()
213 {
214 return new org.exolab.castor.util.IteratorEnumeration(_includeList.iterator());
215 }
216
217
218
219
220
221
222
223
224
225 public java.lang.String getAlias(int index)
226 throws java.lang.IndexOutOfBoundsException
227 {
228
229 if ((index < 0) || (index > _aliasList.size())) {
230 throw new IndexOutOfBoundsException();
231 }
232
233 return (String)_aliasList.get(index);
234 }
235
236
237
238
239
240
241
242
243 public java.lang.String[] getAlias()
244 {
245 int size = _aliasList.size();
246 java.lang.String[] mArray = new java.lang.String[size];
247 for (int index = 0; index < size; index++) {
248 mArray[index] = (String)_aliasList.get(index);
249 }
250 return mArray;
251 }
252
253
254
255
256
257
258
259
260 public int getAliasCount()
261 {
262 return _aliasList.size();
263 }
264
265
266
267
268
269
270
271
272
273 public fr.in2p3.jsaga.generated.session.Exclude getExclude(int index)
274 throws java.lang.IndexOutOfBoundsException
275 {
276
277 if ((index < 0) || (index > _excludeList.size())) {
278 throw new IndexOutOfBoundsException();
279 }
280
281 return (fr.in2p3.jsaga.generated.session.Exclude) _excludeList.get(index);
282 }
283
284
285
286
287
288
289
290
291 public fr.in2p3.jsaga.generated.session.Exclude[] getExclude()
292 {
293 int size = _excludeList.size();
294 fr.in2p3.jsaga.generated.session.Exclude[] mArray = new fr.in2p3.jsaga.generated.session.Exclude[size];
295 for (int index = 0; index < size; index++) {
296 mArray[index] = (fr.in2p3.jsaga.generated.session.Exclude) _excludeList.get(index);
297 }
298 return mArray;
299 }
300
301
302
303
304
305
306
307
308 public int getExcludeCount()
309 {
310 return _excludeList.size();
311 }
312
313
314
315
316
317
318
319
320
321 public fr.in2p3.jsaga.generated.session.Include getInclude(int index)
322 throws java.lang.IndexOutOfBoundsException
323 {
324
325 if ((index < 0) || (index > _includeList.size())) {
326 throw new IndexOutOfBoundsException();
327 }
328
329 return (fr.in2p3.jsaga.generated.session.Include) _includeList.get(index);
330 }
331
332
333
334
335
336
337
338
339 public fr.in2p3.jsaga.generated.session.Include[] getInclude()
340 {
341 int size = _includeList.size();
342 fr.in2p3.jsaga.generated.session.Include[] mArray = new fr.in2p3.jsaga.generated.session.Include[size];
343 for (int index = 0; index < size; index++) {
344 mArray[index] = (fr.in2p3.jsaga.generated.session.Include) _includeList.get(index);
345 }
346 return mArray;
347 }
348
349
350
351
352
353
354
355
356 public int getIncludeCount()
357 {
358 return _includeList.size();
359 }
360
361
362
363
364
365
366
367
368 public boolean isValid()
369 {
370 try {
371 validate();
372 }
373 catch (org.exolab.castor.xml.ValidationException vex) {
374 return false;
375 }
376 return true;
377 }
378
379
380
381
382
383
384
385
386 public void marshal(java.io.Writer out)
387 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
388 {
389
390 Marshaller.marshal(this, out);
391 }
392
393
394
395
396
397
398
399
400 public void marshal(org.xml.sax.ContentHandler handler)
401 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
402 {
403
404 Marshaller.marshal(this, handler);
405 }
406
407
408
409
410
411
412
413
414
415 public boolean removeAlias(java.lang.String vAlias)
416 {
417 boolean removed = _aliasList.remove(vAlias);
418 return removed;
419 }
420
421
422
423
424
425
426
427
428
429 public boolean removeExclude(fr.in2p3.jsaga.generated.session.Exclude vExclude)
430 {
431 boolean removed = _excludeList.remove(vExclude);
432 return removed;
433 }
434
435
436
437
438
439
440
441
442
443 public boolean removeInclude(fr.in2p3.jsaga.generated.session.Include vInclude)
444 {
445 boolean removed = _includeList.remove(vInclude);
446 return removed;
447 }
448
449
450
451
452
453
454
455
456
457 public void setAlias(int index, java.lang.String vAlias)
458 throws java.lang.IndexOutOfBoundsException
459 {
460
461 if ((index < 0) || (index > _aliasList.size())) {
462 throw new IndexOutOfBoundsException();
463 }
464 _aliasList.set(index, vAlias);
465 }
466
467
468
469
470
471
472
473
474 public void setAlias(java.lang.String[] aliasArray)
475 {
476
477 _aliasList.clear();
478 for (int i = 0; i < aliasArray.length; i++) {
479 _aliasList.add(aliasArray[i]);
480 }
481 }
482
483
484
485
486
487
488
489
490
491 public void setExclude(int index, fr.in2p3.jsaga.generated.session.Exclude vExclude)
492 throws java.lang.IndexOutOfBoundsException
493 {
494
495 if ((index < 0) || (index > _excludeList.size())) {
496 throw new IndexOutOfBoundsException();
497 }
498 _excludeList.set(index, vExclude);
499 }
500
501
502
503
504
505
506
507
508 public void setExclude(fr.in2p3.jsaga.generated.session.Exclude[] excludeArray)
509 {
510
511 _excludeList.clear();
512 for (int i = 0; i < excludeArray.length; i++) {
513 _excludeList.add(excludeArray[i]);
514 }
515 }
516
517
518
519
520
521
522
523
524
525 public void setInclude(int index, fr.in2p3.jsaga.generated.session.Include vInclude)
526 throws java.lang.IndexOutOfBoundsException
527 {
528
529 if ((index < 0) || (index > _includeList.size())) {
530 throw new IndexOutOfBoundsException();
531 }
532 _includeList.set(index, vInclude);
533 }
534
535
536
537
538
539
540
541
542 public void setInclude(fr.in2p3.jsaga.generated.session.Include[] includeArray)
543 {
544
545 _includeList.clear();
546 for (int i = 0; i < includeArray.length; i++) {
547 _includeList.add(includeArray[i]);
548 }
549 }
550
551
552
553
554
555
556
557
558
559 public static java.lang.Object unmarshal(java.io.Reader reader)
560 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
561 {
562 return (fr.in2p3.jsaga.generated.session.ServiceType) Unmarshaller.unmarshal(fr.in2p3.jsaga.generated.session.ServiceType.class, reader);
563 }
564
565
566
567
568
569 public void validate()
570 throws org.exolab.castor.xml.ValidationException
571 {
572 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
573 validator.validate(this);
574 }
575
576 }