View Javadoc

1   /*
2    * This class was automatically generated with 
3    * <a href="http://www.castor.org">Castor 0.9.4.3</a>, using an XML
4    * Schema.
5    * $Id: ResourceType.java,v 1.14 2007/01/04 16:26:22 clq2 Exp $
6    */
7   
8   package org.astrogrid.registry.beans.resource;
9   
10    //---------------------------------/
11   //- Imported classes and packages -/
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.Date;
20  import java.util.Enumeration;
21  import org.astrogrid.registry.beans.resource.types.CategoryType;
22  import org.astrogrid.registry.beans.resource.types.ContentLevelType;
23  import org.astrogrid.registry.beans.resource.types.ResourceTypeStatusType;
24  import org.exolab.castor.xml.MarshalException;
25  import org.exolab.castor.xml.Marshaller;
26  import org.exolab.castor.xml.Unmarshaller;
27  import org.exolab.castor.xml.ValidationException;
28  import org.xml.sax.ContentHandler;
29  
30  /***
31   * Class ResourceType.
32   * 
33   * @version $Revision: 1.14 $ $Date: 2007/01/04 16:26:22 $
34   */
35  public class ResourceType extends org.astrogrid.common.bean.BaseBean 
36  implements java.io.Serializable
37  {
38  
39  
40        //--------------------------/
41       //- Class/Member Variables -/
42      //--------------------------/
43  
44      /***
45       * The date this resource metadata description was created.
46       *  
47       */
48      private java.util.Date _created;
49  
50      /***
51       * The date this resource metadata description was last
52       * updated.
53       *  
54       */
55      private java.util.Date _updated;
56  
57      /***
58       * a tag indicating whether this resource is believed to be
59       * still
60       *  actively maintained.
61       *  
62       */
63      private org.astrogrid.registry.beans.resource.types.ResourceTypeStatusType _status = org.astrogrid.registry.beans.resource.types.ResourceTypeStatusType.valueOf("active");
64  
65      /***
66       * Unambiguous reference to the resource conforming to the IVOA
67       *  standard for identifiers
68       *  
69       */
70      private org.astrogrid.registry.beans.resource.IdentifierType _identifier;
71  
72      /***
73       * the full name of a resource
74       */
75      private java.lang.String _title;
76  
77      /***
78       * a short name or abbreviation for this resource that
79       * applications 
80       *  may use to refer to this resource in a compact display. 
81       *  
82       */
83      private java.lang.String _shortName;
84  
85      /***
86       * An informational, human-readable overview of a resource.
87       *  
88       */
89      private org.astrogrid.registry.beans.resource.SummaryType _summary;
90  
91      /***
92       * Nature or genre of the content of the resource
93       *  
94       */
95      private java.util.ArrayList _typeList;
96  
97      /***
98       * an description of a relationship to another resource. 
99       *  
100      */
101     private java.util.ArrayList _relatedResourceList;
102 
103     /***
104      * This is typically not provided unless this resource is 
105      *  claiming to be a mirror of another. Multiple 
106      *  LogicalIdentifiers can be present, usually with different
107      *  role attributes. For each role, there should be a 
108      *  corresponding relationship described under a
109      * RelatedResource,
110      *  when applicable.
111      *  
112      */
113     private java.util.ArrayList _logicalIdentifierList;
114 
115     /***
116      * Information regarding the general curation of the resource
117      *  
118      */
119     private org.astrogrid.registry.beans.resource.CurationType _curation;
120 
121     /***
122      * List of topics, object types, or other descriptive keywords 
123      *  about the resource. 
124      *  
125      */
126     private java.util.ArrayList _subjectList;
127 
128     /***
129      * Description of the content level or intended audience
130      *  
131      */
132     private java.util.ArrayList _contentLevelList;
133 
134 
135       //----------------/
136      //- Constructors -/
137     //----------------/
138 
139     public ResourceType() {
140         super();
141         setStatus(org.astrogrid.registry.beans.resource.types.ResourceTypeStatusType.valueOf("active"));
142         _typeList = new ArrayList();
143         _relatedResourceList = new ArrayList();
144         _logicalIdentifierList = new ArrayList();
145         _subjectList = new ArrayList();
146         _contentLevelList = new ArrayList();
147     } //-- org.astrogrid.registry.beans.resource.ResourceType()
148 
149 
150       //-----------/
151      //- Methods -/
152     //-----------/
153 
154     /***
155      * Method addContentLevel
156      * 
157      * @param vContentLevel
158      */
159     public void addContentLevel(org.astrogrid.registry.beans.resource.types.ContentLevelType vContentLevel)
160         throws java.lang.IndexOutOfBoundsException
161     {
162         _contentLevelList.add(vContentLevel);
163     } //-- void addContentLevel(org.astrogrid.registry.beans.resource.types.ContentLevelType) 
164 
165     /***
166      * Method addContentLevel
167      * 
168      * @param index
169      * @param vContentLevel
170      */
171     public void addContentLevel(int index, org.astrogrid.registry.beans.resource.types.ContentLevelType vContentLevel)
172         throws java.lang.IndexOutOfBoundsException
173     {
174         _contentLevelList.add(index, vContentLevel);
175     } //-- void addContentLevel(int, org.astrogrid.registry.beans.resource.types.ContentLevelType) 
176 
177     /***
178      * Method addLogicalIdentifier
179      * 
180      * @param vLogicalIdentifier
181      */
182     public void addLogicalIdentifier(org.astrogrid.registry.beans.resource.LogicalIdentifierType vLogicalIdentifier)
183         throws java.lang.IndexOutOfBoundsException
184     {
185         _logicalIdentifierList.add(vLogicalIdentifier);
186     } //-- void addLogicalIdentifier(org.astrogrid.registry.beans.resource.LogicalIdentifierType) 
187 
188     /***
189      * Method addLogicalIdentifier
190      * 
191      * @param index
192      * @param vLogicalIdentifier
193      */
194     public void addLogicalIdentifier(int index, org.astrogrid.registry.beans.resource.LogicalIdentifierType vLogicalIdentifier)
195         throws java.lang.IndexOutOfBoundsException
196     {
197         _logicalIdentifierList.add(index, vLogicalIdentifier);
198     } //-- void addLogicalIdentifier(int, org.astrogrid.registry.beans.resource.LogicalIdentifierType) 
199 
200     /***
201      * Method addRelatedResource
202      * 
203      * @param vRelatedResource
204      */
205     public void addRelatedResource(org.astrogrid.registry.beans.resource.RelatedResourceType vRelatedResource)
206         throws java.lang.IndexOutOfBoundsException
207     {
208         _relatedResourceList.add(vRelatedResource);
209     } //-- void addRelatedResource(org.astrogrid.registry.beans.resource.RelatedResourceType) 
210 
211     /***
212      * Method addRelatedResource
213      * 
214      * @param index
215      * @param vRelatedResource
216      */
217     public void addRelatedResource(int index, org.astrogrid.registry.beans.resource.RelatedResourceType vRelatedResource)
218         throws java.lang.IndexOutOfBoundsException
219     {
220         _relatedResourceList.add(index, vRelatedResource);
221     } //-- void addRelatedResource(int, org.astrogrid.registry.beans.resource.RelatedResourceType) 
222 
223     /***
224      * Method addSubject
225      * 
226      * @param vSubject
227      */
228     public void addSubject(java.lang.String vSubject)
229         throws java.lang.IndexOutOfBoundsException
230     {
231         _subjectList.add(vSubject);
232     } //-- void addSubject(java.lang.String) 
233 
234     /***
235      * Method addSubject
236      * 
237      * @param index
238      * @param vSubject
239      */
240     public void addSubject(int index, java.lang.String vSubject)
241         throws java.lang.IndexOutOfBoundsException
242     {
243         _subjectList.add(index, vSubject);
244     } //-- void addSubject(int, java.lang.String) 
245 
246     /***
247      * Method addType
248      * 
249      * @param vType
250      */
251     public void addType(org.astrogrid.registry.beans.resource.types.CategoryType vType)
252         throws java.lang.IndexOutOfBoundsException
253     {
254         _typeList.add(vType);
255     } //-- void addType(org.astrogrid.registry.beans.resource.types.CategoryType) 
256 
257     /***
258      * Method addType
259      * 
260      * @param index
261      * @param vType
262      */
263     public void addType(int index, org.astrogrid.registry.beans.resource.types.CategoryType vType)
264         throws java.lang.IndexOutOfBoundsException
265     {
266         _typeList.add(index, vType);
267     } //-- void addType(int, org.astrogrid.registry.beans.resource.types.CategoryType) 
268 
269     /***
270      * Method clearContentLevel
271      */
272     public void clearContentLevel()
273     {
274         _contentLevelList.clear();
275     } //-- void clearContentLevel() 
276 
277     /***
278      * Method clearLogicalIdentifier
279      */
280     public void clearLogicalIdentifier()
281     {
282         _logicalIdentifierList.clear();
283     } //-- void clearLogicalIdentifier() 
284 
285     /***
286      * Method clearRelatedResource
287      */
288     public void clearRelatedResource()
289     {
290         _relatedResourceList.clear();
291     } //-- void clearRelatedResource() 
292 
293     /***
294      * Method clearSubject
295      */
296     public void clearSubject()
297     {
298         _subjectList.clear();
299     } //-- void clearSubject() 
300 
301     /***
302      * Method clearType
303      */
304     public void clearType()
305     {
306         _typeList.clear();
307     } //-- void clearType() 
308 
309     /***
310      * Method enumerateContentLevel
311      */
312     public java.util.Enumeration enumerateContentLevel()
313     {
314         return new org.exolab.castor.util.IteratorEnumeration(_contentLevelList.iterator());
315     } //-- java.util.Enumeration enumerateContentLevel() 
316 
317     /***
318      * Method enumerateLogicalIdentifier
319      */
320     public java.util.Enumeration enumerateLogicalIdentifier()
321     {
322         return new org.exolab.castor.util.IteratorEnumeration(_logicalIdentifierList.iterator());
323     } //-- java.util.Enumeration enumerateLogicalIdentifier() 
324 
325     /***
326      * Method enumerateRelatedResource
327      */
328     public java.util.Enumeration enumerateRelatedResource()
329     {
330         return new org.exolab.castor.util.IteratorEnumeration(_relatedResourceList.iterator());
331     } //-- java.util.Enumeration enumerateRelatedResource() 
332 
333     /***
334      * Method enumerateSubject
335      */
336     public java.util.Enumeration enumerateSubject()
337     {
338         return new org.exolab.castor.util.IteratorEnumeration(_subjectList.iterator());
339     } //-- java.util.Enumeration enumerateSubject() 
340 
341     /***
342      * Method enumerateType
343      */
344     public java.util.Enumeration enumerateType()
345     {
346         return new org.exolab.castor.util.IteratorEnumeration(_typeList.iterator());
347     } //-- java.util.Enumeration enumerateType() 
348 
349     /***
350      * Note: hashCode() has not been overriden
351      * 
352      * @param obj
353      */
354     public boolean equals(java.lang.Object obj)
355     {
356         if ( this == obj )
357             return true;
358         
359         if (super.equals(obj)==false)
360             return false;
361         
362         if (obj instanceof ResourceType) {
363         
364             ResourceType temp = (ResourceType)obj;
365             if (this._created != null) {
366                 if (temp._created == null) return false;
367                 else if (!(this._created.equals(temp._created))) 
368                     return false;
369             }
370             else if (temp._created != null)
371                 return false;
372             if (this._updated != null) {
373                 if (temp._updated == null) return false;
374                 else if (!(this._updated.equals(temp._updated))) 
375                     return false;
376             }
377             else if (temp._updated != null)
378                 return false;
379             if (this._status != null) {
380                 if (temp._status == null) return false;
381                 else if (!(this._status.equals(temp._status))) 
382                     return false;
383             }
384             else if (temp._status != null)
385                 return false;
386             if (this._identifier != null) {
387                 if (temp._identifier == null) return false;
388                 else if (!(this._identifier.equals(temp._identifier))) 
389                     return false;
390             }
391             else if (temp._identifier != null)
392                 return false;
393             if (this._title != null) {
394                 if (temp._title == null) return false;
395                 else if (!(this._title.equals(temp._title))) 
396                     return false;
397             }
398             else if (temp._title != null)
399                 return false;
400             if (this._shortName != null) {
401                 if (temp._shortName == null) return false;
402                 else if (!(this._shortName.equals(temp._shortName))) 
403                     return false;
404             }
405             else if (temp._shortName != null)
406                 return false;
407             if (this._summary != null) {
408                 if (temp._summary == null) return false;
409                 else if (!(this._summary.equals(temp._summary))) 
410                     return false;
411             }
412             else if (temp._summary != null)
413                 return false;
414             if (this._typeList != null) {
415                 if (temp._typeList == null) return false;
416                 else if (!(this._typeList.equals(temp._typeList))) 
417                     return false;
418             }
419             else if (temp._typeList != null)
420                 return false;
421             if (this._relatedResourceList != null) {
422                 if (temp._relatedResourceList == null) return false;
423                 else if (!(this._relatedResourceList.equals(temp._relatedResourceList))) 
424                     return false;
425             }
426             else if (temp._relatedResourceList != null)
427                 return false;
428             if (this._logicalIdentifierList != null) {
429                 if (temp._logicalIdentifierList == null) return false;
430                 else if (!(this._logicalIdentifierList.equals(temp._logicalIdentifierList))) 
431                     return false;
432             }
433             else if (temp._logicalIdentifierList != null)
434                 return false;
435             if (this._curation != null) {
436                 if (temp._curation == null) return false;
437                 else if (!(this._curation.equals(temp._curation))) 
438                     return false;
439             }
440             else if (temp._curation != null)
441                 return false;
442             if (this._subjectList != null) {
443                 if (temp._subjectList == null) return false;
444                 else if (!(this._subjectList.equals(temp._subjectList))) 
445                     return false;
446             }
447             else if (temp._subjectList != null)
448                 return false;
449             if (this._contentLevelList != null) {
450                 if (temp._contentLevelList == null) return false;
451                 else if (!(this._contentLevelList.equals(temp._contentLevelList))) 
452                     return false;
453             }
454             else if (temp._contentLevelList != null)
455                 return false;
456             return true;
457         }
458         return false;
459     } //-- boolean equals(java.lang.Object) 
460 
461     /***
462      * Method getContentLevel
463      * 
464      * @param index
465      */
466     public org.astrogrid.registry.beans.resource.types.ContentLevelType getContentLevel(int index)
467         throws java.lang.IndexOutOfBoundsException
468     {
469         //-- check bounds for index
470         if ((index < 0) || (index > _contentLevelList.size())) {
471             throw new IndexOutOfBoundsException();
472         }
473         
474         return (org.astrogrid.registry.beans.resource.types.ContentLevelType) _contentLevelList.get(index);
475     } //-- org.astrogrid.registry.beans.resource.types.ContentLevelType getContentLevel(int) 
476 
477     /***
478      * Method getContentLevel
479      */
480     public org.astrogrid.registry.beans.resource.types.ContentLevelType[] getContentLevel()
481     {
482         int size = _contentLevelList.size();
483         org.astrogrid.registry.beans.resource.types.ContentLevelType[] mArray = new org.astrogrid.registry.beans.resource.types.ContentLevelType[size];
484         for (int index = 0; index < size; index++) {
485             mArray[index] = (org.astrogrid.registry.beans.resource.types.ContentLevelType) _contentLevelList.get(index);
486         }
487         return mArray;
488     } //-- org.astrogrid.registry.beans.resource.types.ContentLevelType[] getContentLevel() 
489 
490     /***
491      * Method getContentLevelCount
492      */
493     public int getContentLevelCount()
494     {
495         return _contentLevelList.size();
496     } //-- int getContentLevelCount() 
497 
498     /***
499      * Returns the value of field 'created'. The field 'created'
500      * has the following description: The date this resource
501      * metadata description was created.
502      *  
503      * 
504      * @return the value of field 'created'.
505      */
506     public java.util.Date getCreated()
507     {
508         return this._created;
509     } //-- java.util.Date getCreated() 
510 
511     /***
512      * Returns the value of field 'curation'. The field 'curation'
513      * has the following description: Information regarding the
514      * general curation of the resource
515      *  
516      * 
517      * @return the value of field 'curation'.
518      */
519     public org.astrogrid.registry.beans.resource.CurationType getCuration()
520     {
521         return this._curation;
522     } //-- org.astrogrid.registry.beans.resource.CurationType getCuration() 
523 
524     /***
525      * Returns the value of field 'identifier'. The field
526      * 'identifier' has the following description: Unambiguous
527      * reference to the resource conforming to the IVOA
528      *  standard for identifiers
529      *  
530      * 
531      * @return the value of field 'identifier'.
532      */
533     public org.astrogrid.registry.beans.resource.IdentifierType getIdentifier()
534     {
535         return this._identifier;
536     } //-- org.astrogrid.registry.beans.resource.IdentifierType getIdentifier() 
537 
538     /***
539      * Method getLogicalIdentifier
540      * 
541      * @param index
542      */
543     public org.astrogrid.registry.beans.resource.LogicalIdentifierType getLogicalIdentifier(int index)
544         throws java.lang.IndexOutOfBoundsException
545     {
546         //-- check bounds for index
547         if ((index < 0) || (index > _logicalIdentifierList.size())) {
548             throw new IndexOutOfBoundsException();
549         }
550         
551         return (org.astrogrid.registry.beans.resource.LogicalIdentifierType) _logicalIdentifierList.get(index);
552     } //-- org.astrogrid.registry.beans.resource.LogicalIdentifierType getLogicalIdentifier(int) 
553 
554     /***
555      * Method getLogicalIdentifier
556      */
557     public org.astrogrid.registry.beans.resource.LogicalIdentifierType[] getLogicalIdentifier()
558     {
559         int size = _logicalIdentifierList.size();
560         org.astrogrid.registry.beans.resource.LogicalIdentifierType[] mArray = new org.astrogrid.registry.beans.resource.LogicalIdentifierType[size];
561         for (int index = 0; index < size; index++) {
562             mArray[index] = (org.astrogrid.registry.beans.resource.LogicalIdentifierType) _logicalIdentifierList.get(index);
563         }
564         return mArray;
565     } //-- org.astrogrid.registry.beans.resource.LogicalIdentifierType[] getLogicalIdentifier() 
566 
567     /***
568      * Method getLogicalIdentifierCount
569      */
570     public int getLogicalIdentifierCount()
571     {
572         return _logicalIdentifierList.size();
573     } //-- int getLogicalIdentifierCount() 
574 
575     /***
576      * Method getRelatedResource
577      * 
578      * @param index
579      */
580     public org.astrogrid.registry.beans.resource.RelatedResourceType getRelatedResource(int index)
581         throws java.lang.IndexOutOfBoundsException
582     {
583         //-- check bounds for index
584         if ((index < 0) || (index > _relatedResourceList.size())) {
585             throw new IndexOutOfBoundsException();
586         }
587         
588         return (org.astrogrid.registry.beans.resource.RelatedResourceType) _relatedResourceList.get(index);
589     } //-- org.astrogrid.registry.beans.resource.RelatedResourceType getRelatedResource(int) 
590 
591     /***
592      * Method getRelatedResource
593      */
594     public org.astrogrid.registry.beans.resource.RelatedResourceType[] getRelatedResource()
595     {
596         int size = _relatedResourceList.size();
597         org.astrogrid.registry.beans.resource.RelatedResourceType[] mArray = new org.astrogrid.registry.beans.resource.RelatedResourceType[size];
598         for (int index = 0; index < size; index++) {
599             mArray[index] = (org.astrogrid.registry.beans.resource.RelatedResourceType) _relatedResourceList.get(index);
600         }
601         return mArray;
602     } //-- org.astrogrid.registry.beans.resource.RelatedResourceType[] getRelatedResource() 
603 
604     /***
605      * Method getRelatedResourceCount
606      */
607     public int getRelatedResourceCount()
608     {
609         return _relatedResourceList.size();
610     } //-- int getRelatedResourceCount() 
611 
612     /***
613      * Returns the value of field 'shortName'. The field
614      * 'shortName' has the following description: a short name or
615      * abbreviation for this resource that applications 
616      *  may use to refer to this resource in a compact display. 
617      *  
618      * 
619      * @return the value of field 'shortName'.
620      */
621     public java.lang.String getShortName()
622     {
623         return this._shortName;
624     } //-- java.lang.String getShortName() 
625 
626     /***
627      * Returns the value of field 'status'. The field 'status' has
628      * the following description: a tag indicating whether this
629      * resource is believed to be still
630      *  actively maintained.
631      *  
632      * 
633      * @return the value of field 'status'.
634      */
635     public org.astrogrid.registry.beans.resource.types.ResourceTypeStatusType getStatus()
636     {
637         return this._status;
638     } //-- org.astrogrid.registry.beans.resource.types.ResourceTypeStatusType getStatus() 
639 
640     /***
641      * Method getSubject
642      * 
643      * @param index
644      */
645     public java.lang.String getSubject(int index)
646         throws java.lang.IndexOutOfBoundsException
647     {
648         //-- check bounds for index
649         if ((index < 0) || (index > _subjectList.size())) {
650             throw new IndexOutOfBoundsException();
651         }
652         
653         return (String)_subjectList.get(index);
654     } //-- java.lang.String getSubject(int) 
655 
656     /***
657      * Method getSubject
658      */
659     public java.lang.String[] getSubject()
660     {
661         int size = _subjectList.size();
662         java.lang.String[] mArray = new java.lang.String[size];
663         for (int index = 0; index < size; index++) {
664             mArray[index] = (String)_subjectList.get(index);
665         }
666         return mArray;
667     } //-- java.lang.String[] getSubject() 
668 
669     /***
670      * Method getSubjectCount
671      */
672     public int getSubjectCount()
673     {
674         return _subjectList.size();
675     } //-- int getSubjectCount() 
676 
677     /***
678      * Returns the value of field 'summary'. The field 'summary'
679      * has the following description: An informational,
680      * human-readable overview of a resource.
681      *  
682      * 
683      * @return the value of field 'summary'.
684      */
685     public org.astrogrid.registry.beans.resource.SummaryType getSummary()
686     {
687         return this._summary;
688     } //-- org.astrogrid.registry.beans.resource.SummaryType getSummary() 
689 
690     /***
691      * Returns the value of field 'title'. The field 'title' has
692      * the following description: the full name of a resource
693      * 
694      * @return the value of field 'title'.
695      */
696     public java.lang.String getTitle()
697     {
698         return this._title;
699     } //-- java.lang.String getTitle() 
700 
701     /***
702      * Method getType
703      * 
704      * @param index
705      */
706     public org.astrogrid.registry.beans.resource.types.CategoryType getType(int index)
707         throws java.lang.IndexOutOfBoundsException
708     {
709         //-- check bounds for index
710         if ((index < 0) || (index > _typeList.size())) {
711             throw new IndexOutOfBoundsException();
712         }
713         
714         return (org.astrogrid.registry.beans.resource.types.CategoryType) _typeList.get(index);
715     } //-- org.astrogrid.registry.beans.resource.types.CategoryType getType(int) 
716 
717     /***
718      * Method getType
719      */
720     public org.astrogrid.registry.beans.resource.types.CategoryType[] getType()
721     {
722         int size = _typeList.size();
723         org.astrogrid.registry.beans.resource.types.CategoryType[] mArray = new org.astrogrid.registry.beans.resource.types.CategoryType[size];
724         for (int index = 0; index < size; index++) {
725             mArray[index] = (org.astrogrid.registry.beans.resource.types.CategoryType) _typeList.get(index);
726         }
727         return mArray;
728     } //-- org.astrogrid.registry.beans.resource.types.CategoryType[] getType() 
729 
730     /***
731      * Method getTypeCount
732      */
733     public int getTypeCount()
734     {
735         return _typeList.size();
736     } //-- int getTypeCount() 
737 
738     /***
739      * Returns the value of field 'updated'. The field 'updated'
740      * has the following description: The date this resource
741      * metadata description was last updated.
742      *  
743      * 
744      * @return the value of field 'updated'.
745      */
746     public java.util.Date getUpdated()
747     {
748         return this._updated;
749     } //-- java.util.Date getUpdated() 
750 
751     /***
752      * Method isValid
753      */
754     public boolean isValid()
755     {
756         try {
757             validate();
758         }
759         catch (org.exolab.castor.xml.ValidationException vex) {
760             return false;
761         }
762         return true;
763     } //-- boolean isValid() 
764 
765     /***
766      * Method marshal
767      * 
768      * @param out
769      */
770     public void marshal(java.io.Writer out)
771         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
772     {
773         
774         Marshaller.marshal(this, out);
775     } //-- void marshal(java.io.Writer) 
776 
777     /***
778      * Method marshal
779      * 
780      * @param handler
781      */
782     public void marshal(org.xml.sax.ContentHandler handler)
783         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
784     {
785         
786         Marshaller.marshal(this, handler);
787     } //-- void marshal(org.xml.sax.ContentHandler) 
788 
789     /***
790      * Method removeContentLevel
791      * 
792      * @param vContentLevel
793      */
794     public boolean removeContentLevel(org.astrogrid.registry.beans.resource.types.ContentLevelType vContentLevel)
795     {
796         boolean removed = _contentLevelList.remove(vContentLevel);
797         return removed;
798     } //-- boolean removeContentLevel(org.astrogrid.registry.beans.resource.types.ContentLevelType) 
799 
800     /***
801      * Method removeLogicalIdentifier
802      * 
803      * @param vLogicalIdentifier
804      */
805     public boolean removeLogicalIdentifier(org.astrogrid.registry.beans.resource.LogicalIdentifierType vLogicalIdentifier)
806     {
807         boolean removed = _logicalIdentifierList.remove(vLogicalIdentifier);
808         return removed;
809     } //-- boolean removeLogicalIdentifier(org.astrogrid.registry.beans.resource.LogicalIdentifierType) 
810 
811     /***
812      * Method removeRelatedResource
813      * 
814      * @param vRelatedResource
815      */
816     public boolean removeRelatedResource(org.astrogrid.registry.beans.resource.RelatedResourceType vRelatedResource)
817     {
818         boolean removed = _relatedResourceList.remove(vRelatedResource);
819         return removed;
820     } //-- boolean removeRelatedResource(org.astrogrid.registry.beans.resource.RelatedResourceType) 
821 
822     /***
823      * Method removeSubject
824      * 
825      * @param vSubject
826      */
827     public boolean removeSubject(java.lang.String vSubject)
828     {
829         boolean removed = _subjectList.remove(vSubject);
830         return removed;
831     } //-- boolean removeSubject(java.lang.String) 
832 
833     /***
834      * Method removeType
835      * 
836      * @param vType
837      */
838     public boolean removeType(org.astrogrid.registry.beans.resource.types.CategoryType vType)
839     {
840         boolean removed = _typeList.remove(vType);
841         return removed;
842     } //-- boolean removeType(org.astrogrid.registry.beans.resource.types.CategoryType) 
843 
844     /***
845      * Method setContentLevel
846      * 
847      * @param index
848      * @param vContentLevel
849      */
850     public void setContentLevel(int index, org.astrogrid.registry.beans.resource.types.ContentLevelType vContentLevel)
851         throws java.lang.IndexOutOfBoundsException
852     {
853         //-- check bounds for index
854         if ((index < 0) || (index > _contentLevelList.size())) {
855             throw new IndexOutOfBoundsException();
856         }
857         _contentLevelList.set(index, vContentLevel);
858     } //-- void setContentLevel(int, org.astrogrid.registry.beans.resource.types.ContentLevelType) 
859 
860     /***
861      * Method setContentLevel
862      * 
863      * @param contentLevelArray
864      */
865     public void setContentLevel(org.astrogrid.registry.beans.resource.types.ContentLevelType[] contentLevelArray)
866     {
867         //-- copy array
868         _contentLevelList.clear();
869         for (int i = 0; i < contentLevelArray.length; i++) {
870             _contentLevelList.add(contentLevelArray[i]);
871         }
872     } //-- void setContentLevel(org.astrogrid.registry.beans.resource.types.ContentLevelType) 
873 
874     /***
875      * Sets the value of field 'created'. The field 'created' has
876      * the following description: The date this resource metadata
877      * description was created.
878      *  
879      * 
880      * @param created the value of field 'created'.
881      */
882     public void setCreated(java.util.Date created)
883     {
884         this._created = created;
885     } //-- void setCreated(java.util.Date) 
886 
887     /***
888      * Sets the value of field 'curation'. The field 'curation' has
889      * the following description: Information regarding the general
890      * curation of the resource
891      *  
892      * 
893      * @param curation the value of field 'curation'.
894      */
895     public void setCuration(org.astrogrid.registry.beans.resource.CurationType curation)
896     {
897         this._curation = curation;
898     } //-- void setCuration(org.astrogrid.registry.beans.resource.CurationType) 
899 
900     /***
901      * Sets the value of field 'identifier'. The field 'identifier'
902      * has the following description: Unambiguous reference to the
903      * resource conforming to the IVOA
904      *  standard for identifiers
905      *  
906      * 
907      * @param identifier the value of field 'identifier'.
908      */
909     public void setIdentifier(org.astrogrid.registry.beans.resource.IdentifierType identifier)
910     {
911         this._identifier = identifier;
912     } //-- void setIdentifier(org.astrogrid.registry.beans.resource.IdentifierType) 
913 
914     /***
915      * Method setLogicalIdentifier
916      * 
917      * @param index
918      * @param vLogicalIdentifier
919      */
920     public void setLogicalIdentifier(int index, org.astrogrid.registry.beans.resource.LogicalIdentifierType vLogicalIdentifier)
921         throws java.lang.IndexOutOfBoundsException
922     {
923         //-- check bounds for index
924         if ((index < 0) || (index > _logicalIdentifierList.size())) {
925             throw new IndexOutOfBoundsException();
926         }
927         _logicalIdentifierList.set(index, vLogicalIdentifier);
928     } //-- void setLogicalIdentifier(int, org.astrogrid.registry.beans.resource.LogicalIdentifierType) 
929 
930     /***
931      * Method setLogicalIdentifier
932      * 
933      * @param logicalIdentifierArray
934      */
935     public void setLogicalIdentifier(org.astrogrid.registry.beans.resource.LogicalIdentifierType[] logicalIdentifierArray)
936     {
937         //-- copy array
938         _logicalIdentifierList.clear();
939         for (int i = 0; i < logicalIdentifierArray.length; i++) {
940             _logicalIdentifierList.add(logicalIdentifierArray[i]);
941         }
942     } //-- void setLogicalIdentifier(org.astrogrid.registry.beans.resource.LogicalIdentifierType) 
943 
944     /***
945      * Method setRelatedResource
946      * 
947      * @param index
948      * @param vRelatedResource
949      */
950     public void setRelatedResource(int index, org.astrogrid.registry.beans.resource.RelatedResourceType vRelatedResource)
951         throws java.lang.IndexOutOfBoundsException
952     {
953         //-- check bounds for index
954         if ((index < 0) || (index > _relatedResourceList.size())) {
955             throw new IndexOutOfBoundsException();
956         }
957         _relatedResourceList.set(index, vRelatedResource);
958     } //-- void setRelatedResource(int, org.astrogrid.registry.beans.resource.RelatedResourceType) 
959 
960     /***
961      * Method setRelatedResource
962      * 
963      * @param relatedResourceArray
964      */
965     public void setRelatedResource(org.astrogrid.registry.beans.resource.RelatedResourceType[] relatedResourceArray)
966     {
967         //-- copy array
968         _relatedResourceList.clear();
969         for (int i = 0; i < relatedResourceArray.length; i++) {
970             _relatedResourceList.add(relatedResourceArray[i]);
971         }
972     } //-- void setRelatedResource(org.astrogrid.registry.beans.resource.RelatedResourceType) 
973 
974     /***
975      * Sets the value of field 'shortName'. The field 'shortName'
976      * has the following description: a short name or abbreviation
977      * for this resource that applications 
978      *  may use to refer to this resource in a compact display. 
979      *  
980      * 
981      * @param shortName the value of field 'shortName'.
982      */
983     public void setShortName(java.lang.String shortName)
984     {
985         this._shortName = shortName;
986     } //-- void setShortName(java.lang.String) 
987 
988     /***
989      * Sets the value of field 'status'. The field 'status' has the
990      * following description: a tag indicating whether this
991      * resource is believed to be still
992      *  actively maintained.
993      *  
994      * 
995      * @param status the value of field 'status'.
996      */
997     public void setStatus(org.astrogrid.registry.beans.resource.types.ResourceTypeStatusType status)
998     {
999         this._status = status;
1000     } //-- void setStatus(org.astrogrid.registry.beans.resource.types.ResourceTypeStatusType) 
1001 
1002     /***
1003      * Method setSubject
1004      * 
1005      * @param index
1006      * @param vSubject
1007      */
1008     public void setSubject(int index, java.lang.String vSubject)
1009         throws java.lang.IndexOutOfBoundsException
1010     {
1011         //-- check bounds for index
1012         if ((index < 0) || (index > _subjectList.size())) {
1013             throw new IndexOutOfBoundsException();
1014         }
1015         _subjectList.set(index, vSubject);
1016     } //-- void setSubject(int, java.lang.String) 
1017 
1018     /***
1019      * Method setSubject
1020      * 
1021      * @param subjectArray
1022      */
1023     public void setSubject(java.lang.String[] subjectArray)
1024     {
1025         //-- copy array
1026         _subjectList.clear();
1027         for (int i = 0; i < subjectArray.length; i++) {
1028             _subjectList.add(subjectArray[i]);
1029         }
1030     } //-- void setSubject(java.lang.String) 
1031 
1032     /***
1033      * Sets the value of field 'summary'. The field 'summary' has
1034      * the following description: An informational, human-readable
1035      * overview of a resource.
1036      *  
1037      * 
1038      * @param summary the value of field 'summary'.
1039      */
1040     public void setSummary(org.astrogrid.registry.beans.resource.SummaryType summary)
1041     {
1042         this._summary = summary;
1043     } //-- void setSummary(org.astrogrid.registry.beans.resource.SummaryType) 
1044 
1045     /***
1046      * Sets the value of field 'title'. The field 'title' has the
1047      * following description: the full name of a resource
1048      * 
1049      * @param title the value of field 'title'.
1050      */
1051     public void setTitle(java.lang.String title)
1052     {
1053         this._title = title;
1054     } //-- void setTitle(java.lang.String) 
1055 
1056     /***
1057      * Method setType
1058      * 
1059      * @param index
1060      * @param vType
1061      */
1062     public void setType(int index, org.astrogrid.registry.beans.resource.types.CategoryType vType)
1063         throws java.lang.IndexOutOfBoundsException
1064     {
1065         //-- check bounds for index
1066         if ((index < 0) || (index > _typeList.size())) {
1067             throw new IndexOutOfBoundsException();
1068         }
1069         _typeList.set(index, vType);
1070     } //-- void setType(int, org.astrogrid.registry.beans.resource.types.CategoryType) 
1071 
1072     /***
1073      * Method setType
1074      * 
1075      * @param typeArray
1076      */
1077     public void setType(org.astrogrid.registry.beans.resource.types.CategoryType[] typeArray)
1078     {
1079         //-- copy array
1080         _typeList.clear();
1081         for (int i = 0; i < typeArray.length; i++) {
1082             _typeList.add(typeArray[i]);
1083         }
1084     } //-- void setType(org.astrogrid.registry.beans.resource.types.CategoryType) 
1085 
1086     /***
1087      * Sets the value of field 'updated'. The field 'updated' has
1088      * the following description: The date this resource metadata
1089      * description was last updated.
1090      *  
1091      * 
1092      * @param updated the value of field 'updated'.
1093      */
1094     public void setUpdated(java.util.Date updated)
1095     {
1096         this._updated = updated;
1097     } //-- void setUpdated(java.util.Date) 
1098 
1099     /***
1100      * Method unmarshalResourceType
1101      * 
1102      * @param reader
1103      */
1104     public static org.astrogrid.registry.beans.resource.ResourceType unmarshalResourceType(java.io.Reader reader)
1105         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
1106     {
1107         return (org.astrogrid.registry.beans.resource.ResourceType) Unmarshaller.unmarshal(org.astrogrid.registry.beans.resource.ResourceType.class, reader);
1108     } //-- org.astrogrid.registry.beans.resource.ResourceType unmarshalResourceType(java.io.Reader) 
1109 
1110     /***
1111      * Method validate
1112      */
1113     public void validate()
1114         throws org.exolab.castor.xml.ValidationException
1115     {
1116         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1117         validator.validate(this);
1118     } //-- void validate() 
1119 
1120 }