refactored uri type to a link element and replaced type references with element refer...
[vamsas.git] / src / org / vamsas / objects / core / RangeAnnotation.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 0.9.9M2</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  * Annotation for a rangeSpec - values can be attached for the
28  * whole specification, and to each position within the spec.
29  * following the orientation specified by the ordered set of
30  * rangeSpec (pos, seg) elements.
31  *  
32  * 
33  * @version $Revision$ $Date$
34  */
35 public class RangeAnnotation extends org.vamsas.objects.core.RangeType 
36 implements java.io.Serializable
37 {
38
39
40       //--------------------------/
41      //- Class/Member Variables -/
42     //--------------------------/
43
44     /**
45      * Primary Key for vamsas object referencing
46      *  
47      */
48     private java.lang.String _id;
49
50     /**
51      * objects with modifiable=false will not be
52      *  modified by a vamsas client update
53      *  
54      */
55     private boolean _modifiable = true;
56
57     /**
58      * keeps track of state for field: _modifiable
59      */
60     private boolean _has_modifiable;
61
62     /**
63      * Annotation with the same non-empty group
64      *  name are grouped together
65      *  
66      */
67     private java.lang.String _group = "";
68
69     /**
70      * A Das Feature has both a type and a Type ID.
71      *  We go the route of requiring the type string
72      *  to be taken from a controlled vocabulary if
73      *  an application expects others to make sense
74      *  of it. 
75      *  The type may qualified - so uniprot:CHAIN is a valid type
76      * name, 
77      *  and considered distinct from someotherDB:CHAIN
78      *  
79      */
80     private java.lang.String _type;
81
82     /**
83      * Short, meaningful name for the annotation - if this is
84      * absent, then the type string should be used in its place.
85      *  
86      */
87     private java.lang.String _label;
88
89     /**
90      * Human readable description of the annotation
91      *  
92      */
93     private java.lang.String _description;
94
95     /**
96      * TODO: specify this - we have considered taking the GO
97      * evidence codes as a model for assessing a measure of quality
98      * to an annotation.
99      *  
100      */
101     private java.lang.String _status;
102
103     /**
104      * Annotation Element position maps to
105      *  ordered positions defined by the
106      *  sequence of rangeType pos positions or
107      *  concatenated seg start/end segments.
108      *  
109      */
110     private java.util.Vector _annotationElementList;
111
112     /**
113      * Ordered set of optionally named float
114      *  values for the whole annotation
115      *  
116      */
117     private java.util.Vector _scoreList;
118
119     /**
120      * Field _linkList
121      */
122     private java.util.Vector _linkList;
123
124     /**
125      * Note:These are mutable so an application
126      *  should check them each time.
127      *  
128      */
129     private java.util.Vector _propertyList;
130
131
132       //----------------/
133      //- Constructors -/
134     //----------------/
135
136     public RangeAnnotation() 
137      {
138         super();
139         setGroup("");
140         _annotationElementList = new Vector();
141         _scoreList = new Vector();
142         _linkList = new Vector();
143         _propertyList = new Vector();
144     } //-- org.vamsas.objects.core.RangeAnnotation()
145
146
147       //-----------/
148      //- Methods -/
149     //-----------/
150
151     /**
152      * Method addAnnotationElement
153      * 
154      * 
155      * 
156      * @param vAnnotationElement
157      */
158     public void addAnnotationElement(org.vamsas.objects.core.AnnotationElement vAnnotationElement)
159         throws java.lang.IndexOutOfBoundsException
160     {
161         _annotationElementList.addElement(vAnnotationElement);
162     } //-- void addAnnotationElement(org.vamsas.objects.core.AnnotationElement) 
163
164     /**
165      * Method addAnnotationElement
166      * 
167      * 
168      * 
169      * @param index
170      * @param vAnnotationElement
171      */
172     public void addAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement)
173         throws java.lang.IndexOutOfBoundsException
174     {
175         _annotationElementList.insertElementAt(vAnnotationElement, index);
176     } //-- void addAnnotationElement(int, org.vamsas.objects.core.AnnotationElement) 
177
178     /**
179      * Method addLink
180      * 
181      * 
182      * 
183      * @param vLink
184      */
185     public void addLink(org.vamsas.objects.core.Link vLink)
186         throws java.lang.IndexOutOfBoundsException
187     {
188         _linkList.addElement(vLink);
189     } //-- void addLink(org.vamsas.objects.core.Link) 
190
191     /**
192      * Method addLink
193      * 
194      * 
195      * 
196      * @param index
197      * @param vLink
198      */
199     public void addLink(int index, org.vamsas.objects.core.Link vLink)
200         throws java.lang.IndexOutOfBoundsException
201     {
202         _linkList.insertElementAt(vLink, index);
203     } //-- void addLink(int, org.vamsas.objects.core.Link) 
204
205     /**
206      * Method addProperty
207      * 
208      * 
209      * 
210      * @param vProperty
211      */
212     public void addProperty(org.vamsas.objects.core.Property vProperty)
213         throws java.lang.IndexOutOfBoundsException
214     {
215         _propertyList.addElement(vProperty);
216     } //-- void addProperty(org.vamsas.objects.core.Property) 
217
218     /**
219      * Method addProperty
220      * 
221      * 
222      * 
223      * @param index
224      * @param vProperty
225      */
226     public void addProperty(int index, org.vamsas.objects.core.Property vProperty)
227         throws java.lang.IndexOutOfBoundsException
228     {
229         _propertyList.insertElementAt(vProperty, index);
230     } //-- void addProperty(int, org.vamsas.objects.core.Property) 
231
232     /**
233      * Method addScore
234      * 
235      * 
236      * 
237      * @param vScore
238      */
239     public void addScore(org.vamsas.objects.core.Score vScore)
240         throws java.lang.IndexOutOfBoundsException
241     {
242         _scoreList.addElement(vScore);
243     } //-- void addScore(org.vamsas.objects.core.Score) 
244
245     /**
246      * Method addScore
247      * 
248      * 
249      * 
250      * @param index
251      * @param vScore
252      */
253     public void addScore(int index, org.vamsas.objects.core.Score vScore)
254         throws java.lang.IndexOutOfBoundsException
255     {
256         _scoreList.insertElementAt(vScore, index);
257     } //-- void addScore(int, org.vamsas.objects.core.Score) 
258
259     /**
260      * Method deleteModifiable
261      * 
262      */
263     public void deleteModifiable()
264     {
265         this._has_modifiable= false;
266     } //-- void deleteModifiable() 
267
268     /**
269      * Method enumerateAnnotationElement
270      * 
271      * 
272      * 
273      * @return Enumeration
274      */
275     public java.util.Enumeration enumerateAnnotationElement()
276     {
277         return _annotationElementList.elements();
278     } //-- java.util.Enumeration enumerateAnnotationElement() 
279
280     /**
281      * Method enumerateLink
282      * 
283      * 
284      * 
285      * @return Enumeration
286      */
287     public java.util.Enumeration enumerateLink()
288     {
289         return _linkList.elements();
290     } //-- java.util.Enumeration enumerateLink() 
291
292     /**
293      * Method enumerateProperty
294      * 
295      * 
296      * 
297      * @return Enumeration
298      */
299     public java.util.Enumeration enumerateProperty()
300     {
301         return _propertyList.elements();
302     } //-- java.util.Enumeration enumerateProperty() 
303
304     /**
305      * Method enumerateScore
306      * 
307      * 
308      * 
309      * @return Enumeration
310      */
311     public java.util.Enumeration enumerateScore()
312     {
313         return _scoreList.elements();
314     } //-- java.util.Enumeration enumerateScore() 
315
316     /**
317      * Note: hashCode() has not been overriden
318      * 
319      * @param obj
320      * @return boolean
321      */
322     public boolean equals(java.lang.Object obj)
323     {
324         if ( this == obj )
325             return true;
326         
327         if (super.equals(obj)==false)
328             return false;
329         
330         if (obj instanceof RangeAnnotation) {
331         
332             RangeAnnotation temp = (RangeAnnotation)obj;
333             if (this._id != null) {
334                 if (temp._id == null) return false;
335                 else if (!(this._id.equals(temp._id))) 
336                     return false;
337             }
338             else if (temp._id != null)
339                 return false;
340             if (this._modifiable != temp._modifiable)
341                 return false;
342             if (this._has_modifiable != temp._has_modifiable)
343                 return false;
344             if (this._group != null) {
345                 if (temp._group == null) return false;
346                 else if (!(this._group.equals(temp._group))) 
347                     return false;
348             }
349             else if (temp._group != null)
350                 return false;
351             if (this._type != null) {
352                 if (temp._type == null) return false;
353                 else if (!(this._type.equals(temp._type))) 
354                     return false;
355             }
356             else if (temp._type != null)
357                 return false;
358             if (this._label != null) {
359                 if (temp._label == null) return false;
360                 else if (!(this._label.equals(temp._label))) 
361                     return false;
362             }
363             else if (temp._label != null)
364                 return false;
365             if (this._description != null) {
366                 if (temp._description == null) return false;
367                 else if (!(this._description.equals(temp._description))) 
368                     return false;
369             }
370             else if (temp._description != null)
371                 return false;
372             if (this._status != null) {
373                 if (temp._status == null) return false;
374                 else if (!(this._status.equals(temp._status))) 
375                     return false;
376             }
377             else if (temp._status != null)
378                 return false;
379             if (this._annotationElementList != null) {
380                 if (temp._annotationElementList == null) return false;
381                 else if (!(this._annotationElementList.equals(temp._annotationElementList))) 
382                     return false;
383             }
384             else if (temp._annotationElementList != null)
385                 return false;
386             if (this._scoreList != null) {
387                 if (temp._scoreList == null) return false;
388                 else if (!(this._scoreList.equals(temp._scoreList))) 
389                     return false;
390             }
391             else if (temp._scoreList != null)
392                 return false;
393             if (this._linkList != null) {
394                 if (temp._linkList == null) return false;
395                 else if (!(this._linkList.equals(temp._linkList))) 
396                     return false;
397             }
398             else if (temp._linkList != null)
399                 return false;
400             if (this._propertyList != null) {
401                 if (temp._propertyList == null) return false;
402                 else if (!(this._propertyList.equals(temp._propertyList))) 
403                     return false;
404             }
405             else if (temp._propertyList != null)
406                 return false;
407             return true;
408         }
409         return false;
410     } //-- boolean equals(java.lang.Object) 
411
412     /**
413      * Method getAnnotationElement
414      * 
415      * 
416      * 
417      * @param index
418      * @return AnnotationElement
419      */
420     public org.vamsas.objects.core.AnnotationElement getAnnotationElement(int index)
421         throws java.lang.IndexOutOfBoundsException
422     {
423         //-- check bounds for index
424         if ((index < 0) || (index > _annotationElementList.size())) {
425             throw new IndexOutOfBoundsException("getAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]");
426         }
427         
428         return (org.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index);
429     } //-- org.vamsas.objects.core.AnnotationElement getAnnotationElement(int) 
430
431     /**
432      * Method getAnnotationElement
433      * 
434      * 
435      * 
436      * @return AnnotationElement
437      */
438     public org.vamsas.objects.core.AnnotationElement[] getAnnotationElement()
439     {
440         int size = _annotationElementList.size();
441         org.vamsas.objects.core.AnnotationElement[] mArray = new org.vamsas.objects.core.AnnotationElement[size];
442         for (int index = 0; index < size; index++) {
443             mArray[index] = (org.vamsas.objects.core.AnnotationElement) _annotationElementList.elementAt(index);
444         }
445         return mArray;
446     } //-- org.vamsas.objects.core.AnnotationElement[] getAnnotationElement() 
447
448     /**
449      * Method getAnnotationElementCount
450      * 
451      * 
452      * 
453      * @return int
454      */
455     public int getAnnotationElementCount()
456     {
457         return _annotationElementList.size();
458     } //-- int getAnnotationElementCount() 
459
460     /**
461      * Returns the value of field 'description'. The field
462      * 'description' has the following description: Human readable
463      * description of the annotation
464      *  
465      * 
466      * @return String
467      * @return the value of field 'description'.
468      */
469     public java.lang.String getDescription()
470     {
471         return this._description;
472     } //-- java.lang.String getDescription() 
473
474     /**
475      * Returns the value of field 'group'. The field 'group' has
476      * the following description: Annotation with the same
477      * non-empty group
478      *  name are grouped together
479      *  
480      * 
481      * @return String
482      * @return the value of field 'group'.
483      */
484     public java.lang.String getGroup()
485     {
486         return this._group;
487     } //-- java.lang.String getGroup() 
488
489     /**
490      * Returns the value of field 'id'. The field 'id' has the
491      * following description: Primary Key for vamsas object
492      * referencing
493      *  
494      * 
495      * @return String
496      * @return the value of field 'id'.
497      */
498     public java.lang.String getId()
499     {
500         return this._id;
501     } //-- java.lang.String getId() 
502
503     /**
504      * Returns the value of field 'label'. The field 'label' has
505      * the following description: Short, meaningful name for the
506      * annotation - if this is absent, then the type string should
507      * be used in its place.
508      *  
509      * 
510      * @return String
511      * @return the value of field 'label'.
512      */
513     public java.lang.String getLabel()
514     {
515         return this._label;
516     } //-- java.lang.String getLabel() 
517
518     /**
519      * Method getLink
520      * 
521      * 
522      * 
523      * @param index
524      * @return Link
525      */
526     public org.vamsas.objects.core.Link getLink(int index)
527         throws java.lang.IndexOutOfBoundsException
528     {
529         //-- check bounds for index
530         if ((index < 0) || (index > _linkList.size())) {
531             throw new IndexOutOfBoundsException("getLink: Index value '"+index+"' not in range [0.."+_linkList.size()+ "]");
532         }
533         
534         return (org.vamsas.objects.core.Link) _linkList.elementAt(index);
535     } //-- org.vamsas.objects.core.Link getLink(int) 
536
537     /**
538      * Method getLink
539      * 
540      * 
541      * 
542      * @return Link
543      */
544     public org.vamsas.objects.core.Link[] getLink()
545     {
546         int size = _linkList.size();
547         org.vamsas.objects.core.Link[] mArray = new org.vamsas.objects.core.Link[size];
548         for (int index = 0; index < size; index++) {
549             mArray[index] = (org.vamsas.objects.core.Link) _linkList.elementAt(index);
550         }
551         return mArray;
552     } //-- org.vamsas.objects.core.Link[] getLink() 
553
554     /**
555      * Method getLinkCount
556      * 
557      * 
558      * 
559      * @return int
560      */
561     public int getLinkCount()
562     {
563         return _linkList.size();
564     } //-- int getLinkCount() 
565
566     /**
567      * Returns the value of field 'modifiable'. The field
568      * 'modifiable' has the following description: objects with
569      * modifiable=false will not be
570      *  modified by a vamsas client update
571      *  
572      * 
573      * @return boolean
574      * @return the value of field 'modifiable'.
575      */
576     public boolean getModifiable()
577     {
578         return this._modifiable;
579     } //-- boolean getModifiable() 
580
581     /**
582      * Method getProperty
583      * 
584      * 
585      * 
586      * @param index
587      * @return Property
588      */
589     public org.vamsas.objects.core.Property getProperty(int index)
590         throws java.lang.IndexOutOfBoundsException
591     {
592         //-- check bounds for index
593         if ((index < 0) || (index > _propertyList.size())) {
594             throw new IndexOutOfBoundsException("getProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]");
595         }
596         
597         return (org.vamsas.objects.core.Property) _propertyList.elementAt(index);
598     } //-- org.vamsas.objects.core.Property getProperty(int) 
599
600     /**
601      * Method getProperty
602      * 
603      * 
604      * 
605      * @return Property
606      */
607     public org.vamsas.objects.core.Property[] getProperty()
608     {
609         int size = _propertyList.size();
610         org.vamsas.objects.core.Property[] mArray = new org.vamsas.objects.core.Property[size];
611         for (int index = 0; index < size; index++) {
612             mArray[index] = (org.vamsas.objects.core.Property) _propertyList.elementAt(index);
613         }
614         return mArray;
615     } //-- org.vamsas.objects.core.Property[] getProperty() 
616
617     /**
618      * Method getPropertyCount
619      * 
620      * 
621      * 
622      * @return int
623      */
624     public int getPropertyCount()
625     {
626         return _propertyList.size();
627     } //-- int getPropertyCount() 
628
629     /**
630      * Method getScore
631      * 
632      * 
633      * 
634      * @param index
635      * @return Score
636      */
637     public org.vamsas.objects.core.Score getScore(int index)
638         throws java.lang.IndexOutOfBoundsException
639     {
640         //-- check bounds for index
641         if ((index < 0) || (index > _scoreList.size())) {
642             throw new IndexOutOfBoundsException("getScore: Index value '"+index+"' not in range [0.."+_scoreList.size()+ "]");
643         }
644         
645         return (org.vamsas.objects.core.Score) _scoreList.elementAt(index);
646     } //-- org.vamsas.objects.core.Score getScore(int) 
647
648     /**
649      * Method getScore
650      * 
651      * 
652      * 
653      * @return Score
654      */
655     public org.vamsas.objects.core.Score[] getScore()
656     {
657         int size = _scoreList.size();
658         org.vamsas.objects.core.Score[] mArray = new org.vamsas.objects.core.Score[size];
659         for (int index = 0; index < size; index++) {
660             mArray[index] = (org.vamsas.objects.core.Score) _scoreList.elementAt(index);
661         }
662         return mArray;
663     } //-- org.vamsas.objects.core.Score[] getScore() 
664
665     /**
666      * Method getScoreCount
667      * 
668      * 
669      * 
670      * @return int
671      */
672     public int getScoreCount()
673     {
674         return _scoreList.size();
675     } //-- int getScoreCount() 
676
677     /**
678      * Returns the value of field 'status'. The field 'status' has
679      * the following description: TODO: specify this - we have
680      * considered taking the GO evidence codes as a model for
681      * assessing a measure of quality to an annotation.
682      *  
683      * 
684      * @return String
685      * @return the value of field 'status'.
686      */
687     public java.lang.String getStatus()
688     {
689         return this._status;
690     } //-- java.lang.String getStatus() 
691
692     /**
693      * Returns the value of field 'type'. The field 'type' has the
694      * following description: A Das Feature has both a type and a
695      * Type ID.
696      *  We go the route of requiring the type string
697      *  to be taken from a controlled vocabulary if
698      *  an application expects others to make sense
699      *  of it. 
700      *  The type may qualified - so uniprot:CHAIN is a valid type
701      * name, 
702      *  and considered distinct from someotherDB:CHAIN
703      *  
704      * 
705      * @return String
706      * @return the value of field 'type'.
707      */
708     public java.lang.String getType()
709     {
710         return this._type;
711     } //-- java.lang.String getType() 
712
713     /**
714      * Method hasModifiable
715      * 
716      * 
717      * 
718      * @return boolean
719      */
720     public boolean hasModifiable()
721     {
722         return this._has_modifiable;
723     } //-- boolean hasModifiable() 
724
725     /**
726      * Method isValid
727      * 
728      * 
729      * 
730      * @return boolean
731      */
732     public boolean isValid()
733     {
734         try {
735             validate();
736         }
737         catch (org.exolab.castor.xml.ValidationException vex) {
738             return false;
739         }
740         return true;
741     } //-- boolean isValid() 
742
743     /**
744      * Method marshal
745      * 
746      * 
747      * 
748      * @param out
749      */
750     public void marshal(java.io.Writer out)
751         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
752     {
753         
754         Marshaller.marshal(this, out);
755     } //-- void marshal(java.io.Writer) 
756
757     /**
758      * Method marshal
759      * 
760      * 
761      * 
762      * @param handler
763      */
764     public void marshal(org.xml.sax.ContentHandler handler)
765         throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
766     {
767         
768         Marshaller.marshal(this, handler);
769     } //-- void marshal(org.xml.sax.ContentHandler) 
770
771     /**
772      * Method removeAllAnnotationElement
773      * 
774      */
775     public void removeAllAnnotationElement()
776     {
777         _annotationElementList.removeAllElements();
778     } //-- void removeAllAnnotationElement() 
779
780     /**
781      * Method removeAllLink
782      * 
783      */
784     public void removeAllLink()
785     {
786         _linkList.removeAllElements();
787     } //-- void removeAllLink() 
788
789     /**
790      * Method removeAllProperty
791      * 
792      */
793     public void removeAllProperty()
794     {
795         _propertyList.removeAllElements();
796     } //-- void removeAllProperty() 
797
798     /**
799      * Method removeAllScore
800      * 
801      */
802     public void removeAllScore()
803     {
804         _scoreList.removeAllElements();
805     } //-- void removeAllScore() 
806
807     /**
808      * Method removeAnnotationElement
809      * 
810      * 
811      * 
812      * @param index
813      * @return AnnotationElement
814      */
815     public org.vamsas.objects.core.AnnotationElement removeAnnotationElement(int index)
816     {
817         java.lang.Object obj = _annotationElementList.elementAt(index);
818         _annotationElementList.removeElementAt(index);
819         return (org.vamsas.objects.core.AnnotationElement) obj;
820     } //-- org.vamsas.objects.core.AnnotationElement removeAnnotationElement(int) 
821
822     /**
823      * Method removeLink
824      * 
825      * 
826      * 
827      * @param index
828      * @return Link
829      */
830     public org.vamsas.objects.core.Link removeLink(int index)
831     {
832         java.lang.Object obj = _linkList.elementAt(index);
833         _linkList.removeElementAt(index);
834         return (org.vamsas.objects.core.Link) obj;
835     } //-- org.vamsas.objects.core.Link removeLink(int) 
836
837     /**
838      * Method removeProperty
839      * 
840      * 
841      * 
842      * @param index
843      * @return Property
844      */
845     public org.vamsas.objects.core.Property removeProperty(int index)
846     {
847         java.lang.Object obj = _propertyList.elementAt(index);
848         _propertyList.removeElementAt(index);
849         return (org.vamsas.objects.core.Property) obj;
850     } //-- org.vamsas.objects.core.Property removeProperty(int) 
851
852     /**
853      * Method removeScore
854      * 
855      * 
856      * 
857      * @param index
858      * @return Score
859      */
860     public org.vamsas.objects.core.Score removeScore(int index)
861     {
862         java.lang.Object obj = _scoreList.elementAt(index);
863         _scoreList.removeElementAt(index);
864         return (org.vamsas.objects.core.Score) obj;
865     } //-- org.vamsas.objects.core.Score removeScore(int) 
866
867     /**
868      * Method setAnnotationElement
869      * 
870      * 
871      * 
872      * @param index
873      * @param vAnnotationElement
874      */
875     public void setAnnotationElement(int index, org.vamsas.objects.core.AnnotationElement vAnnotationElement)
876         throws java.lang.IndexOutOfBoundsException
877     {
878         //-- check bounds for index
879         if ((index < 0) || (index > _annotationElementList.size())) {
880             throw new IndexOutOfBoundsException("setAnnotationElement: Index value '"+index+"' not in range [0.."+_annotationElementList.size()+ "]");
881         }
882         _annotationElementList.setElementAt(vAnnotationElement, index);
883     } //-- void setAnnotationElement(int, org.vamsas.objects.core.AnnotationElement) 
884
885     /**
886      * Method setAnnotationElement
887      * 
888      * 
889      * 
890      * @param annotationElementArray
891      */
892     public void setAnnotationElement(org.vamsas.objects.core.AnnotationElement[] annotationElementArray)
893     {
894         //-- copy array
895         _annotationElementList.removeAllElements();
896         for (int i = 0; i < annotationElementArray.length; i++) {
897             _annotationElementList.addElement(annotationElementArray[i]);
898         }
899     } //-- void setAnnotationElement(org.vamsas.objects.core.AnnotationElement) 
900
901     /**
902      * Sets the value of field 'description'. The field
903      * 'description' has the following description: Human readable
904      * description of the annotation
905      *  
906      * 
907      * @param description the value of field 'description'.
908      */
909     public void setDescription(java.lang.String description)
910     {
911         this._description = description;
912     } //-- void setDescription(java.lang.String) 
913
914     /**
915      * Sets the value of field 'group'. The field 'group' has the
916      * following description: Annotation with the same non-empty
917      * group
918      *  name are grouped together
919      *  
920      * 
921      * @param group the value of field 'group'.
922      */
923     public void setGroup(java.lang.String group)
924     {
925         this._group = group;
926     } //-- void setGroup(java.lang.String) 
927
928     /**
929      * Sets the value of field 'id'. The field 'id' has the
930      * following description: Primary Key for vamsas object
931      * referencing
932      *  
933      * 
934      * @param id the value of field 'id'.
935      */
936     public void setId(java.lang.String id)
937     {
938         this._id = id;
939     } //-- void setId(java.lang.String) 
940
941     /**
942      * Sets the value of field 'label'. The field 'label' has the
943      * following description: Short, meaningful name for the
944      * annotation - if this is absent, then the type string should
945      * be used in its place.
946      *  
947      * 
948      * @param label the value of field 'label'.
949      */
950     public void setLabel(java.lang.String label)
951     {
952         this._label = label;
953     } //-- void setLabel(java.lang.String) 
954
955     /**
956      * Method setLink
957      * 
958      * 
959      * 
960      * @param index
961      * @param vLink
962      */
963     public void setLink(int index, org.vamsas.objects.core.Link vLink)
964         throws java.lang.IndexOutOfBoundsException
965     {
966         //-- check bounds for index
967         if ((index < 0) || (index > _linkList.size())) {
968             throw new IndexOutOfBoundsException("setLink: Index value '"+index+"' not in range [0.."+_linkList.size()+ "]");
969         }
970         _linkList.setElementAt(vLink, index);
971     } //-- void setLink(int, org.vamsas.objects.core.Link) 
972
973     /**
974      * Method setLink
975      * 
976      * 
977      * 
978      * @param linkArray
979      */
980     public void setLink(org.vamsas.objects.core.Link[] linkArray)
981     {
982         //-- copy array
983         _linkList.removeAllElements();
984         for (int i = 0; i < linkArray.length; i++) {
985             _linkList.addElement(linkArray[i]);
986         }
987     } //-- void setLink(org.vamsas.objects.core.Link) 
988
989     /**
990      * Sets the value of field 'modifiable'. The field 'modifiable'
991      * has the following description: objects with modifiable=false
992      * will not be
993      *  modified by a vamsas client update
994      *  
995      * 
996      * @param modifiable the value of field 'modifiable'.
997      */
998     public void setModifiable(boolean modifiable)
999     {
1000         this._modifiable = modifiable;
1001         this._has_modifiable = true;
1002     } //-- void setModifiable(boolean) 
1003
1004     /**
1005      * Method setProperty
1006      * 
1007      * 
1008      * 
1009      * @param index
1010      * @param vProperty
1011      */
1012     public void setProperty(int index, org.vamsas.objects.core.Property vProperty)
1013         throws java.lang.IndexOutOfBoundsException
1014     {
1015         //-- check bounds for index
1016         if ((index < 0) || (index > _propertyList.size())) {
1017             throw new IndexOutOfBoundsException("setProperty: Index value '"+index+"' not in range [0.."+_propertyList.size()+ "]");
1018         }
1019         _propertyList.setElementAt(vProperty, index);
1020     } //-- void setProperty(int, org.vamsas.objects.core.Property) 
1021
1022     /**
1023      * Method setProperty
1024      * 
1025      * 
1026      * 
1027      * @param propertyArray
1028      */
1029     public void setProperty(org.vamsas.objects.core.Property[] propertyArray)
1030     {
1031         //-- copy array
1032         _propertyList.removeAllElements();
1033         for (int i = 0; i < propertyArray.length; i++) {
1034             _propertyList.addElement(propertyArray[i]);
1035         }
1036     } //-- void setProperty(org.vamsas.objects.core.Property) 
1037
1038     /**
1039      * Method setScore
1040      * 
1041      * 
1042      * 
1043      * @param index
1044      * @param vScore
1045      */
1046     public void setScore(int index, org.vamsas.objects.core.Score vScore)
1047         throws java.lang.IndexOutOfBoundsException
1048     {
1049         //-- check bounds for index
1050         if ((index < 0) || (index > _scoreList.size())) {
1051             throw new IndexOutOfBoundsException("setScore: Index value '"+index+"' not in range [0.."+_scoreList.size()+ "]");
1052         }
1053         _scoreList.setElementAt(vScore, index);
1054     } //-- void setScore(int, org.vamsas.objects.core.Score) 
1055
1056     /**
1057      * Method setScore
1058      * 
1059      * 
1060      * 
1061      * @param scoreArray
1062      */
1063     public void setScore(org.vamsas.objects.core.Score[] scoreArray)
1064     {
1065         //-- copy array
1066         _scoreList.removeAllElements();
1067         for (int i = 0; i < scoreArray.length; i++) {
1068             _scoreList.addElement(scoreArray[i]);
1069         }
1070     } //-- void setScore(org.vamsas.objects.core.Score) 
1071
1072     /**
1073      * Sets the value of field 'status'. The field 'status' has the
1074      * following description: TODO: specify this - we have
1075      * considered taking the GO evidence codes as a model for
1076      * assessing a measure of quality to an annotation.
1077      *  
1078      * 
1079      * @param status the value of field 'status'.
1080      */
1081     public void setStatus(java.lang.String status)
1082     {
1083         this._status = status;
1084     } //-- void setStatus(java.lang.String) 
1085
1086     /**
1087      * Sets the value of field 'type'. The field 'type' has the
1088      * following description: A Das Feature has both a type and a
1089      * Type ID.
1090      *  We go the route of requiring the type string
1091      *  to be taken from a controlled vocabulary if
1092      *  an application expects others to make sense
1093      *  of it. 
1094      *  The type may qualified - so uniprot:CHAIN is a valid type
1095      * name, 
1096      *  and considered distinct from someotherDB:CHAIN
1097      *  
1098      * 
1099      * @param type the value of field 'type'.
1100      */
1101     public void setType(java.lang.String type)
1102     {
1103         this._type = type;
1104     } //-- void setType(java.lang.String) 
1105
1106     /**
1107      * Method unmarshal
1108      * 
1109      * 
1110      * 
1111      * @param reader
1112      * @return RangeType
1113      */
1114     public static org.vamsas.objects.core.RangeType unmarshal(java.io.Reader reader)
1115         throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
1116     {
1117         return (org.vamsas.objects.core.RangeAnnotation) Unmarshaller.unmarshal(org.vamsas.objects.core.RangeAnnotation.class, reader);
1118     } //-- org.vamsas.objects.core.RangeType unmarshal(java.io.Reader) 
1119
1120     /**
1121      * Method validate
1122      * 
1123      */
1124     public void validate()
1125         throws org.exolab.castor.xml.ValidationException
1126     {
1127         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1128         validator.validate(this);
1129     } //-- void validate() 
1130
1131 }