1
2
3
4
5
6
7
8 package org.astrogrid.registry.beans.resource.votable;
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.astrogrid.registry.beans.resource.votable.types.RESOURCETypeType;
21 import org.exolab.castor.xml.MarshalException;
22 import org.exolab.castor.xml.Marshaller;
23 import org.exolab.castor.xml.Unmarshaller;
24 import org.exolab.castor.xml.ValidationException;
25 import org.xml.sax.ContentHandler;
26
27 /***
28 * Class RESOURCE.
29 *
30 * @version $Revision: 1.14 $ $Date: 2007/01/04 16:26:13 $
31 */
32 public class RESOURCE extends org.astrogrid.common.bean.BaseBean
33 implements java.io.Serializable
34 {
35
36
37
38
39
40
41 /***
42 * Field _name
43 */
44 private java.lang.String _name;
45
46 /***
47 * Field _ID
48 */
49 private java.lang.String _ID;
50
51 /***
52 * Field _type
53 */
54 private org.astrogrid.registry.beans.resource.votable.types.RESOURCETypeType _type = org.astrogrid.registry.beans.resource.votable.types.RESOURCETypeType.valueOf("results");
55
56 /***
57 * Field _DESCRIPTION
58 */
59 private org.astrogrid.registry.beans.resource.votable.AnyTEXT _DESCRIPTION;
60
61 /***
62 * Field _INFOList
63 */
64 private java.util.ArrayList _INFOList;
65
66 /***
67 * Field _COOSYSList
68 */
69 private java.util.ArrayList _COOSYSList;
70
71 /***
72 * Field _PARAMList
73 */
74 private java.util.ArrayList _PARAMList;
75
76 /***
77 * Field _LINKList
78 */
79 private java.util.ArrayList _LINKList;
80
81 /***
82 * Field _TABLEList
83 */
84 private java.util.ArrayList _TABLEList;
85
86 /***
87 * Field _RESOURCEList
88 */
89 private java.util.ArrayList _RESOURCEList;
90
91
92
93
94
95
96 public RESOURCE() {
97 super();
98 setType(org.astrogrid.registry.beans.resource.votable.types.RESOURCETypeType.valueOf("results"));
99 _INFOList = new ArrayList();
100 _COOSYSList = new ArrayList();
101 _PARAMList = new ArrayList();
102 _LINKList = new ArrayList();
103 _TABLEList = new ArrayList();
104 _RESOURCEList = new ArrayList();
105 }
106
107
108
109
110
111
112 /***
113 * Method addCOOSYS
114 *
115 * @param vCOOSYS
116 */
117 public void addCOOSYS(org.astrogrid.registry.beans.resource.votable.COOSYS vCOOSYS)
118 throws java.lang.IndexOutOfBoundsException
119 {
120 _COOSYSList.add(vCOOSYS);
121 }
122
123 /***
124 * Method addCOOSYS
125 *
126 * @param index
127 * @param vCOOSYS
128 */
129 public void addCOOSYS(int index, org.astrogrid.registry.beans.resource.votable.COOSYS vCOOSYS)
130 throws java.lang.IndexOutOfBoundsException
131 {
132 _COOSYSList.add(index, vCOOSYS);
133 }
134
135 /***
136 * Method addINFO
137 *
138 * @param vINFO
139 */
140 public void addINFO(org.astrogrid.registry.beans.resource.votable.INFO vINFO)
141 throws java.lang.IndexOutOfBoundsException
142 {
143 _INFOList.add(vINFO);
144 }
145
146 /***
147 * Method addINFO
148 *
149 * @param index
150 * @param vINFO
151 */
152 public void addINFO(int index, org.astrogrid.registry.beans.resource.votable.INFO vINFO)
153 throws java.lang.IndexOutOfBoundsException
154 {
155 _INFOList.add(index, vINFO);
156 }
157
158 /***
159 * Method addLINK
160 *
161 * @param vLINK
162 */
163 public void addLINK(org.astrogrid.registry.beans.resource.votable.LINK vLINK)
164 throws java.lang.IndexOutOfBoundsException
165 {
166 _LINKList.add(vLINK);
167 }
168
169 /***
170 * Method addLINK
171 *
172 * @param index
173 * @param vLINK
174 */
175 public void addLINK(int index, org.astrogrid.registry.beans.resource.votable.LINK vLINK)
176 throws java.lang.IndexOutOfBoundsException
177 {
178 _LINKList.add(index, vLINK);
179 }
180
181 /***
182 * Method addPARAM
183 *
184 * @param vPARAM
185 */
186 public void addPARAM(org.astrogrid.registry.beans.resource.votable.PARAM vPARAM)
187 throws java.lang.IndexOutOfBoundsException
188 {
189 _PARAMList.add(vPARAM);
190 }
191
192 /***
193 * Method addPARAM
194 *
195 * @param index
196 * @param vPARAM
197 */
198 public void addPARAM(int index, org.astrogrid.registry.beans.resource.votable.PARAM vPARAM)
199 throws java.lang.IndexOutOfBoundsException
200 {
201 _PARAMList.add(index, vPARAM);
202 }
203
204 /***
205 * Method addRESOURCE
206 *
207 * @param vRESOURCE
208 */
209 public void addRESOURCE(org.astrogrid.registry.beans.resource.votable.RESOURCE vRESOURCE)
210 throws java.lang.IndexOutOfBoundsException
211 {
212 _RESOURCEList.add(vRESOURCE);
213 }
214
215 /***
216 * Method addRESOURCE
217 *
218 * @param index
219 * @param vRESOURCE
220 */
221 public void addRESOURCE(int index, org.astrogrid.registry.beans.resource.votable.RESOURCE vRESOURCE)
222 throws java.lang.IndexOutOfBoundsException
223 {
224 _RESOURCEList.add(index, vRESOURCE);
225 }
226
227 /***
228 * Method addTABLE
229 *
230 * @param vTABLE
231 */
232 public void addTABLE(org.astrogrid.registry.beans.resource.votable.TABLE vTABLE)
233 throws java.lang.IndexOutOfBoundsException
234 {
235 _TABLEList.add(vTABLE);
236 }
237
238 /***
239 * Method addTABLE
240 *
241 * @param index
242 * @param vTABLE
243 */
244 public void addTABLE(int index, org.astrogrid.registry.beans.resource.votable.TABLE vTABLE)
245 throws java.lang.IndexOutOfBoundsException
246 {
247 _TABLEList.add(index, vTABLE);
248 }
249
250 /***
251 * Method clearCOOSYS
252 */
253 public void clearCOOSYS()
254 {
255 _COOSYSList.clear();
256 }
257
258 /***
259 * Method clearINFO
260 */
261 public void clearINFO()
262 {
263 _INFOList.clear();
264 }
265
266 /***
267 * Method clearLINK
268 */
269 public void clearLINK()
270 {
271 _LINKList.clear();
272 }
273
274 /***
275 * Method clearPARAM
276 */
277 public void clearPARAM()
278 {
279 _PARAMList.clear();
280 }
281
282 /***
283 * Method clearRESOURCE
284 */
285 public void clearRESOURCE()
286 {
287 _RESOURCEList.clear();
288 }
289
290 /***
291 * Method clearTABLE
292 */
293 public void clearTABLE()
294 {
295 _TABLEList.clear();
296 }
297
298 /***
299 * Method enumerateCOOSYS
300 */
301 public java.util.Enumeration enumerateCOOSYS()
302 {
303 return new org.exolab.castor.util.IteratorEnumeration(_COOSYSList.iterator());
304 }
305
306 /***
307 * Method enumerateINFO
308 */
309 public java.util.Enumeration enumerateINFO()
310 {
311 return new org.exolab.castor.util.IteratorEnumeration(_INFOList.iterator());
312 }
313
314 /***
315 * Method enumerateLINK
316 */
317 public java.util.Enumeration enumerateLINK()
318 {
319 return new org.exolab.castor.util.IteratorEnumeration(_LINKList.iterator());
320 }
321
322 /***
323 * Method enumeratePARAM
324 */
325 public java.util.Enumeration enumeratePARAM()
326 {
327 return new org.exolab.castor.util.IteratorEnumeration(_PARAMList.iterator());
328 }
329
330 /***
331 * Method enumerateRESOURCE
332 */
333 public java.util.Enumeration enumerateRESOURCE()
334 {
335 return new org.exolab.castor.util.IteratorEnumeration(_RESOURCEList.iterator());
336 }
337
338 /***
339 * Method enumerateTABLE
340 */
341 public java.util.Enumeration enumerateTABLE()
342 {
343 return new org.exolab.castor.util.IteratorEnumeration(_TABLEList.iterator());
344 }
345
346 /***
347 * Note: hashCode() has not been overriden
348 *
349 * @param obj
350 */
351 public boolean equals(java.lang.Object obj)
352 {
353 if ( this == obj )
354 return true;
355
356 if (super.equals(obj)==false)
357 return false;
358
359 if (obj instanceof RESOURCE) {
360
361 RESOURCE temp = (RESOURCE)obj;
362 if (this._name != null) {
363 if (temp._name == null) return false;
364 else if (!(this._name.equals(temp._name)))
365 return false;
366 }
367 else if (temp._name != null)
368 return false;
369 if (this._ID != null) {
370 if (temp._ID == null) return false;
371 else if (!(this._ID.equals(temp._ID)))
372 return false;
373 }
374 else if (temp._ID != null)
375 return false;
376 if (this._type != null) {
377 if (temp._type == null) return false;
378 else if (!(this._type.equals(temp._type)))
379 return false;
380 }
381 else if (temp._type != null)
382 return false;
383 if (this._DESCRIPTION != null) {
384 if (temp._DESCRIPTION == null) return false;
385 else if (!(this._DESCRIPTION.equals(temp._DESCRIPTION)))
386 return false;
387 }
388 else if (temp._DESCRIPTION != null)
389 return false;
390 if (this._INFOList != null) {
391 if (temp._INFOList == null) return false;
392 else if (!(this._INFOList.equals(temp._INFOList)))
393 return false;
394 }
395 else if (temp._INFOList != null)
396 return false;
397 if (this._COOSYSList != null) {
398 if (temp._COOSYSList == null) return false;
399 else if (!(this._COOSYSList.equals(temp._COOSYSList)))
400 return false;
401 }
402 else if (temp._COOSYSList != null)
403 return false;
404 if (this._PARAMList != null) {
405 if (temp._PARAMList == null) return false;
406 else if (!(this._PARAMList.equals(temp._PARAMList)))
407 return false;
408 }
409 else if (temp._PARAMList != null)
410 return false;
411 if (this._LINKList != null) {
412 if (temp._LINKList == null) return false;
413 else if (!(this._LINKList.equals(temp._LINKList)))
414 return false;
415 }
416 else if (temp._LINKList != null)
417 return false;
418 if (this._TABLEList != null) {
419 if (temp._TABLEList == null) return false;
420 else if (!(this._TABLEList.equals(temp._TABLEList)))
421 return false;
422 }
423 else if (temp._TABLEList != null)
424 return false;
425 if (this._RESOURCEList != null) {
426 if (temp._RESOURCEList == null) return false;
427 else if (!(this._RESOURCEList.equals(temp._RESOURCEList)))
428 return false;
429 }
430 else if (temp._RESOURCEList != null)
431 return false;
432 return true;
433 }
434 return false;
435 }
436
437 /***
438 * Method getCOOSYS
439 *
440 * @param index
441 */
442 public org.astrogrid.registry.beans.resource.votable.COOSYS getCOOSYS(int index)
443 throws java.lang.IndexOutOfBoundsException
444 {
445
446 if ((index < 0) || (index > _COOSYSList.size())) {
447 throw new IndexOutOfBoundsException();
448 }
449
450 return (org.astrogrid.registry.beans.resource.votable.COOSYS) _COOSYSList.get(index);
451 }
452
453 /***
454 * Method getCOOSYS
455 */
456 public org.astrogrid.registry.beans.resource.votable.COOSYS[] getCOOSYS()
457 {
458 int size = _COOSYSList.size();
459 org.astrogrid.registry.beans.resource.votable.COOSYS[] mArray = new org.astrogrid.registry.beans.resource.votable.COOSYS[size];
460 for (int index = 0; index < size; index++) {
461 mArray[index] = (org.astrogrid.registry.beans.resource.votable.COOSYS) _COOSYSList.get(index);
462 }
463 return mArray;
464 }
465
466 /***
467 * Method getCOOSYSCount
468 */
469 public int getCOOSYSCount()
470 {
471 return _COOSYSList.size();
472 }
473
474 /***
475 * Returns the value of field 'DESCRIPTION'.
476 *
477 * @return the value of field 'DESCRIPTION'.
478 */
479 public org.astrogrid.registry.beans.resource.votable.AnyTEXT getDESCRIPTION()
480 {
481 return this._DESCRIPTION;
482 }
483
484 /***
485 * Returns the value of field 'ID'.
486 *
487 * @return the value of field 'ID'.
488 */
489 public java.lang.String getID()
490 {
491 return this._ID;
492 }
493
494 /***
495 * Method getINFO
496 *
497 * @param index
498 */
499 public org.astrogrid.registry.beans.resource.votable.INFO getINFO(int index)
500 throws java.lang.IndexOutOfBoundsException
501 {
502
503 if ((index < 0) || (index > _INFOList.size())) {
504 throw new IndexOutOfBoundsException();
505 }
506
507 return (org.astrogrid.registry.beans.resource.votable.INFO) _INFOList.get(index);
508 }
509
510 /***
511 * Method getINFO
512 */
513 public org.astrogrid.registry.beans.resource.votable.INFO[] getINFO()
514 {
515 int size = _INFOList.size();
516 org.astrogrid.registry.beans.resource.votable.INFO[] mArray = new org.astrogrid.registry.beans.resource.votable.INFO[size];
517 for (int index = 0; index < size; index++) {
518 mArray[index] = (org.astrogrid.registry.beans.resource.votable.INFO) _INFOList.get(index);
519 }
520 return mArray;
521 }
522
523 /***
524 * Method getINFOCount
525 */
526 public int getINFOCount()
527 {
528 return _INFOList.size();
529 }
530
531 /***
532 * Method getLINK
533 *
534 * @param index
535 */
536 public org.astrogrid.registry.beans.resource.votable.LINK getLINK(int index)
537 throws java.lang.IndexOutOfBoundsException
538 {
539
540 if ((index < 0) || (index > _LINKList.size())) {
541 throw new IndexOutOfBoundsException();
542 }
543
544 return (org.astrogrid.registry.beans.resource.votable.LINK) _LINKList.get(index);
545 }
546
547 /***
548 * Method getLINK
549 */
550 public org.astrogrid.registry.beans.resource.votable.LINK[] getLINK()
551 {
552 int size = _LINKList.size();
553 org.astrogrid.registry.beans.resource.votable.LINK[] mArray = new org.astrogrid.registry.beans.resource.votable.LINK[size];
554 for (int index = 0; index < size; index++) {
555 mArray[index] = (org.astrogrid.registry.beans.resource.votable.LINK) _LINKList.get(index);
556 }
557 return mArray;
558 }
559
560 /***
561 * Method getLINKCount
562 */
563 public int getLINKCount()
564 {
565 return _LINKList.size();
566 }
567
568 /***
569 * Returns the value of field 'name'.
570 *
571 * @return the value of field 'name'.
572 */
573 public java.lang.String getName()
574 {
575 return this._name;
576 }
577
578 /***
579 * Method getPARAM
580 *
581 * @param index
582 */
583 public org.astrogrid.registry.beans.resource.votable.PARAM getPARAM(int index)
584 throws java.lang.IndexOutOfBoundsException
585 {
586
587 if ((index < 0) || (index > _PARAMList.size())) {
588 throw new IndexOutOfBoundsException();
589 }
590
591 return (org.astrogrid.registry.beans.resource.votable.PARAM) _PARAMList.get(index);
592 }
593
594 /***
595 * Method getPARAM
596 */
597 public org.astrogrid.registry.beans.resource.votable.PARAM[] getPARAM()
598 {
599 int size = _PARAMList.size();
600 org.astrogrid.registry.beans.resource.votable.PARAM[] mArray = new org.astrogrid.registry.beans.resource.votable.PARAM[size];
601 for (int index = 0; index < size; index++) {
602 mArray[index] = (org.astrogrid.registry.beans.resource.votable.PARAM) _PARAMList.get(index);
603 }
604 return mArray;
605 }
606
607 /***
608 * Method getPARAMCount
609 */
610 public int getPARAMCount()
611 {
612 return _PARAMList.size();
613 }
614
615 /***
616 * Method getRESOURCE
617 *
618 * @param index
619 */
620 public org.astrogrid.registry.beans.resource.votable.RESOURCE getRESOURCE(int index)
621 throws java.lang.IndexOutOfBoundsException
622 {
623
624 if ((index < 0) || (index > _RESOURCEList.size())) {
625 throw new IndexOutOfBoundsException();
626 }
627
628 return (org.astrogrid.registry.beans.resource.votable.RESOURCE) _RESOURCEList.get(index);
629 }
630
631 /***
632 * Method getRESOURCE
633 */
634 public org.astrogrid.registry.beans.resource.votable.RESOURCE[] getRESOURCE()
635 {
636 int size = _RESOURCEList.size();
637 org.astrogrid.registry.beans.resource.votable.RESOURCE[] mArray = new org.astrogrid.registry.beans.resource.votable.RESOURCE[size];
638 for (int index = 0; index < size; index++) {
639 mArray[index] = (org.astrogrid.registry.beans.resource.votable.RESOURCE) _RESOURCEList.get(index);
640 }
641 return mArray;
642 }
643
644 /***
645 * Method getRESOURCECount
646 */
647 public int getRESOURCECount()
648 {
649 return _RESOURCEList.size();
650 }
651
652 /***
653 * Method getTABLE
654 *
655 * @param index
656 */
657 public org.astrogrid.registry.beans.resource.votable.TABLE getTABLE(int index)
658 throws java.lang.IndexOutOfBoundsException
659 {
660
661 if ((index < 0) || (index > _TABLEList.size())) {
662 throw new IndexOutOfBoundsException();
663 }
664
665 return (org.astrogrid.registry.beans.resource.votable.TABLE) _TABLEList.get(index);
666 }
667
668 /***
669 * Method getTABLE
670 */
671 public org.astrogrid.registry.beans.resource.votable.TABLE[] getTABLE()
672 {
673 int size = _TABLEList.size();
674 org.astrogrid.registry.beans.resource.votable.TABLE[] mArray = new org.astrogrid.registry.beans.resource.votable.TABLE[size];
675 for (int index = 0; index < size; index++) {
676 mArray[index] = (org.astrogrid.registry.beans.resource.votable.TABLE) _TABLEList.get(index);
677 }
678 return mArray;
679 }
680
681 /***
682 * Method getTABLECount
683 */
684 public int getTABLECount()
685 {
686 return _TABLEList.size();
687 }
688
689 /***
690 * Returns the value of field 'type'.
691 *
692 * @return the value of field 'type'.
693 */
694 public org.astrogrid.registry.beans.resource.votable.types.RESOURCETypeType getType()
695 {
696 return this._type;
697 }
698
699 /***
700 * Method isValid
701 */
702 public boolean isValid()
703 {
704 try {
705 validate();
706 }
707 catch (org.exolab.castor.xml.ValidationException vex) {
708 return false;
709 }
710 return true;
711 }
712
713 /***
714 * Method marshal
715 *
716 * @param out
717 */
718 public void marshal(java.io.Writer out)
719 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
720 {
721
722 Marshaller.marshal(this, out);
723 }
724
725 /***
726 * Method marshal
727 *
728 * @param handler
729 */
730 public void marshal(org.xml.sax.ContentHandler handler)
731 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
732 {
733
734 Marshaller.marshal(this, handler);
735 }
736
737 /***
738 * Method removeCOOSYS
739 *
740 * @param vCOOSYS
741 */
742 public boolean removeCOOSYS(org.astrogrid.registry.beans.resource.votable.COOSYS vCOOSYS)
743 {
744 boolean removed = _COOSYSList.remove(vCOOSYS);
745 return removed;
746 }
747
748 /***
749 * Method removeINFO
750 *
751 * @param vINFO
752 */
753 public boolean removeINFO(org.astrogrid.registry.beans.resource.votable.INFO vINFO)
754 {
755 boolean removed = _INFOList.remove(vINFO);
756 return removed;
757 }
758
759 /***
760 * Method removeLINK
761 *
762 * @param vLINK
763 */
764 public boolean removeLINK(org.astrogrid.registry.beans.resource.votable.LINK vLINK)
765 {
766 boolean removed = _LINKList.remove(vLINK);
767 return removed;
768 }
769
770 /***
771 * Method removePARAM
772 *
773 * @param vPARAM
774 */
775 public boolean removePARAM(org.astrogrid.registry.beans.resource.votable.PARAM vPARAM)
776 {
777 boolean removed = _PARAMList.remove(vPARAM);
778 return removed;
779 }
780
781 /***
782 * Method removeRESOURCE
783 *
784 * @param vRESOURCE
785 */
786 public boolean removeRESOURCE(org.astrogrid.registry.beans.resource.votable.RESOURCE vRESOURCE)
787 {
788 boolean removed = _RESOURCEList.remove(vRESOURCE);
789 return removed;
790 }
791
792 /***
793 * Method removeTABLE
794 *
795 * @param vTABLE
796 */
797 public boolean removeTABLE(org.astrogrid.registry.beans.resource.votable.TABLE vTABLE)
798 {
799 boolean removed = _TABLEList.remove(vTABLE);
800 return removed;
801 }
802
803 /***
804 * Method setCOOSYS
805 *
806 * @param index
807 * @param vCOOSYS
808 */
809 public void setCOOSYS(int index, org.astrogrid.registry.beans.resource.votable.COOSYS vCOOSYS)
810 throws java.lang.IndexOutOfBoundsException
811 {
812
813 if ((index < 0) || (index > _COOSYSList.size())) {
814 throw new IndexOutOfBoundsException();
815 }
816 _COOSYSList.set(index, vCOOSYS);
817 }
818
819 /***
820 * Method setCOOSYS
821 *
822 * @param COOSYSArray
823 */
824 public void setCOOSYS(org.astrogrid.registry.beans.resource.votable.COOSYS[] COOSYSArray)
825 {
826
827 _COOSYSList.clear();
828 for (int i = 0; i < COOSYSArray.length; i++) {
829 _COOSYSList.add(COOSYSArray[i]);
830 }
831 }
832
833 /***
834 * Sets the value of field 'DESCRIPTION'.
835 *
836 * @param DESCRIPTION the value of field 'DESCRIPTION'.
837 */
838 public void setDESCRIPTION(org.astrogrid.registry.beans.resource.votable.AnyTEXT DESCRIPTION)
839 {
840 this._DESCRIPTION = DESCRIPTION;
841 }
842
843 /***
844 * Sets the value of field 'ID'.
845 *
846 * @param ID the value of field 'ID'.
847 */
848 public void setID(java.lang.String ID)
849 {
850 this._ID = ID;
851 }
852
853 /***
854 * Method setINFO
855 *
856 * @param index
857 * @param vINFO
858 */
859 public void setINFO(int index, org.astrogrid.registry.beans.resource.votable.INFO vINFO)
860 throws java.lang.IndexOutOfBoundsException
861 {
862
863 if ((index < 0) || (index > _INFOList.size())) {
864 throw new IndexOutOfBoundsException();
865 }
866 _INFOList.set(index, vINFO);
867 }
868
869 /***
870 * Method setINFO
871 *
872 * @param INFOArray
873 */
874 public void setINFO(org.astrogrid.registry.beans.resource.votable.INFO[] INFOArray)
875 {
876
877 _INFOList.clear();
878 for (int i = 0; i < INFOArray.length; i++) {
879 _INFOList.add(INFOArray[i]);
880 }
881 }
882
883 /***
884 * Method setLINK
885 *
886 * @param index
887 * @param vLINK
888 */
889 public void setLINK(int index, org.astrogrid.registry.beans.resource.votable.LINK vLINK)
890 throws java.lang.IndexOutOfBoundsException
891 {
892
893 if ((index < 0) || (index > _LINKList.size())) {
894 throw new IndexOutOfBoundsException();
895 }
896 _LINKList.set(index, vLINK);
897 }
898
899 /***
900 * Method setLINK
901 *
902 * @param LINKArray
903 */
904 public void setLINK(org.astrogrid.registry.beans.resource.votable.LINK[] LINKArray)
905 {
906
907 _LINKList.clear();
908 for (int i = 0; i < LINKArray.length; i++) {
909 _LINKList.add(LINKArray[i]);
910 }
911 }
912
913 /***
914 * Sets the value of field 'name'.
915 *
916 * @param name the value of field 'name'.
917 */
918 public void setName(java.lang.String name)
919 {
920 this._name = name;
921 }
922
923 /***
924 * Method setPARAM
925 *
926 * @param index
927 * @param vPARAM
928 */
929 public void setPARAM(int index, org.astrogrid.registry.beans.resource.votable.PARAM vPARAM)
930 throws java.lang.IndexOutOfBoundsException
931 {
932
933 if ((index < 0) || (index > _PARAMList.size())) {
934 throw new IndexOutOfBoundsException();
935 }
936 _PARAMList.set(index, vPARAM);
937 }
938
939 /***
940 * Method setPARAM
941 *
942 * @param PARAMArray
943 */
944 public void setPARAM(org.astrogrid.registry.beans.resource.votable.PARAM[] PARAMArray)
945 {
946
947 _PARAMList.clear();
948 for (int i = 0; i < PARAMArray.length; i++) {
949 _PARAMList.add(PARAMArray[i]);
950 }
951 }
952
953 /***
954 * Method setRESOURCE
955 *
956 * @param index
957 * @param vRESOURCE
958 */
959 public void setRESOURCE(int index, org.astrogrid.registry.beans.resource.votable.RESOURCE vRESOURCE)
960 throws java.lang.IndexOutOfBoundsException
961 {
962
963 if ((index < 0) || (index > _RESOURCEList.size())) {
964 throw new IndexOutOfBoundsException();
965 }
966 _RESOURCEList.set(index, vRESOURCE);
967 }
968
969 /***
970 * Method setRESOURCE
971 *
972 * @param RESOURCEArray
973 */
974 public void setRESOURCE(org.astrogrid.registry.beans.resource.votable.RESOURCE[] RESOURCEArray)
975 {
976
977 _RESOURCEList.clear();
978 for (int i = 0; i < RESOURCEArray.length; i++) {
979 _RESOURCEList.add(RESOURCEArray[i]);
980 }
981 }
982
983 /***
984 * Method setTABLE
985 *
986 * @param index
987 * @param vTABLE
988 */
989 public void setTABLE(int index, org.astrogrid.registry.beans.resource.votable.TABLE vTABLE)
990 throws java.lang.IndexOutOfBoundsException
991 {
992
993 if ((index < 0) || (index > _TABLEList.size())) {
994 throw new IndexOutOfBoundsException();
995 }
996 _TABLEList.set(index, vTABLE);
997 }
998
999 /***
1000 * Method setTABLE
1001 *
1002 * @param TABLEArray
1003 */
1004 public void setTABLE(org.astrogrid.registry.beans.resource.votable.TABLE[] TABLEArray)
1005 {
1006
1007 _TABLEList.clear();
1008 for (int i = 0; i < TABLEArray.length; i++) {
1009 _TABLEList.add(TABLEArray[i]);
1010 }
1011 }
1012
1013 /***
1014 * Sets the value of field 'type'.
1015 *
1016 * @param type the value of field 'type'.
1017 */
1018 public void setType(org.astrogrid.registry.beans.resource.votable.types.RESOURCETypeType type)
1019 {
1020 this._type = type;
1021 }
1022
1023 /***
1024 * Method unmarshalRESOURCE
1025 *
1026 * @param reader
1027 */
1028 public static org.astrogrid.registry.beans.resource.votable.RESOURCE unmarshalRESOURCE(java.io.Reader reader)
1029 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
1030 {
1031 return (org.astrogrid.registry.beans.resource.votable.RESOURCE) Unmarshaller.unmarshal(org.astrogrid.registry.beans.resource.votable.RESOURCE.class, reader);
1032 }
1033
1034 /***
1035 * Method validate
1036 */
1037 public void validate()
1038 throws org.exolab.castor.xml.ValidationException
1039 {
1040 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1041 validator.validate(this);
1042 }
1043
1044 }