changed sourcegenerator destination package
[vamsas.git] / src / org / vamsas / objects / core / SequenceSetAnnotations.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 0.9.9M1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package org.vamsas.objects.core;
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.Enumeration;
19 import java.util.Vector;
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  * Class SequenceSetAnnotations.
28  * 
29  * @version $Revision$ $Date$
30  */
31 public class SequenceSetAnnotations extends org.vamsas.client.object 
32 implements java.io.Serializable
33 {
34
35
36       //--------------------------/
37      //- Class/Member Variables -/
38     //--------------------------/
39
40     /**
41      * Field _type
42      */
43     private java.lang.String _type;
44
45     /**
46      * Field _end
47      */
48     private java.lang.String _end;
49
50     /**
51      * Field _begin
52      */
53     private java.lang.String _begin;
54
55     /**
56      * Field _seqRef
57      */
58     private java.lang.Object _seqRef;
59
60     /**
61      * Field _description
62      */
63     private java.lang.String _description;
64
65     /**
66      * Field _status
67      */
68     private java.lang.String _status;
69
70     /**
71      * Field _annotationElementList
72      */
73     private java.util.Vector _annotationElementList;
74
75     /**
76      * Field _provenance
77      */
78     private org.vamsas.objects.core.Provenance _provenance;
79
80
81       //----------------/
82      //- Constructors -/
83     //----------------/
84
85     public SequenceSetAnnotations() 
86      {
87         super();
88         _annotationElementList = new Vector();
89     } //-- org.vamsas.objects.core.SequenceSetAnnotations()
90
91
92       //-----------/
93      //- Methods -/
94     //-----------/
95
96     /**
97      * Method addAnnotationElement
98      * 
99      * 
100      * 
101      * @param vAnnotationElement
102      */
103     public void addAnnotationElement(org.vamsas.objects.core.AnnotationElement vAnnotationElement)
104         throws java.lang.IndexOutOfBoundsException
105     {
106         _annotationElementList.addElement(vAnnotationElement);
107     } //-- void addAnnotationElement(org.vamsas.objects.core.AnnotationElement) 
108
109     /**
110      * Method addAnnotationElement
111      * 
112      * 
113      * 
114      * @param index
115      * @param vAnnotationElement
116      */
117     public void addAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement)
118         throws java.lang.IndexOutOfBoundsException
119     {
120         _annotationElementList.insertElementAt(vAnnotationElement, index);
121     } //-- void addAnnotationElement(int, org.vamsas.objects.core.AnnotationElement) 
122
123     /**
124      * Method enumerateAnnotationElement
125      * 
126      * 
127      * 
128      * @return Enumeration
129      */
130     public java.util.Enumeration enumerateAnnotationElement()
131     {
132         return _annotationElementList.elements();
133     } //-- java.util.Enumeration enumerateAnnotationElement() 
134
135     /**
136      * Note: hashCode() has not been overriden
137      * 
138      * @param obj
139      * @return boolean
140      */
141     public boolean equals(java.lang.Object obj)
142     {
143         if ( this == obj )
144             return true;
145         
146         if (super.equals(obj)==false)
147             return false;
148         
149         if (obj instanceof SequenceSetAnnotations) {
150         
151             SequenceSetAnnotations temp = (SequenceSetAnnotations)obj;
152             if (this._type != null) {
153                 if (temp._type == null) return false;
154                 else if (!(this._type.equals(temp._type))) 
155                     return false;
156             }
157             else if (temp._type != null)
158                 return false;
159             if (this._end != null) {
160                 if (temp._end == null) return false;
161                 else if (!(this._end.equals(temp._end))) 
162                     return false;
163             }
164             else if (temp._end != null)
165                 return false;
166             if (this._begin != null) {
167                 if (temp._begin == null) return false;
168                 else if (!(this._begin.equals(temp._begin))) 
169                     return false;
170             }
171             else if (temp._begin != null)
172                 return false;
173             if (this._seqRef != null) {
174                 if (temp._seqRef == null) return false;
175                 else if (!(this._seqRef.equals(temp._seqRef))) 
176                     return false;
177             }
178             else if (temp._seqRef != null)
179                 return false;
180             if (this._description != null) {
181                 if (temp._description == null) return false;
182                 else if (!(this._description.equals(temp._description))) 
183                     return false;
184             }
185             else if (temp._description != null)
186                 return false;
187             if (this._status != null) {
188                 if (temp._status == null) return false;
189                 else if (!(this._status.equals(temp._status))) 
190                     return false;
191             }
192             else if (temp._status != null)
193                 return false;
194             if (this._annotationElementList != null) {
195                 if (temp._annotationElementList == null) return false;
196                 else if (!(this._annotationElementList.equals(temp._annotationElementList))) 
197                     return false;
198             }
199             else if (temp._annotationElementList != null)
200                 return false;
201             if (this._provenance != null) {
202                 if (temp._provenance == null) return false;
203                 else if (!(this._provenance.equals(temp._provenance))) 
204                     return false;
205             }
206             else if (temp._provenance != null)
207                 return false;
208             return true;
209         }
210         return false;
211     } //-- boolean equals(java.lang.Object) 
212
213     /**
214      * Method getAnnotationElement
215      * 
216      * 
217      * 
218      * @param index
219      * @return AnnotationElement
220      */
221     public org.vamsas.objects.core.AnnotationElement getAnnotationElement(int index)
222         throws java.lang.IndexOutOfBoundsException
223     {
224         //-- check bounds for index
225         if ((index < 0) || (index > _annotationElementList.size())) {
226             throw new IndexOutOfBoundsException("getAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]");
227         }
228         
229         return (org.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index);
230     } //-- org.vamsas.objects.core.AnnotationElement getAnnotationElement(int) 
231
232     /**
233      * Method getAnnotationElement
234      * 
235      * 
236      * 
237      * @return AnnotationElement
238      */
239     public org.vamsas.objects.core.AnnotationElement[] getAnnotationElement()
240     {
241         int size = _annotationElementList.size();
242         org.vamsas.objects.core.AnnotationElement[] mArray = new org.vamsas.objects.core.AnnotationElement[size];
243         for (int index = 0; index < size; index++) {
244             mArray[index] = (org.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index);
245         }
246         return mArray;
247     } //-- org.vamsas.objects.core.AnnotationElement[] getAnnotationElement() 
248
249     /**
250      * Method getAnnotationElementCount
251      * 
252      * 
253      * 
254      * @return int
255      */
256     public int getAnnotationElementCount()
257     {
258         return _annotationElementList.size();
259     } //-- int getAnnotationElementCount() 
260
261     /**
262      * Returns the value of field 'begin'.
263      * 
264      * @return String
265      * @return the value of field 'begin'.
266      */
267     public java.lang.String getBegin()
268     {
269         return this._begin;
270     } //-- java.lang.String getBegin() 
271
272     /**
273      * Returns the value of field 'description'.
274      * 
275      * @return String
276      * @return the value of field 'description'.
277      */
278     public java.lang.String getDescription()
279     {
280         return this._description;
281     } //-- java.lang.String getDescription() 
282
283     /**
284      * Returns the value of field 'end'.
285      * 
286      * @return String
287      * @return the value of field 'end'.
288      */
289     public java.lang.String getEnd()
290     {
291         return this._end;
292     } //-- java.lang.String getEnd() 
293
294     /**
295      * Returns the value of field 'provenance'.
296      * 
297      * @return Provenance
298      * @return the value of field 'provenance'.
299      */
300     public org.vamsas.objects.core.Provenance getProvenance()
301     {
302         return this._provenance;
303     } //-- org.vamsas.objects.core.Provenance getProvenance() 
304
305     /**
306      * Returns the value of field 'seqRef'.
307      * 
308      * @return Object
309      * @return the value of field 'seqRef'.
310      */
311     public java.lang.Object getSeqRef()
312     {
313         return this._seqRef;
314     } //-- java.lang.Object getSeqRef() 
315
316     /**
317      * Returns the value of field 'status'.
318      * 
319      * @return String
320      * @return the value of field 'status'.
321      */
322     public java.lang.String getStatus()
323     {
324         return this._status;
325     } //-- java.lang.String getStatus() 
326
327     /**
328      * Returns the value of field 'type'.
329      * 
330      * @return String
331      * @return the value of field 'type'.
332      */
333     public java.lang.String getType()
334     {
335         return this._type;
336     } //-- java.lang.String getType() 
337
338     /**
339      * Method isValid
340      * 
341      * 
342      * 
343      * @return boolean
344      */
345     public boolean isValid()
346     {
347         try {
348             validate();
349         }
350         catch (org.exolab.castor.xml.ValidationException vex) {
351             return false;
352         }
353         return true;
354     } //-- boolean isValid() 
355
356     /**
357      * Method marshal
358      * 
359      * 
360      * 
361      * @param out
362      */
363     public void marshal(java.io.Writer out)
364         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
365     {
366         
367         Marshaller.marshal(this, out);
368     } //-- void marshal(java.io.Writer) 
369
370     /**
371      * Method marshal
372      * 
373      * 
374      * 
375      * @param handler
376      */
377     public void marshal(org.xml.sax.ContentHandler handler)
378         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
379     {
380         
381         Marshaller.marshal(this, handler);
382     } //-- void marshal(org.xml.sax.ContentHandler) 
383
384     /**
385      * Method removeAllAnnotationElement
386      * 
387      */
388     public void removeAllAnnotationElement()
389     {
390         _annotationElementList.removeAllElements();
391     } //-- void removeAllAnnotationElement() 
392
393     /**
394      * Method removeAnnotationElement
395      * 
396      * 
397      * 
398      * @param index
399      * @return AnnotationElement
400      */
401     public org.vamsas.objects.core.AnnotationElement removeAnnotationElement(int index)
402     {
403         java.lang.Object obj = _annotationElementList.elementAt(index);
404         _annotationElementList.removeElementAt(index);
405         return (org.vamsas.objects.core.AnnotationElement) obj;
406     } //-- org.vamsas.objects.core.AnnotationElement removeAnnotationElement(int) 
407
408     /**
409      * Method setAnnotationElement
410      * 
411      * 
412      * 
413      * @param index
414      * @param vAnnotationElement
415      */
416     public void setAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement)
417         throws java.lang.IndexOutOfBoundsException
418     {
419         //-- check bounds for index
420         if ((index < 0) || (index > _annotationElementList.size())) {
421             throw new IndexOutOfBoundsException("setAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]");
422         }
423         _annotationElementList.setElementAt(vAnnotationElement, index);
424     } //-- void setAnnotationElement(int, org.vamsas.objects.core.AnnotationElement) 
425
426     /**
427      * Method setAnnotationElement
428      * 
429      * 
430      * 
431      * @param annotationElementArray
432      */
433     public void setAnnotationElement(org.vamsas.objects.core.AnnotationElement[] annotationElementArray)
434     {
435         //-- copy array
436         _annotationElementList.removeAllElements();
437         for (int i = 0; i < annotationElementArray.length; i++) {
438             _annotationElementList.addElement(annotationElementArray[i]);
439         }
440     } //-- void setAnnotationElement(org.vamsas.objects.core.AnnotationElement) 
441
442     /**
443      * Sets the value of field 'begin'.
444      * 
445      * @param begin the value of field 'begin'.
446      */
447     public void setBegin(java.lang.String begin)
448     {
449         this._begin = begin;
450     } //-- void setBegin(java.lang.String) 
451
452     /**
453      * Sets the value of field 'description'.
454      * 
455      * @param description the value of field 'description'.
456      */
457     public void setDescription(java.lang.String description)
458     {
459         this._description = description;
460     } //-- void setDescription(java.lang.String) 
461
462     /**
463      * Sets the value of field 'end'.
464      * 
465      * @param end the value of field 'end'.
466      */
467     public void setEnd(java.lang.String end)
468     {
469         this._end = end;
470     } //-- void setEnd(java.lang.String) 
471
472     /**
473      * Sets the value of field 'provenance'.
474      * 
475      * @param provenance the value of field 'provenance'.
476      */
477     public void setProvenance(org.vamsas.objects.core.Provenance provenance)
478     {
479         this._provenance = provenance;
480     } //-- void setProvenance(org.vamsas.objects.core.Provenance) 
481
482     /**
483      * Sets the value of field 'seqRef'.
484      * 
485      * @param seqRef the value of field 'seqRef'.
486      */
487     public void setSeqRef(java.lang.Object seqRef)
488     {
489         this._seqRef = seqRef;
490     } //-- void setSeqRef(java.lang.Object) 
491
492     /**
493      * Sets the value of field 'status'.
494      * 
495      * @param status the value of field 'status'.
496      */
497     public void setStatus(java.lang.String status)
498     {
499         this._status = status;
500     } //-- void setStatus(java.lang.String) 
501
502     /**
503      * Sets the value of field 'type'.
504      * 
505      * @param type the value of field 'type'.
506      */
507     public void setType(java.lang.String type)
508     {
509         this._type = type;
510     } //-- void setType(java.lang.String) 
511
512     /**
513      * Method unmarshal
514      * 
515      * 
516      * 
517      * @param reader
518      * @return SequenceSetAnnotations
519      */
520     public static org.vamsas.objects.core.SequenceSetAnnotations unmarshal(java.io.Reader reader)
521         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
522     {
523         return (org.vamsas.objects.core.SequenceSetAnnotations) Unmarshaller.unmarshal(org.vamsas.objects.core.SequenceSetAnnotations.class, reader);
524     } //-- org.vamsas.objects.core.SequenceSetAnnotations unmarshal(java.io.Reader) 
525
526     /**
527      * Method validate
528      * 
529      */
530     public void validate()
531         throws org.exolab.castor.xml.ValidationException
532     {
533         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
534         validator.validate(this);
535     } //-- void validate() 
536
537 }