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.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 _description;
68 private java.lang.String _status;
71 * Field _annotationElementList
73 private java.util.Vector _annotationElementList;
78 private org.vamsas.objects.core.Provenance _provenance;
85 public SequenceSetAnnotations()
88 _annotationElementList = new Vector();
89 } //-- org.vamsas.objects.core.SequenceSetAnnotations()
97 * Method addAnnotationElement
101 * @param vAnnotationElement
103 public void addAnnotationElement(org.vamsas.objects.core.AnnotationElement vAnnotationElement)
104 throws java.lang.IndexOutOfBoundsException
106 _annotationElementList.addElement(vAnnotationElement);
107 } //-- void addAnnotationElement(org.vamsas.objects.core.AnnotationElement)
110 * Method addAnnotationElement
115 * @param vAnnotationElement
117 public void addAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement)
118 throws java.lang.IndexOutOfBoundsException
120 _annotationElementList.insertElementAt(vAnnotationElement, index);
121 } //-- void addAnnotationElement(int, org.vamsas.objects.core.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.objects.core.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.objects.core.AnnotationElement) _annotationElementList.elementAt(index);
230 } //-- org.vamsas.objects.core.AnnotationElement getAnnotationElement(int)
233 * Method getAnnotationElement
237 * @return AnnotationElement
239 public org.vamsas.objects.core.AnnotationElement[] getAnnotationElement()
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);
247 } //-- org.vamsas.objects.core.AnnotationElement[] getAnnotationElement()
250 * Method getAnnotationElementCount
256 public int getAnnotationElementCount()
258 return _annotationElementList.size();
259 } //-- int getAnnotationElementCount()
262 * Returns the value of field 'begin'.
265 * @return the value of field 'begin'.
267 public java.lang.String getBegin()
270 } //-- java.lang.String getBegin()
273 * Returns the value of field 'description'.
276 * @return the value of field 'description'.
278 public java.lang.String getDescription()
280 return this._description;
281 } //-- java.lang.String getDescription()
284 * Returns the value of field 'end'.
287 * @return the value of field 'end'.
289 public java.lang.String getEnd()
292 } //-- java.lang.String getEnd()
295 * Returns the value of field 'provenance'.
298 * @return the value of field 'provenance'.
300 public org.vamsas.objects.core.Provenance getProvenance()
302 return this._provenance;
303 } //-- org.vamsas.objects.core.Provenance getProvenance()
306 * Returns the value of field 'seqRef'.
309 * @return the value of field 'seqRef'.
311 public java.lang.Object getSeqRef()
314 } //-- java.lang.Object getSeqRef()
317 * Returns the value of field 'status'.
320 * @return the value of field 'status'.
322 public java.lang.String getStatus()
325 } //-- java.lang.String getStatus()
328 * Returns the value of field 'type'.
331 * @return the value of field 'type'.
333 public java.lang.String getType()
336 } //-- java.lang.String getType()
345 public boolean isValid()
350 catch (org.exolab.castor.xml.ValidationException vex) {
354 } //-- boolean isValid()
363 public void marshal(java.io.Writer out)
364 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
367 Marshaller.marshal(this, out);
368 } //-- void marshal(java.io.Writer)
377 public void marshal(org.xml.sax.ContentHandler handler)
378 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
381 Marshaller.marshal(this, handler);
382 } //-- void marshal(org.xml.sax.ContentHandler)
385 * Method removeAllAnnotationElement
388 public void removeAllAnnotationElement()
390 _annotationElementList.removeAllElements();
391 } //-- void removeAllAnnotationElement()
394 * Method removeAnnotationElement
399 * @return AnnotationElement
401 public org.vamsas.objects.core.AnnotationElement removeAnnotationElement(int index)
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)
409 * Method setAnnotationElement
414 * @param vAnnotationElement
416 public void setAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement)
417 throws java.lang.IndexOutOfBoundsException
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()+ "]");
423 _annotationElementList.setElementAt(vAnnotationElement, index);
424 } //-- void setAnnotationElement(int, org.vamsas.objects.core.AnnotationElement)
427 * Method setAnnotationElement
431 * @param annotationElementArray
433 public void setAnnotationElement(org.vamsas.objects.core.AnnotationElement[] annotationElementArray)
436 _annotationElementList.removeAllElements();
437 for (int i = 0; i < annotationElementArray.length; i++) {
438 _annotationElementList.addElement(annotationElementArray[i]);
440 } //-- void setAnnotationElement(org.vamsas.objects.core.AnnotationElement)
443 * Sets the value of field 'begin'.
445 * @param begin the value of field 'begin'.
447 public void setBegin(java.lang.String begin)
450 } //-- void setBegin(java.lang.String)
453 * Sets the value of field 'description'.
455 * @param description the value of field 'description'.
457 public void setDescription(java.lang.String description)
459 this._description = description;
460 } //-- void setDescription(java.lang.String)
463 * Sets the value of field 'end'.
465 * @param end the value of field 'end'.
467 public void setEnd(java.lang.String end)
470 } //-- void setEnd(java.lang.String)
473 * Sets the value of field 'provenance'.
475 * @param provenance the value of field 'provenance'.
477 public void setProvenance(org.vamsas.objects.core.Provenance provenance)
479 this._provenance = provenance;
480 } //-- void setProvenance(org.vamsas.objects.core.Provenance)
483 * Sets the value of field 'seqRef'.
485 * @param seqRef the value of field 'seqRef'.
487 public void setSeqRef(java.lang.Object seqRef)
489 this._seqRef = seqRef;
490 } //-- void setSeqRef(java.lang.Object)
493 * Sets the value of field 'status'.
495 * @param status the value of field 'status'.
497 public void setStatus(java.lang.String status)
499 this._status = status;
500 } //-- void setStatus(java.lang.String)
503 * Sets the value of field 'type'.
505 * @param type the value of field 'type'.
507 public void setType(java.lang.String type)
510 } //-- void setType(java.lang.String)
518 * @return SequenceSetAnnotations
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
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)
530 public void validate()
531 throws org.exolab.castor.xml.ValidationException
533 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
534 validator.validate(this);
535 } //-- void validate()