2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 0.9.9M2</a>, using an XML
8 package org.vamsas.objects.core;
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
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;
27 * Class SequenceSetAnnotations.
29 * @version $Revision$ $Date$
31 public class SequenceSetAnnotations extends org.vamsas.client.object
32 implements java.io.Serializable
36 //--------------------------/
37 //- Class/Member Variables -/
38 //--------------------------/
43 private java.lang.String _type;
48 private java.lang.String _end;
53 private java.lang.String _begin;
58 private java.lang.Object _seqRef;
63 private java.lang.String _id;
68 private java.lang.String _description;
73 private java.lang.String _status;
76 * Field _annotationElementList
78 private java.util.Vector _annotationElementList;
83 private org.vamsas.objects.core.Provenance _provenance;
90 public SequenceSetAnnotations()
93 _annotationElementList = new Vector();
94 } //-- org.vamsas.objects.core.SequenceSetAnnotations()
102 * Method addAnnotationElement
106 * @param vAnnotationElement
108 public void addAnnotationElement(org.vamsas.objects.core.AnnotationElement vAnnotationElement)
109 throws java.lang.IndexOutOfBoundsException
111 _annotationElementList.addElement(vAnnotationElement);
112 } //-- void addAnnotationElement(org.vamsas.objects.core.AnnotationElement)
115 * Method addAnnotationElement
120 * @param vAnnotationElement
122 public void addAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement)
123 throws java.lang.IndexOutOfBoundsException
125 _annotationElementList.insertElementAt(vAnnotationElement, index);
126 } //-- void addAnnotationElement(int, org.vamsas.objects.core.AnnotationElement)
129 * Method enumerateAnnotationElement
133 * @return Enumeration
135 public java.util.Enumeration enumerateAnnotationElement()
137 return _annotationElementList.elements();
138 } //-- java.util.Enumeration enumerateAnnotationElement()
141 * Note: hashCode() has not been overriden
146 public boolean equals(java.lang.Object obj)
151 if (super.equals(obj)==false)
154 if (obj instanceof SequenceSetAnnotations) {
156 SequenceSetAnnotations temp = (SequenceSetAnnotations)obj;
157 if (this._type != null) {
158 if (temp._type == null) return false;
159 else if (!(this._type.equals(temp._type)))
162 else if (temp._type != null)
164 if (this._end != null) {
165 if (temp._end == null) return false;
166 else if (!(this._end.equals(temp._end)))
169 else if (temp._end != null)
171 if (this._begin != null) {
172 if (temp._begin == null) return false;
173 else if (!(this._begin.equals(temp._begin)))
176 else if (temp._begin != null)
178 if (this._seqRef != null) {
179 if (temp._seqRef == null) return false;
180 else if (!(this._seqRef.equals(temp._seqRef)))
183 else if (temp._seqRef != null)
185 if (this._id != null) {
186 if (temp._id == null) return false;
187 else if (!(this._id.equals(temp._id)))
190 else if (temp._id != null)
192 if (this._description != null) {
193 if (temp._description == null) return false;
194 else if (!(this._description.equals(temp._description)))
197 else if (temp._description != null)
199 if (this._status != null) {
200 if (temp._status == null) return false;
201 else if (!(this._status.equals(temp._status)))
204 else if (temp._status != null)
206 if (this._annotationElementList != null) {
207 if (temp._annotationElementList == null) return false;
208 else if (!(this._annotationElementList.equals(temp._annotationElementList)))
211 else if (temp._annotationElementList != null)
213 if (this._provenance != null) {
214 if (temp._provenance == null) return false;
215 else if (!(this._provenance.equals(temp._provenance)))
218 else if (temp._provenance != null)
223 } //-- boolean equals(java.lang.Object)
226 * Method getAnnotationElement
231 * @return AnnotationElement
233 public org.vamsas.objects.core.AnnotationElement getAnnotationElement(int index)
234 throws java.lang.IndexOutOfBoundsException
236 //-- check bounds for index
237 if ((index < 0) || (index > _annotationElementList.size())) {
238 throw new IndexOutOfBoundsException("getAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]");
241 return (org.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index);
242 } //-- org.vamsas.objects.core.AnnotationElement getAnnotationElement(int)
245 * Method getAnnotationElement
249 * @return AnnotationElement
251 public org.vamsas.objects.core.AnnotationElement[] getAnnotationElement()
253 int size = _annotationElementList.size();
254 org.vamsas.objects.core.AnnotationElement[] mArray = new org.vamsas.objects.core.AnnotationElement[size];
255 for (int index = 0; index < size; index++) {
256 mArray[index] = (org.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index);
259 } //-- org.vamsas.objects.core.AnnotationElement[] getAnnotationElement()
262 * Method getAnnotationElementCount
268 public int getAnnotationElementCount()
270 return _annotationElementList.size();
271 } //-- int getAnnotationElementCount()
274 * Returns the value of field 'begin'.
277 * @return the value of field 'begin'.
279 public java.lang.String getBegin()
282 } //-- java.lang.String getBegin()
285 * Returns the value of field 'description'.
288 * @return the value of field 'description'.
290 public java.lang.String getDescription()
292 return this._description;
293 } //-- java.lang.String getDescription()
296 * Returns the value of field 'end'.
299 * @return the value of field 'end'.
301 public java.lang.String getEnd()
304 } //-- java.lang.String getEnd()
307 * Returns the value of field 'id'.
310 * @return the value of field 'id'.
312 public java.lang.String getId()
315 } //-- java.lang.String getId()
318 * Returns the value of field 'provenance'.
321 * @return the value of field 'provenance'.
323 public org.vamsas.objects.core.Provenance getProvenance()
325 return this._provenance;
326 } //-- org.vamsas.objects.core.Provenance getProvenance()
329 * Returns the value of field 'seqRef'.
332 * @return the value of field 'seqRef'.
334 public java.lang.Object getSeqRef()
337 } //-- java.lang.Object getSeqRef()
340 * Returns the value of field 'status'.
343 * @return the value of field 'status'.
345 public java.lang.String getStatus()
348 } //-- java.lang.String getStatus()
351 * Returns the value of field 'type'.
354 * @return the value of field 'type'.
356 public java.lang.String getType()
359 } //-- java.lang.String getType()
368 public boolean isValid()
373 catch (org.exolab.castor.xml.ValidationException vex) {
377 } //-- boolean isValid()
386 public void marshal(java.io.Writer out)
387 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
390 Marshaller.marshal(this, out);
391 } //-- void marshal(java.io.Writer)
400 public void marshal(org.xml.sax.ContentHandler handler)
401 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
404 Marshaller.marshal(this, handler);
405 } //-- void marshal(org.xml.sax.ContentHandler)
408 * Method removeAllAnnotationElement
411 public void removeAllAnnotationElement()
413 _annotationElementList.removeAllElements();
414 } //-- void removeAllAnnotationElement()
417 * Method removeAnnotationElement
422 * @return AnnotationElement
424 public org.vamsas.objects.core.AnnotationElement removeAnnotationElement(int index)
426 java.lang.Object obj = _annotationElementList.elementAt(index);
427 _annotationElementList.removeElementAt(index);
428 return (org.vamsas.objects.core.AnnotationElement) obj;
429 } //-- org.vamsas.objects.core.AnnotationElement removeAnnotationElement(int)
432 * Method setAnnotationElement
437 * @param vAnnotationElement
439 public void setAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement)
440 throws java.lang.IndexOutOfBoundsException
442 //-- check bounds for index
443 if ((index < 0) || (index > _annotationElementList.size())) {
444 throw new IndexOutOfBoundsException("setAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]");
446 _annotationElementList.setElementAt(vAnnotationElement, index);
447 } //-- void setAnnotationElement(int, org.vamsas.objects.core.AnnotationElement)
450 * Method setAnnotationElement
454 * @param annotationElementArray
456 public void setAnnotationElement(org.vamsas.objects.core.AnnotationElement[] annotationElementArray)
459 _annotationElementList.removeAllElements();
460 for (int i = 0; i < annotationElementArray.length; i++) {
461 _annotationElementList.addElement(annotationElementArray[i]);
463 } //-- void setAnnotationElement(org.vamsas.objects.core.AnnotationElement)
466 * Sets the value of field 'begin'.
468 * @param begin the value of field 'begin'.
470 public void setBegin(java.lang.String begin)
473 } //-- void setBegin(java.lang.String)
476 * Sets the value of field 'description'.
478 * @param description the value of field 'description'.
480 public void setDescription(java.lang.String description)
482 this._description = description;
483 } //-- void setDescription(java.lang.String)
486 * Sets the value of field 'end'.
488 * @param end the value of field 'end'.
490 public void setEnd(java.lang.String end)
493 } //-- void setEnd(java.lang.String)
496 * Sets the value of field 'id'.
498 * @param id the value of field 'id'.
500 public void setId(java.lang.String id)
503 } //-- void setId(java.lang.String)
506 * Sets the value of field 'provenance'.
508 * @param provenance the value of field 'provenance'.
510 public void setProvenance(org.vamsas.objects.core.Provenance provenance)
512 this._provenance = provenance;
513 } //-- void setProvenance(org.vamsas.objects.core.Provenance)
516 * Sets the value of field 'seqRef'.
518 * @param seqRef the value of field 'seqRef'.
520 public void setSeqRef(java.lang.Object seqRef)
522 this._seqRef = seqRef;
523 } //-- void setSeqRef(java.lang.Object)
526 * Sets the value of field 'status'.
528 * @param status the value of field 'status'.
530 public void setStatus(java.lang.String status)
532 this._status = status;
533 } //-- void setStatus(java.lang.String)
536 * Sets the value of field 'type'.
538 * @param type the value of field 'type'.
540 public void setType(java.lang.String type)
543 } //-- void setType(java.lang.String)
551 * @return SequenceSetAnnotations
553 public static org.vamsas.objects.core.SequenceSetAnnotations unmarshal(java.io.Reader reader)
554 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
556 return (org.vamsas.objects.core.SequenceSetAnnotations) Unmarshaller.unmarshal(org.vamsas.objects.core.SequenceSetAnnotations.class, reader);
557 } //-- org.vamsas.objects.core.SequenceSetAnnotations unmarshal(java.io.Reader)
563 public void validate()
564 throws org.exolab.castor.xml.ValidationException
566 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
567 validator.validate(this);
568 } //-- void validate()