2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 0.9.9M1</a>, using an XML
8 package org.vamsas.client.objects;
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 _description;
68 private java.lang.String _status;
71 * Field _annotationElementList
73 private java.util.Vector _annotationElementList;
78 private org.vamsas.client.objects.Provenance _provenance;
85 public SequenceSetAnnotations()
88 _annotationElementList = new Vector();
89 } //-- org.vamsas.client.objects.SequenceSetAnnotations()
97 * Method addAnnotationElement
101 * @param vAnnotationElement
103 public void addAnnotationElement(org.vamsas.client.objects.AnnotationElement vAnnotationElement)
104 throws java.lang.IndexOutOfBoundsException
106 _annotationElementList.addElement(vAnnotationElement);
107 } //-- void addAnnotationElement(org.vamsas.client.objects.AnnotationElement)
110 * Method addAnnotationElement
115 * @param vAnnotationElement
117 public void addAnnotationElement(int index, org.vamsas.client.objects.AnnotationElement vAnnotationElement)
118 throws java.lang.IndexOutOfBoundsException
120 _annotationElementList.insertElementAt(vAnnotationElement, index);
121 } //-- void addAnnotationElement(int, org.vamsas.client.objects.AnnotationElement)
124 * Method enumerateAnnotationElement
128 * @return Enumeration
130 public java.util.Enumeration enumerateAnnotationElement()
132 return _annotationElementList.elements();
133 } //-- java.util.Enumeration enumerateAnnotationElement()
136 * Note: hashCode() has not been overriden
141 public boolean equals(java.lang.Object obj)
146 if (super.equals(obj)==false)
149 if (obj instanceof SequenceSetAnnotations) {
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)))
157 else if (temp._type != null)
159 if (this._end != null) {
160 if (temp._end == null) return false;
161 else if (!(this._end.equals(temp._end)))
164 else if (temp._end != null)
166 if (this._begin != null) {
167 if (temp._begin == null) return false;
168 else if (!(this._begin.equals(temp._begin)))
171 else if (temp._begin != null)
173 if (this._seqRef != null) {
174 if (temp._seqRef == null) return false;
175 else if (!(this._seqRef.equals(temp._seqRef)))
178 else if (temp._seqRef != null)
180 if (this._description != null) {
181 if (temp._description == null) return false;
182 else if (!(this._description.equals(temp._description)))
185 else if (temp._description != null)
187 if (this._status != null) {
188 if (temp._status == null) return false;
189 else if (!(this._status.equals(temp._status)))
192 else if (temp._status != null)
194 if (this._annotationElementList != null) {
195 if (temp._annotationElementList == null) return false;
196 else if (!(this._annotationElementList.equals(temp._annotationElementList)))
199 else if (temp._annotationElementList != null)
201 if (this._provenance != null) {
202 if (temp._provenance == null) return false;
203 else if (!(this._provenance.equals(temp._provenance)))
206 else if (temp._provenance != null)
211 } //-- boolean equals(java.lang.Object)
214 * Method getAnnotationElement
219 * @return AnnotationElement
221 public org.vamsas.client.objects.AnnotationElement getAnnotationElement(int index)
222 throws java.lang.IndexOutOfBoundsException
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()+ "]");
229 return (org.vamsas.client.objects.AnnotationElement) _annotationElementList.elementAt(index);
230 } //-- org.vamsas.client.objects.AnnotationElement getAnnotationElement(int)
233 * Method getAnnotationElement
237 * @return AnnotationElement
239 public org.vamsas.client.objects.AnnotationElement[] getAnnotationElement()
241 int size = _annotationElementList.size();
242 org.vamsas.client.objects.AnnotationElement[] mArray = new org.vamsas.client.objects.AnnotationElement[size];
243 for (int index = 0; index < size; index++) {
244 mArray[index] = (org.vamsas.client.objects.AnnotationElement) _annotationElementList.elementAt(index);
247 } //-- org.vamsas.client.objects.AnnotationElement[] getAnnotationElement()
250 * Method getAnnotationElementAsReference
252 * Returns a reference to 'annotationElement'. No type checking
253 * is performed on any modications to the Vector.
256 * @return returns a reference to the Vector.
258 public java.util.Vector getAnnotationElementAsReference()
260 return _annotationElementList;
261 } //-- java.util.Vector getAnnotationElementAsReference()
264 * Method getAnnotationElementCount
270 public int getAnnotationElementCount()
272 return _annotationElementList.size();
273 } //-- int getAnnotationElementCount()
276 * Returns the value of field 'begin'.
279 * @return the value of field 'begin'.
281 public java.lang.String getBegin()
284 } //-- java.lang.String getBegin()
287 * Returns the value of field 'description'.
290 * @return the value of field 'description'.
292 public java.lang.String getDescription()
294 return this._description;
295 } //-- java.lang.String getDescription()
298 * Returns the value of field 'end'.
301 * @return the value of field 'end'.
303 public java.lang.String getEnd()
306 } //-- java.lang.String getEnd()
309 * Returns the value of field 'provenance'.
312 * @return the value of field 'provenance'.
314 public org.vamsas.client.objects.Provenance getProvenance()
316 return this._provenance;
317 } //-- org.vamsas.client.objects.Provenance getProvenance()
320 * Returns the value of field 'seqRef'.
323 * @return the value of field 'seqRef'.
325 public java.lang.Object getSeqRef()
328 } //-- java.lang.Object getSeqRef()
331 * Returns the value of field 'status'.
334 * @return the value of field 'status'.
336 public java.lang.String getStatus()
339 } //-- java.lang.String getStatus()
342 * Returns the value of field 'type'.
345 * @return the value of field 'type'.
347 public java.lang.String getType()
350 } //-- java.lang.String getType()
359 public boolean isValid()
364 catch (org.exolab.castor.xml.ValidationException vex) {
368 } //-- boolean isValid()
377 public void marshal(java.io.Writer out)
378 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
381 Marshaller.marshal(this, out);
382 } //-- void marshal(java.io.Writer)
391 public void marshal(org.xml.sax.ContentHandler handler)
392 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
395 Marshaller.marshal(this, handler);
396 } //-- void marshal(org.xml.sax.ContentHandler)
399 * Method removeAllAnnotationElement
402 public void removeAllAnnotationElement()
404 _annotationElementList.removeAllElements();
405 } //-- void removeAllAnnotationElement()
408 * Method removeAnnotationElement
413 * @return AnnotationElement
415 public org.vamsas.client.objects.AnnotationElement removeAnnotationElement(int index)
417 java.lang.Object obj = _annotationElementList.elementAt(index);
418 _annotationElementList.removeElementAt(index);
419 return (org.vamsas.client.objects.AnnotationElement) obj;
420 } //-- org.vamsas.client.objects.AnnotationElement removeAnnotationElement(int)
423 * Method setAnnotationElement
428 * @param vAnnotationElement
430 public void setAnnotationElement(int index, org.vamsas.client.objects.AnnotationElement vAnnotationElement)
431 throws java.lang.IndexOutOfBoundsException
433 //-- check bounds for index
434 if ((index < 0) || (index > _annotationElementList.size())) {
435 throw new IndexOutOfBoundsException("setAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]");
437 _annotationElementList.setElementAt(vAnnotationElement, index);
438 } //-- void setAnnotationElement(int, org.vamsas.client.objects.AnnotationElement)
441 * Method setAnnotationElement
445 * @param annotationElementArray
447 public void setAnnotationElement(org.vamsas.client.objects.AnnotationElement[] annotationElementArray)
450 _annotationElementList.removeAllElements();
451 for (int i = 0; i < annotationElementArray.length; i++) {
452 _annotationElementList.addElement(annotationElementArray[i]);
454 } //-- void setAnnotationElement(org.vamsas.client.objects.AnnotationElement)
457 * Method setAnnotationElement
459 * Sets the value of 'annotationElement' by copying the given
462 * @param annotationElementVector the Vector to copy.
464 public void setAnnotationElement(java.util.Vector annotationElementVector)
467 _annotationElementList.removeAllElements();
468 for (int i = 0; i < annotationElementVector.size(); i++) {
469 _annotationElementList.addElement((org.vamsas.client.objects.AnnotationElement)annotationElementVector.elementAt(i));
471 } //-- void setAnnotationElement(java.util.Vector)
474 * Method setAnnotationElementAsReference
476 * Sets the value of 'annotationElement' by setting it to the
477 * given Vector. No type checking is performed.
479 * @param annotationElementVector the Vector to copy.
481 public void setAnnotationElementAsReference(java.util.Vector annotationElementVector)
483 _annotationElementList = annotationElementVector;
484 } //-- void setAnnotationElementAsReference(java.util.Vector)
487 * Sets the value of field 'begin'.
489 * @param begin the value of field 'begin'.
491 public void setBegin(java.lang.String begin)
494 } //-- void setBegin(java.lang.String)
497 * Sets the value of field 'description'.
499 * @param description the value of field 'description'.
501 public void setDescription(java.lang.String description)
503 this._description = description;
504 } //-- void setDescription(java.lang.String)
507 * Sets the value of field 'end'.
509 * @param end the value of field 'end'.
511 public void setEnd(java.lang.String end)
514 } //-- void setEnd(java.lang.String)
517 * Sets the value of field 'provenance'.
519 * @param provenance the value of field 'provenance'.
521 public void setProvenance(org.vamsas.client.objects.Provenance provenance)
523 this._provenance = provenance;
524 } //-- void setProvenance(org.vamsas.client.objects.Provenance)
527 * Sets the value of field 'seqRef'.
529 * @param seqRef the value of field 'seqRef'.
531 public void setSeqRef(java.lang.Object seqRef)
533 this._seqRef = seqRef;
534 } //-- void setSeqRef(java.lang.Object)
537 * Sets the value of field 'status'.
539 * @param status the value of field 'status'.
541 public void setStatus(java.lang.String status)
543 this._status = status;
544 } //-- void setStatus(java.lang.String)
547 * Sets the value of field 'type'.
549 * @param type the value of field 'type'.
551 public void setType(java.lang.String type)
554 } //-- void setType(java.lang.String)
562 * @return SequenceSetAnnotations
564 public static org.vamsas.client.objects.SequenceSetAnnotations unmarshal(java.io.Reader reader)
565 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
567 return (org.vamsas.client.objects.SequenceSetAnnotations) Unmarshaller.unmarshal(org.vamsas.client.objects.SequenceSetAnnotations.class, reader);
568 } //-- org.vamsas.client.objects.SequenceSetAnnotations unmarshal(java.io.Reader)
574 public void validate()
575 throws org.exolab.castor.xml.ValidationException
577 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
578 validator.validate(this);
579 } //-- void validate()