2a2adda6df2c17a90e25a7af063e9ae6e8207bf2
[vamsas.git] / src / uk / ac / vamsas / objects / core / RangeAnnotation.java
1 /*\r
2  * This class was automatically generated with \r
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML\r
4  * Schema.\r
5  * $Id$\r
6  */\r
7 \r
8 package uk.ac.vamsas.objects.core;\r
9 \r
10   //---------------------------------/\r
11  //- Imported classes and packages -/\r
12 //---------------------------------/\r
13 \r
14 import org.exolab.castor.xml.Marshaller;\r
15 import org.exolab.castor.xml.Unmarshaller;\r
16 \r
17 /**\r
18  * Annotation for a rangeSpec - values can be attached for the\r
19  * whole\r
20  *  specification, and to each position within the spec. following\r
21  * the orientation\r
22  *  specified by the ordered set of rangeSpec (pos, seg) elements. \r
23  * \r
24  * @version $Revision$ $Date$\r
25  */\r
26 public class RangeAnnotation extends uk.ac.vamsas.objects.core.RangeType \r
27 implements java.io.Serializable\r
28 {\r
29 \r
30 \r
31       //--------------------------/\r
32      //- Class/Member Variables -/\r
33     //--------------------------/\r
34 \r
35     /**\r
36      * Primary Key for vamsas object referencing\r
37      *  \r
38      */\r
39     private java.lang.String _id;\r
40 \r
41     /**\r
42      * Field _modifiable.\r
43      */\r
44     private java.lang.String _modifiable;\r
45 \r
46     /**\r
47      * Annotation with the same non-empty group name are grouped\r
48      *  together \r
49      */\r
50     private java.lang.String _group = "";\r
51 \r
52     /**\r
53      * A Das Feature has both a type and a Type ID. We go the\r
54      *  route of requiring the type string to be taken from a\r
55      * controlled\r
56      *  vocabulary if an application expects others to make sense\r
57      * of it. The\r
58      *  type may qualified - so uniprot:CHAIN is a valid type name,\r
59      * and\r
60      *  considered distinct from someotherDB:CHAIN \r
61      */\r
62     private java.lang.String _type;\r
63 \r
64     /**\r
65      * Short, meaningful name for the annotation - if this\r
66      *  is absent, then the type string should be used in its\r
67      * place.\r
68      *  \r
69      */\r
70     private java.lang.String _label;\r
71 \r
72     /**\r
73      * Human readable description of the annotation\r
74      *  \r
75      */\r
76     private java.lang.String _description;\r
77 \r
78     /**\r
79      * TODO: specify this - we have considered taking the GO\r
80      *  evidence codes as a model for assessing a measure of\r
81      * quality to an\r
82      *  annotation. \r
83      */\r
84     private java.lang.String _status;\r
85 \r
86     /**\r
87      * Annotation Element position maps to ordered positions\r
88      *  defined by the sequence of rangeType pos positions or\r
89      * concatenated\r
90      *  seg start/end segments. \r
91      */\r
92     private java.util.Vector _annotationElementList;\r
93 \r
94     /**\r
95      * Ordered set of optionally named float values for the\r
96      *  whole annotation \r
97      */\r
98     private java.util.Vector _scoreList;\r
99 \r
100     /**\r
101      * Field _linkList.\r
102      */\r
103     private java.util.Vector _linkList;\r
104 \r
105     /**\r
106      * Note:These are mutable so an application should check\r
107      *  them each time. \r
108      */\r
109     private java.util.Vector _propertyList;\r
110 \r
111 \r
112       //----------------/\r
113      //- Constructors -/\r
114     //----------------/\r
115 \r
116     public RangeAnnotation() {\r
117         super();\r
118         setGroup("");\r
119         this._annotationElementList = new java.util.Vector();\r
120         this._scoreList = new java.util.Vector();\r
121         this._linkList = new java.util.Vector();\r
122         this._propertyList = new java.util.Vector();\r
123     }\r
124 \r
125 \r
126       //-----------/\r
127      //- Methods -/\r
128     //-----------/\r
129 \r
130     /**\r
131      * \r
132      * \r
133      * @param vAnnotationElement\r
134      * @throws java.lang.IndexOutOfBoundsException if the index\r
135      * given is outside the bounds of the collection\r
136      */\r
137     public void addAnnotationElement(\r
138             final uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement)\r
139     throws java.lang.IndexOutOfBoundsException {\r
140         this._annotationElementList.addElement(vAnnotationElement);\r
141     }\r
142 \r
143     /**\r
144      * \r
145      * \r
146      * @param index\r
147      * @param vAnnotationElement\r
148      * @throws java.lang.IndexOutOfBoundsException if the index\r
149      * given is outside the bounds of the collection\r
150      */\r
151     public void addAnnotationElement(\r
152             final int index,\r
153             final uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement)\r
154     throws java.lang.IndexOutOfBoundsException {\r
155         this._annotationElementList.add(index, vAnnotationElement);\r
156     }\r
157 \r
158     /**\r
159      * \r
160      * \r
161      * @param vLink\r
162      * @throws java.lang.IndexOutOfBoundsException if the index\r
163      * given is outside the bounds of the collection\r
164      */\r
165     public void addLink(\r
166             final uk.ac.vamsas.objects.core.Link vLink)\r
167     throws java.lang.IndexOutOfBoundsException {\r
168         this._linkList.addElement(vLink);\r
169     }\r
170 \r
171     /**\r
172      * \r
173      * \r
174      * @param index\r
175      * @param vLink\r
176      * @throws java.lang.IndexOutOfBoundsException if the index\r
177      * given is outside the bounds of the collection\r
178      */\r
179     public void addLink(\r
180             final int index,\r
181             final uk.ac.vamsas.objects.core.Link vLink)\r
182     throws java.lang.IndexOutOfBoundsException {\r
183         this._linkList.add(index, vLink);\r
184     }\r
185 \r
186     /**\r
187      * \r
188      * \r
189      * @param vProperty\r
190      * @throws java.lang.IndexOutOfBoundsException if the index\r
191      * given is outside the bounds of the collection\r
192      */\r
193     public void addProperty(\r
194             final uk.ac.vamsas.objects.core.Property vProperty)\r
195     throws java.lang.IndexOutOfBoundsException {\r
196         this._propertyList.addElement(vProperty);\r
197     }\r
198 \r
199     /**\r
200      * \r
201      * \r
202      * @param index\r
203      * @param vProperty\r
204      * @throws java.lang.IndexOutOfBoundsException if the index\r
205      * given is outside the bounds of the collection\r
206      */\r
207     public void addProperty(\r
208             final int index,\r
209             final uk.ac.vamsas.objects.core.Property vProperty)\r
210     throws java.lang.IndexOutOfBoundsException {\r
211         this._propertyList.add(index, vProperty);\r
212     }\r
213 \r
214     /**\r
215      * \r
216      * \r
217      * @param vScore\r
218      * @throws java.lang.IndexOutOfBoundsException if the index\r
219      * given is outside the bounds of the collection\r
220      */\r
221     public void addScore(\r
222             final uk.ac.vamsas.objects.core.Score vScore)\r
223     throws java.lang.IndexOutOfBoundsException {\r
224         this._scoreList.addElement(vScore);\r
225     }\r
226 \r
227     /**\r
228      * \r
229      * \r
230      * @param index\r
231      * @param vScore\r
232      * @throws java.lang.IndexOutOfBoundsException if the index\r
233      * given is outside the bounds of the collection\r
234      */\r
235     public void addScore(\r
236             final int index,\r
237             final uk.ac.vamsas.objects.core.Score vScore)\r
238     throws java.lang.IndexOutOfBoundsException {\r
239         this._scoreList.add(index, vScore);\r
240     }\r
241 \r
242     /**\r
243      * Method enumerateAnnotationElement.\r
244      * \r
245      * @return an Enumeration over all\r
246      * uk.ac.vamsas.objects.core.AnnotationElement elements\r
247      */\r
248     public java.util.Enumeration enumerateAnnotationElement(\r
249     ) {\r
250         return this._annotationElementList.elements();\r
251     }\r
252 \r
253     /**\r
254      * Method enumerateLink.\r
255      * \r
256      * @return an Enumeration over all\r
257      * uk.ac.vamsas.objects.core.Link elements\r
258      */\r
259     public java.util.Enumeration enumerateLink(\r
260     ) {\r
261         return this._linkList.elements();\r
262     }\r
263 \r
264     /**\r
265      * Method enumerateProperty.\r
266      * \r
267      * @return an Enumeration over all\r
268      * uk.ac.vamsas.objects.core.Property elements\r
269      */\r
270     public java.util.Enumeration enumerateProperty(\r
271     ) {\r
272         return this._propertyList.elements();\r
273     }\r
274 \r
275     /**\r
276      * Method enumerateScore.\r
277      * \r
278      * @return an Enumeration over all\r
279      * uk.ac.vamsas.objects.core.Score elements\r
280      */\r
281     public java.util.Enumeration enumerateScore(\r
282     ) {\r
283         return this._scoreList.elements();\r
284     }\r
285 \r
286     /**\r
287      * Overrides the java.lang.Object.equals method.\r
288      * \r
289      * @param obj\r
290      * @return true if the objects are equal.\r
291      */\r
292     public boolean equals(\r
293             final java.lang.Object obj) {\r
294         if ( this == obj )\r
295             return true;\r
296         \r
297         if (super.equals(obj)==false)\r
298             return false;\r
299         \r
300         if (obj instanceof RangeAnnotation) {\r
301         \r
302             RangeAnnotation temp = (RangeAnnotation)obj;\r
303             boolean thcycle;\r
304             boolean tmcycle;\r
305             if (this._id != null) {\r
306                 if (temp._id == null) return false;\r
307                 if (this._id != temp._id) {\r
308                     thcycle=org.castor.util.CycleBreaker.startingToCycle(this._id);\r
309                     tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._id);\r
310                     if (thcycle!=tmcycle) {\r
311                         if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._id); };\r
312                         if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._id); };\r
313                         return false;\r
314                     }\r
315                     if (!thcycle) {\r
316                         if (!this._id.equals(temp._id)) {\r
317                             org.castor.util.CycleBreaker.releaseCycleHandle(this._id);\r
318                             org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);\r
319                             return false;\r
320                         }\r
321                         org.castor.util.CycleBreaker.releaseCycleHandle(this._id);\r
322                         org.castor.util.CycleBreaker.releaseCycleHandle(temp._id);\r
323                     }\r
324                 }\r
325             } else if (temp._id != null)\r
326                 return false;\r
327             if (this._modifiable != null) {\r
328                 if (temp._modifiable == null) return false;\r
329                 if (this._modifiable != temp._modifiable) {\r
330                     thcycle=org.castor.util.CycleBreaker.startingToCycle(this._modifiable);\r
331                     tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._modifiable);\r
332                     if (thcycle!=tmcycle) {\r
333                         if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable); };\r
334                         if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable); };\r
335                         return false;\r
336                     }\r
337                     if (!thcycle) {\r
338                         if (!this._modifiable.equals(temp._modifiable)) {\r
339                             org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable);\r
340                             org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable);\r
341                             return false;\r
342                         }\r
343                         org.castor.util.CycleBreaker.releaseCycleHandle(this._modifiable);\r
344                         org.castor.util.CycleBreaker.releaseCycleHandle(temp._modifiable);\r
345                     }\r
346                 }\r
347             } else if (temp._modifiable != null)\r
348                 return false;\r
349             if (this._group != null) {\r
350                 if (temp._group == null) return false;\r
351                 if (this._group != temp._group) {\r
352                     thcycle=org.castor.util.CycleBreaker.startingToCycle(this._group);\r
353                     tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._group);\r
354                     if (thcycle!=tmcycle) {\r
355                         if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._group); };\r
356                         if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._group); };\r
357                         return false;\r
358                     }\r
359                     if (!thcycle) {\r
360                         if (!this._group.equals(temp._group)) {\r
361                             org.castor.util.CycleBreaker.releaseCycleHandle(this._group);\r
362                             org.castor.util.CycleBreaker.releaseCycleHandle(temp._group);\r
363                             return false;\r
364                         }\r
365                         org.castor.util.CycleBreaker.releaseCycleHandle(this._group);\r
366                         org.castor.util.CycleBreaker.releaseCycleHandle(temp._group);\r
367                     }\r
368                 }\r
369             } else if (temp._group != null)\r
370                 return false;\r
371             if (this._type != null) {\r
372                 if (temp._type == null) return false;\r
373                 if (this._type != temp._type) {\r
374                     thcycle=org.castor.util.CycleBreaker.startingToCycle(this._type);\r
375                     tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._type);\r
376                     if (thcycle!=tmcycle) {\r
377                         if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._type); };\r
378                         if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._type); };\r
379                         return false;\r
380                     }\r
381                     if (!thcycle) {\r
382                         if (!this._type.equals(temp._type)) {\r
383                             org.castor.util.CycleBreaker.releaseCycleHandle(this._type);\r
384                             org.castor.util.CycleBreaker.releaseCycleHandle(temp._type);\r
385                             return false;\r
386                         }\r
387                         org.castor.util.CycleBreaker.releaseCycleHandle(this._type);\r
388                         org.castor.util.CycleBreaker.releaseCycleHandle(temp._type);\r
389                     }\r
390                 }\r
391             } else if (temp._type != null)\r
392                 return false;\r
393             if (this._label != null) {\r
394                 if (temp._label == null) return false;\r
395                 if (this._label != temp._label) {\r
396                     thcycle=org.castor.util.CycleBreaker.startingToCycle(this._label);\r
397                     tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._label);\r
398                     if (thcycle!=tmcycle) {\r
399                         if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._label); };\r
400                         if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._label); };\r
401                         return false;\r
402                     }\r
403                     if (!thcycle) {\r
404                         if (!this._label.equals(temp._label)) {\r
405                             org.castor.util.CycleBreaker.releaseCycleHandle(this._label);\r
406                             org.castor.util.CycleBreaker.releaseCycleHandle(temp._label);\r
407                             return false;\r
408                         }\r
409                         org.castor.util.CycleBreaker.releaseCycleHandle(this._label);\r
410                         org.castor.util.CycleBreaker.releaseCycleHandle(temp._label);\r
411                     }\r
412                 }\r
413             } else if (temp._label != null)\r
414                 return false;\r
415             if (this._description != null) {\r
416                 if (temp._description == null) return false;\r
417                 if (this._description != temp._description) {\r
418                     thcycle=org.castor.util.CycleBreaker.startingToCycle(this._description);\r
419                     tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._description);\r
420                     if (thcycle!=tmcycle) {\r
421                         if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._description); };\r
422                         if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._description); };\r
423                         return false;\r
424                     }\r
425                     if (!thcycle) {\r
426                         if (!this._description.equals(temp._description)) {\r
427                             org.castor.util.CycleBreaker.releaseCycleHandle(this._description);\r
428                             org.castor.util.CycleBreaker.releaseCycleHandle(temp._description);\r
429                             return false;\r
430                         }\r
431                         org.castor.util.CycleBreaker.releaseCycleHandle(this._description);\r
432                         org.castor.util.CycleBreaker.releaseCycleHandle(temp._description);\r
433                     }\r
434                 }\r
435             } else if (temp._description != null)\r
436                 return false;\r
437             if (this._status != null) {\r
438                 if (temp._status == null) return false;\r
439                 if (this._status != temp._status) {\r
440                     thcycle=org.castor.util.CycleBreaker.startingToCycle(this._status);\r
441                     tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._status);\r
442                     if (thcycle!=tmcycle) {\r
443                         if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._status); };\r
444                         if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._status); };\r
445                         return false;\r
446                     }\r
447                     if (!thcycle) {\r
448                         if (!this._status.equals(temp._status)) {\r
449                             org.castor.util.CycleBreaker.releaseCycleHandle(this._status);\r
450                             org.castor.util.CycleBreaker.releaseCycleHandle(temp._status);\r
451                             return false;\r
452                         }\r
453                         org.castor.util.CycleBreaker.releaseCycleHandle(this._status);\r
454                         org.castor.util.CycleBreaker.releaseCycleHandle(temp._status);\r
455                     }\r
456                 }\r
457             } else if (temp._status != null)\r
458                 return false;\r
459             if (this._annotationElementList != null) {\r
460                 if (temp._annotationElementList == null) return false;\r
461                 if (this._annotationElementList != temp._annotationElementList) {\r
462                     thcycle=org.castor.util.CycleBreaker.startingToCycle(this._annotationElementList);\r
463                     tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._annotationElementList);\r
464                     if (thcycle!=tmcycle) {\r
465                         if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._annotationElementList); };\r
466                         if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._annotationElementList); };\r
467                         return false;\r
468                     }\r
469                     if (!thcycle) {\r
470                         if (!this._annotationElementList.equals(temp._annotationElementList)) {\r
471                             org.castor.util.CycleBreaker.releaseCycleHandle(this._annotationElementList);\r
472                             org.castor.util.CycleBreaker.releaseCycleHandle(temp._annotationElementList);\r
473                             return false;\r
474                         }\r
475                         org.castor.util.CycleBreaker.releaseCycleHandle(this._annotationElementList);\r
476                         org.castor.util.CycleBreaker.releaseCycleHandle(temp._annotationElementList);\r
477                     }\r
478                 }\r
479             } else if (temp._annotationElementList != null)\r
480                 return false;\r
481             if (this._scoreList != null) {\r
482                 if (temp._scoreList == null) return false;\r
483                 if (this._scoreList != temp._scoreList) {\r
484                     thcycle=org.castor.util.CycleBreaker.startingToCycle(this._scoreList);\r
485                     tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._scoreList);\r
486                     if (thcycle!=tmcycle) {\r
487                         if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._scoreList); };\r
488                         if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._scoreList); };\r
489                         return false;\r
490                     }\r
491                     if (!thcycle) {\r
492                         if (!this._scoreList.equals(temp._scoreList)) {\r
493                             org.castor.util.CycleBreaker.releaseCycleHandle(this._scoreList);\r
494                             org.castor.util.CycleBreaker.releaseCycleHandle(temp._scoreList);\r
495                             return false;\r
496                         }\r
497                         org.castor.util.CycleBreaker.releaseCycleHandle(this._scoreList);\r
498                         org.castor.util.CycleBreaker.releaseCycleHandle(temp._scoreList);\r
499                     }\r
500                 }\r
501             } else if (temp._scoreList != null)\r
502                 return false;\r
503             if (this._linkList != null) {\r
504                 if (temp._linkList == null) return false;\r
505                 if (this._linkList != temp._linkList) {\r
506                     thcycle=org.castor.util.CycleBreaker.startingToCycle(this._linkList);\r
507                     tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._linkList);\r
508                     if (thcycle!=tmcycle) {\r
509                         if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._linkList); };\r
510                         if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._linkList); };\r
511                         return false;\r
512                     }\r
513                     if (!thcycle) {\r
514                         if (!this._linkList.equals(temp._linkList)) {\r
515                             org.castor.util.CycleBreaker.releaseCycleHandle(this._linkList);\r
516                             org.castor.util.CycleBreaker.releaseCycleHandle(temp._linkList);\r
517                             return false;\r
518                         }\r
519                         org.castor.util.CycleBreaker.releaseCycleHandle(this._linkList);\r
520                         org.castor.util.CycleBreaker.releaseCycleHandle(temp._linkList);\r
521                     }\r
522                 }\r
523             } else if (temp._linkList != null)\r
524                 return false;\r
525             if (this._propertyList != null) {\r
526                 if (temp._propertyList == null) return false;\r
527                 if (this._propertyList != temp._propertyList) {\r
528                     thcycle=org.castor.util.CycleBreaker.startingToCycle(this._propertyList);\r
529                     tmcycle=org.castor.util.CycleBreaker.startingToCycle(temp._propertyList);\r
530                     if (thcycle!=tmcycle) {\r
531                         if (!thcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList); };\r
532                         if (!tmcycle) { org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList); };\r
533                         return false;\r
534                     }\r
535                     if (!thcycle) {\r
536                         if (!this._propertyList.equals(temp._propertyList)) {\r
537                             org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);\r
538                             org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);\r
539                             return false;\r
540                         }\r
541                         org.castor.util.CycleBreaker.releaseCycleHandle(this._propertyList);\r
542                         org.castor.util.CycleBreaker.releaseCycleHandle(temp._propertyList);\r
543                     }\r
544                 }\r
545             } else if (temp._propertyList != null)\r
546                 return false;\r
547             return true;\r
548         }\r
549         return false;\r
550     }\r
551 \r
552     /**\r
553      * Method getAnnotationElement.\r
554      * \r
555      * @param index\r
556      * @throws java.lang.IndexOutOfBoundsException if the index\r
557      * given is outside the bounds of the collection\r
558      * @return the value of the\r
559      * uk.ac.vamsas.objects.core.AnnotationElement at the given inde\r
560      */\r
561     public uk.ac.vamsas.objects.core.AnnotationElement getAnnotationElement(\r
562             final int index)\r
563     throws java.lang.IndexOutOfBoundsException {\r
564         // check bounds for index\r
565         if (index < 0 || index >= this._annotationElementList.size()) {\r
566             throw new IndexOutOfBoundsException("getAnnotationElement: Index value '" + index + "' not in range [0.." + (this._annotationElementList.size() - 1) + "]");\r
567         }\r
568         \r
569         return (uk.ac.vamsas.objects.core.AnnotationElement) _annotationElementList.get(index);\r
570     }\r
571 \r
572     /**\r
573      * Method getAnnotationElement.Returns the contents of the\r
574      * collection in an Array.  <p>Note:  Just in case the\r
575      * collection contents are changing in another thread, we pass\r
576      * a 0-length Array of the correct type into the API call. \r
577      * This way we <i>know</i> that the Array returned is of\r
578      * exactly the correct length.\r
579      * \r
580      * @return this collection as an Array\r
581      */\r
582     public uk.ac.vamsas.objects.core.AnnotationElement[] getAnnotationElement(\r
583     ) {\r
584         uk.ac.vamsas.objects.core.AnnotationElement[] array = new uk.ac.vamsas.objects.core.AnnotationElement[0];\r
585         return (uk.ac.vamsas.objects.core.AnnotationElement[]) this._annotationElementList.toArray(array);\r
586     }\r
587 \r
588     /**\r
589      * Method getAnnotationElementAsReference.Returns a reference\r
590      * to '_annotationElementList'. No type checking is performed\r
591      * on any modifications to the Vector.\r
592      * \r
593      * @return a reference to the Vector backing this class\r
594      */\r
595     public java.util.Vector getAnnotationElementAsReference(\r
596     ) {\r
597         return this._annotationElementList;\r
598     }\r
599 \r
600     /**\r
601      * Method getAnnotationElementCount.\r
602      * \r
603      * @return the size of this collection\r
604      */\r
605     public int getAnnotationElementCount(\r
606     ) {\r
607         return this._annotationElementList.size();\r
608     }\r
609 \r
610     /**\r
611      * Returns the value of field 'description'. The field\r
612      * 'description' has the following description: Human readable\r
613      * description of the annotation\r
614      *  \r
615      * \r
616      * @return the value of field 'Description'.\r
617      */\r
618     public java.lang.String getDescription(\r
619     ) {\r
620         return this._description;\r
621     }\r
622 \r
623     /**\r
624      * Returns the value of field 'group'. The field 'group' has\r
625      * the following description: Annotation with the same\r
626      * non-empty group name are grouped\r
627      *  together \r
628      * \r
629      * @return the value of field 'Group'.\r
630      */\r
631     public java.lang.String getGroup(\r
632     ) {\r
633         return this._group;\r
634     }\r
635 \r
636     /**\r
637      * Returns the value of field 'id'. The field 'id' has the\r
638      * following description: Primary Key for vamsas object\r
639      * referencing\r
640      *  \r
641      * \r
642      * @return the value of field 'Id'.\r
643      */\r
644     public java.lang.String getId(\r
645     ) {\r
646         return this._id;\r
647     }\r
648 \r
649     /**\r
650      * Returns the value of field 'label'. The field 'label' has\r
651      * the following description: Short, meaningful name for the\r
652      * annotation - if this\r
653      *  is absent, then the type string should be used in its\r
654      * place.\r
655      *  \r
656      * \r
657      * @return the value of field 'Label'.\r
658      */\r
659     public java.lang.String getLabel(\r
660     ) {\r
661         return this._label;\r
662     }\r
663 \r
664     /**\r
665      * Method getLink.\r
666      * \r
667      * @param index\r
668      * @throws java.lang.IndexOutOfBoundsException if the index\r
669      * given is outside the bounds of the collection\r
670      * @return the value of the uk.ac.vamsas.objects.core.Link at\r
671      * the given index\r
672      */\r
673     public uk.ac.vamsas.objects.core.Link getLink(\r
674             final int index)\r
675     throws java.lang.IndexOutOfBoundsException {\r
676         // check bounds for index\r
677         if (index < 0 || index >= this._linkList.size()) {\r
678             throw new IndexOutOfBoundsException("getLink: Index value '" + index + "' not in range [0.." + (this._linkList.size() - 1) + "]");\r
679         }\r
680         \r
681         return (uk.ac.vamsas.objects.core.Link) _linkList.get(index);\r
682     }\r
683 \r
684     /**\r
685      * Method getLink.Returns the contents of the collection in an\r
686      * Array.  <p>Note:  Just in case the collection contents are\r
687      * changing in another thread, we pass a 0-length Array of the\r
688      * correct type into the API call.  This way we <i>know</i>\r
689      * that the Array returned is of exactly the correct length.\r
690      * \r
691      * @return this collection as an Array\r
692      */\r
693     public uk.ac.vamsas.objects.core.Link[] getLink(\r
694     ) {\r
695         uk.ac.vamsas.objects.core.Link[] array = new uk.ac.vamsas.objects.core.Link[0];\r
696         return (uk.ac.vamsas.objects.core.Link[]) this._linkList.toArray(array);\r
697     }\r
698 \r
699     /**\r
700      * Method getLinkAsReference.Returns a reference to\r
701      * '_linkList'. No type checking is performed on any\r
702      * modifications to the Vector.\r
703      * \r
704      * @return a reference to the Vector backing this class\r
705      */\r
706     public java.util.Vector getLinkAsReference(\r
707     ) {\r
708         return this._linkList;\r
709     }\r
710 \r
711     /**\r
712      * Method getLinkCount.\r
713      * \r
714      * @return the size of this collection\r
715      */\r
716     public int getLinkCount(\r
717     ) {\r
718         return this._linkList.size();\r
719     }\r
720 \r
721     /**\r
722      * Returns the value of field 'modifiable'.\r
723      * \r
724      * @return the value of field 'Modifiable'.\r
725      */\r
726     public java.lang.String getModifiable(\r
727     ) {\r
728         return this._modifiable;\r
729     }\r
730 \r
731     /**\r
732      * Method getProperty.\r
733      * \r
734      * @param index\r
735      * @throws java.lang.IndexOutOfBoundsException if the index\r
736      * given is outside the bounds of the collection\r
737      * @return the value of the uk.ac.vamsas.objects.core.Property\r
738      * at the given index\r
739      */\r
740     public uk.ac.vamsas.objects.core.Property getProperty(\r
741             final int index)\r
742     throws java.lang.IndexOutOfBoundsException {\r
743         // check bounds for index\r
744         if (index < 0 || index >= this._propertyList.size()) {\r
745             throw new IndexOutOfBoundsException("getProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");\r
746         }\r
747         \r
748         return (uk.ac.vamsas.objects.core.Property) _propertyList.get(index);\r
749     }\r
750 \r
751     /**\r
752      * Method getProperty.Returns the contents of the collection in\r
753      * an Array.  <p>Note:  Just in case the collection contents\r
754      * are changing in another thread, we pass a 0-length Array of\r
755      * the correct type into the API call.  This way we <i>know</i>\r
756      * that the Array returned is of exactly the correct length.\r
757      * \r
758      * @return this collection as an Array\r
759      */\r
760     public uk.ac.vamsas.objects.core.Property[] getProperty(\r
761     ) {\r
762         uk.ac.vamsas.objects.core.Property[] array = new uk.ac.vamsas.objects.core.Property[0];\r
763         return (uk.ac.vamsas.objects.core.Property[]) this._propertyList.toArray(array);\r
764     }\r
765 \r
766     /**\r
767      * Method getPropertyAsReference.Returns a reference to\r
768      * '_propertyList'. No type checking is performed on any\r
769      * modifications to the Vector.\r
770      * \r
771      * @return a reference to the Vector backing this class\r
772      */\r
773     public java.util.Vector getPropertyAsReference(\r
774     ) {\r
775         return this._propertyList;\r
776     }\r
777 \r
778     /**\r
779      * Method getPropertyCount.\r
780      * \r
781      * @return the size of this collection\r
782      */\r
783     public int getPropertyCount(\r
784     ) {\r
785         return this._propertyList.size();\r
786     }\r
787 \r
788     /**\r
789      * Method getScore.\r
790      * \r
791      * @param index\r
792      * @throws java.lang.IndexOutOfBoundsException if the index\r
793      * given is outside the bounds of the collection\r
794      * @return the value of the uk.ac.vamsas.objects.core.Score at\r
795      * the given index\r
796      */\r
797     public uk.ac.vamsas.objects.core.Score getScore(\r
798             final int index)\r
799     throws java.lang.IndexOutOfBoundsException {\r
800         // check bounds for index\r
801         if (index < 0 || index >= this._scoreList.size()) {\r
802             throw new IndexOutOfBoundsException("getScore: Index value '" + index + "' not in range [0.." + (this._scoreList.size() - 1) + "]");\r
803         }\r
804         \r
805         return (uk.ac.vamsas.objects.core.Score) _scoreList.get(index);\r
806     }\r
807 \r
808     /**\r
809      * Method getScore.Returns the contents of the collection in an\r
810      * Array.  <p>Note:  Just in case the collection contents are\r
811      * changing in another thread, we pass a 0-length Array of the\r
812      * correct type into the API call.  This way we <i>know</i>\r
813      * that the Array returned is of exactly the correct length.\r
814      * \r
815      * @return this collection as an Array\r
816      */\r
817     public uk.ac.vamsas.objects.core.Score[] getScore(\r
818     ) {\r
819         uk.ac.vamsas.objects.core.Score[] array = new uk.ac.vamsas.objects.core.Score[0];\r
820         return (uk.ac.vamsas.objects.core.Score[]) this._scoreList.toArray(array);\r
821     }\r
822 \r
823     /**\r
824      * Method getScoreAsReference.Returns a reference to\r
825      * '_scoreList'. No type checking is performed on any\r
826      * modifications to the Vector.\r
827      * \r
828      * @return a reference to the Vector backing this class\r
829      */\r
830     public java.util.Vector getScoreAsReference(\r
831     ) {\r
832         return this._scoreList;\r
833     }\r
834 \r
835     /**\r
836      * Method getScoreCount.\r
837      * \r
838      * @return the size of this collection\r
839      */\r
840     public int getScoreCount(\r
841     ) {\r
842         return this._scoreList.size();\r
843     }\r
844 \r
845     /**\r
846      * Returns the value of field 'status'. The field 'status' has\r
847      * the following description: TODO: specify this - we have\r
848      * considered taking the GO\r
849      *  evidence codes as a model for assessing a measure of\r
850      * quality to an\r
851      *  annotation. \r
852      * \r
853      * @return the value of field 'Status'.\r
854      */\r
855     public java.lang.String getStatus(\r
856     ) {\r
857         return this._status;\r
858     }\r
859 \r
860     /**\r
861      * Returns the value of field 'type'. The field 'type' has the\r
862      * following description: A Das Feature has both a type and a\r
863      * Type ID. We go the\r
864      *  route of requiring the type string to be taken from a\r
865      * controlled\r
866      *  vocabulary if an application expects others to make sense\r
867      * of it. The\r
868      *  type may qualified - so uniprot:CHAIN is a valid type name,\r
869      * and\r
870      *  considered distinct from someotherDB:CHAIN \r
871      * \r
872      * @return the value of field 'Type'.\r
873      */\r
874     public java.lang.String getType(\r
875     ) {\r
876         return this._type;\r
877     }\r
878 \r
879     /**\r
880      * Overrides the java.lang.Object.hashCode method.\r
881      * <p>\r
882      * The following steps came from <b>Effective Java Programming\r
883      * Language Guide</b> by Joshua Bloch, Chapter 3\r
884      * \r
885      * @return a hash code value for the object.\r
886      */\r
887     public int hashCode(\r
888     ) {\r
889         int result = super.hashCode();\r
890         \r
891         long tmp;\r
892         if (_id != null\r
893             && !org.castor.util.CycleBreaker.startingToCycle(_id)) {\r
894            result = 37 * result + _id.hashCode();\r
895            org.castor.util.CycleBreaker.releaseCycleHandle(_id);\r
896         }\r
897         if (_modifiable != null\r
898             && !org.castor.util.CycleBreaker.startingToCycle(_modifiable)) {\r
899            result = 37 * result + _modifiable.hashCode();\r
900            org.castor.util.CycleBreaker.releaseCycleHandle(_modifiable);\r
901         }\r
902         if (_group != null\r
903             && !org.castor.util.CycleBreaker.startingToCycle(_group)) {\r
904            result = 37 * result + _group.hashCode();\r
905            org.castor.util.CycleBreaker.releaseCycleHandle(_group);\r
906         }\r
907         if (_type != null\r
908             && !org.castor.util.CycleBreaker.startingToCycle(_type)) {\r
909            result = 37 * result + _type.hashCode();\r
910            org.castor.util.CycleBreaker.releaseCycleHandle(_type);\r
911         }\r
912         if (_label != null\r
913             && !org.castor.util.CycleBreaker.startingToCycle(_label)) {\r
914            result = 37 * result + _label.hashCode();\r
915            org.castor.util.CycleBreaker.releaseCycleHandle(_label);\r
916         }\r
917         if (_description != null\r
918             && !org.castor.util.CycleBreaker.startingToCycle(_description)) {\r
919            result = 37 * result + _description.hashCode();\r
920            org.castor.util.CycleBreaker.releaseCycleHandle(_description);\r
921         }\r
922         if (_status != null\r
923             && !org.castor.util.CycleBreaker.startingToCycle(_status)) {\r
924            result = 37 * result + _status.hashCode();\r
925            org.castor.util.CycleBreaker.releaseCycleHandle(_status);\r
926         }\r
927         if (_annotationElementList != null\r
928             && !org.castor.util.CycleBreaker.startingToCycle(_annotationElementList)) {\r
929            result = 37 * result + _annotationElementList.hashCode();\r
930            org.castor.util.CycleBreaker.releaseCycleHandle(_annotationElementList);\r
931         }\r
932         if (_scoreList != null\r
933             && !org.castor.util.CycleBreaker.startingToCycle(_scoreList)) {\r
934            result = 37 * result + _scoreList.hashCode();\r
935            org.castor.util.CycleBreaker.releaseCycleHandle(_scoreList);\r
936         }\r
937         if (_linkList != null\r
938             && !org.castor.util.CycleBreaker.startingToCycle(_linkList)) {\r
939            result = 37 * result + _linkList.hashCode();\r
940            org.castor.util.CycleBreaker.releaseCycleHandle(_linkList);\r
941         }\r
942         if (_propertyList != null\r
943             && !org.castor.util.CycleBreaker.startingToCycle(_propertyList)) {\r
944            result = 37 * result + _propertyList.hashCode();\r
945            org.castor.util.CycleBreaker.releaseCycleHandle(_propertyList);\r
946         }\r
947         \r
948         return result;\r
949     }\r
950 \r
951     /**\r
952      * Method isValid.\r
953      * \r
954      * @return true if this object is valid according to the schema\r
955      */\r
956     public boolean isValid(\r
957     ) {\r
958         try {\r
959             validate();\r
960         } catch (org.exolab.castor.xml.ValidationException vex) {\r
961             return false;\r
962         }\r
963         return true;\r
964     }\r
965 \r
966     /**\r
967      * \r
968      * \r
969      * @param out\r
970      * @throws org.exolab.castor.xml.MarshalException if object is\r
971      * null or if any SAXException is thrown during marshaling\r
972      * @throws org.exolab.castor.xml.ValidationException if this\r
973      * object is an invalid instance according to the schema\r
974      */\r
975     public void marshal(\r
976             final java.io.Writer out)\r
977     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
978         Marshaller.marshal(this, out);\r
979     }\r
980 \r
981     /**\r
982      * \r
983      * \r
984      * @param handler\r
985      * @throws java.io.IOException if an IOException occurs during\r
986      * marshaling\r
987      * @throws org.exolab.castor.xml.ValidationException if this\r
988      * object is an invalid instance according to the schema\r
989      * @throws org.exolab.castor.xml.MarshalException if object is\r
990      * null or if any SAXException is thrown during marshaling\r
991      */\r
992     public void marshal(\r
993             final org.xml.sax.ContentHandler handler)\r
994     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
995         Marshaller.marshal(this, handler);\r
996     }\r
997 \r
998     /**\r
999      */\r
1000     public void removeAllAnnotationElement(\r
1001     ) {\r
1002         this._annotationElementList.clear();\r
1003     }\r
1004 \r
1005     /**\r
1006      */\r
1007     public void removeAllLink(\r
1008     ) {\r
1009         this._linkList.clear();\r
1010     }\r
1011 \r
1012     /**\r
1013      */\r
1014     public void removeAllProperty(\r
1015     ) {\r
1016         this._propertyList.clear();\r
1017     }\r
1018 \r
1019     /**\r
1020      */\r
1021     public void removeAllScore(\r
1022     ) {\r
1023         this._scoreList.clear();\r
1024     }\r
1025 \r
1026     /**\r
1027      * Method removeAnnotationElement.\r
1028      * \r
1029      * @param vAnnotationElement\r
1030      * @return true if the object was removed from the collection.\r
1031      */\r
1032     public boolean removeAnnotationElement(\r
1033             final uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement) {\r
1034         boolean removed = _annotationElementList.remove(vAnnotationElement);\r
1035         return removed;\r
1036     }\r
1037 \r
1038     /**\r
1039      * Method removeAnnotationElementAt.\r
1040      * \r
1041      * @param index\r
1042      * @return the element removed from the collection\r
1043      */\r
1044     public uk.ac.vamsas.objects.core.AnnotationElement removeAnnotationElementAt(\r
1045             final int index) {\r
1046         java.lang.Object obj = this._annotationElementList.remove(index);\r
1047         return (uk.ac.vamsas.objects.core.AnnotationElement) obj;\r
1048     }\r
1049 \r
1050     /**\r
1051      * Method removeLink.\r
1052      * \r
1053      * @param vLink\r
1054      * @return true if the object was removed from the collection.\r
1055      */\r
1056     public boolean removeLink(\r
1057             final uk.ac.vamsas.objects.core.Link vLink) {\r
1058         boolean removed = _linkList.remove(vLink);\r
1059         return removed;\r
1060     }\r
1061 \r
1062     /**\r
1063      * Method removeLinkAt.\r
1064      * \r
1065      * @param index\r
1066      * @return the element removed from the collection\r
1067      */\r
1068     public uk.ac.vamsas.objects.core.Link removeLinkAt(\r
1069             final int index) {\r
1070         java.lang.Object obj = this._linkList.remove(index);\r
1071         return (uk.ac.vamsas.objects.core.Link) obj;\r
1072     }\r
1073 \r
1074     /**\r
1075      * Method removeProperty.\r
1076      * \r
1077      * @param vProperty\r
1078      * @return true if the object was removed from the collection.\r
1079      */\r
1080     public boolean removeProperty(\r
1081             final uk.ac.vamsas.objects.core.Property vProperty) {\r
1082         boolean removed = _propertyList.remove(vProperty);\r
1083         return removed;\r
1084     }\r
1085 \r
1086     /**\r
1087      * Method removePropertyAt.\r
1088      * \r
1089      * @param index\r
1090      * @return the element removed from the collection\r
1091      */\r
1092     public uk.ac.vamsas.objects.core.Property removePropertyAt(\r
1093             final int index) {\r
1094         java.lang.Object obj = this._propertyList.remove(index);\r
1095         return (uk.ac.vamsas.objects.core.Property) obj;\r
1096     }\r
1097 \r
1098     /**\r
1099      * Method removeScore.\r
1100      * \r
1101      * @param vScore\r
1102      * @return true if the object was removed from the collection.\r
1103      */\r
1104     public boolean removeScore(\r
1105             final uk.ac.vamsas.objects.core.Score vScore) {\r
1106         boolean removed = _scoreList.remove(vScore);\r
1107         return removed;\r
1108     }\r
1109 \r
1110     /**\r
1111      * Method removeScoreAt.\r
1112      * \r
1113      * @param index\r
1114      * @return the element removed from the collection\r
1115      */\r
1116     public uk.ac.vamsas.objects.core.Score removeScoreAt(\r
1117             final int index) {\r
1118         java.lang.Object obj = this._scoreList.remove(index);\r
1119         return (uk.ac.vamsas.objects.core.Score) obj;\r
1120     }\r
1121 \r
1122     /**\r
1123      * \r
1124      * \r
1125      * @param index\r
1126      * @param vAnnotationElement\r
1127      * @throws java.lang.IndexOutOfBoundsException if the index\r
1128      * given is outside the bounds of the collection\r
1129      */\r
1130     public void setAnnotationElement(\r
1131             final int index,\r
1132             final uk.ac.vamsas.objects.core.AnnotationElement vAnnotationElement)\r
1133     throws java.lang.IndexOutOfBoundsException {\r
1134         // check bounds for index\r
1135         if (index < 0 || index >= this._annotationElementList.size()) {\r
1136             throw new IndexOutOfBoundsException("setAnnotationElement: Index value '" + index + "' not in range [0.." + (this._annotationElementList.size() - 1) + "]");\r
1137         }\r
1138         \r
1139         this._annotationElementList.set(index, vAnnotationElement);\r
1140     }\r
1141 \r
1142     /**\r
1143      * \r
1144      * \r
1145      * @param vAnnotationElementArray\r
1146      */\r
1147     public void setAnnotationElement(\r
1148             final uk.ac.vamsas.objects.core.AnnotationElement[] vAnnotationElementArray) {\r
1149         //-- copy array\r
1150         _annotationElementList.clear();\r
1151         \r
1152         for (int i = 0; i < vAnnotationElementArray.length; i++) {\r
1153                 this._annotationElementList.add(vAnnotationElementArray[i]);\r
1154         }\r
1155     }\r
1156 \r
1157     /**\r
1158      * Sets the value of '_annotationElementList' by copying the\r
1159      * given Vector. All elements will be checked for type safety.\r
1160      * \r
1161      * @param vAnnotationElementList the Vector to copy.\r
1162      */\r
1163     public void setAnnotationElement(\r
1164             final java.util.Vector vAnnotationElementList) {\r
1165         // copy vector\r
1166         this._annotationElementList.clear();\r
1167         \r
1168         this._annotationElementList.addAll(vAnnotationElementList);\r
1169     }\r
1170 \r
1171     /**\r
1172      * Sets the value of '_annotationElementList' by setting it to\r
1173      * the given Vector. No type checking is performed.\r
1174      * @deprecated\r
1175      * \r
1176      * @param annotationElementVector the Vector to set.\r
1177      */\r
1178     public void setAnnotationElementAsReference(\r
1179             final java.util.Vector annotationElementVector) {\r
1180         this._annotationElementList = annotationElementVector;\r
1181     }\r
1182 \r
1183     /**\r
1184      * Sets the value of field 'description'. The field\r
1185      * 'description' has the following description: Human readable\r
1186      * description of the annotation\r
1187      *  \r
1188      * \r
1189      * @param description the value of field 'description'.\r
1190      */\r
1191     public void setDescription(\r
1192             final java.lang.String description) {\r
1193         this._description = description;\r
1194     }\r
1195 \r
1196     /**\r
1197      * Sets the value of field 'group'. The field 'group' has the\r
1198      * following description: Annotation with the same non-empty\r
1199      * group name are grouped\r
1200      *  together \r
1201      * \r
1202      * @param group the value of field 'group'.\r
1203      */\r
1204     public void setGroup(\r
1205             final java.lang.String group) {\r
1206         this._group = group;\r
1207     }\r
1208 \r
1209     /**\r
1210      * Sets the value of field 'id'. The field 'id' has the\r
1211      * following description: Primary Key for vamsas object\r
1212      * referencing\r
1213      *  \r
1214      * \r
1215      * @param id the value of field 'id'.\r
1216      */\r
1217     public void setId(\r
1218             final java.lang.String id) {\r
1219         this._id = id;\r
1220     }\r
1221 \r
1222     /**\r
1223      * Sets the value of field 'label'. The field 'label' has the\r
1224      * following description: Short, meaningful name for the\r
1225      * annotation - if this\r
1226      *  is absent, then the type string should be used in its\r
1227      * place.\r
1228      *  \r
1229      * \r
1230      * @param label the value of field 'label'.\r
1231      */\r
1232     public void setLabel(\r
1233             final java.lang.String label) {\r
1234         this._label = label;\r
1235     }\r
1236 \r
1237     /**\r
1238      * \r
1239      * \r
1240      * @param index\r
1241      * @param vLink\r
1242      * @throws java.lang.IndexOutOfBoundsException if the index\r
1243      * given is outside the bounds of the collection\r
1244      */\r
1245     public void setLink(\r
1246             final int index,\r
1247             final uk.ac.vamsas.objects.core.Link vLink)\r
1248     throws java.lang.IndexOutOfBoundsException {\r
1249         // check bounds for index\r
1250         if (index < 0 || index >= this._linkList.size()) {\r
1251             throw new IndexOutOfBoundsException("setLink: Index value '" + index + "' not in range [0.." + (this._linkList.size() - 1) + "]");\r
1252         }\r
1253         \r
1254         this._linkList.set(index, vLink);\r
1255     }\r
1256 \r
1257     /**\r
1258      * \r
1259      * \r
1260      * @param vLinkArray\r
1261      */\r
1262     public void setLink(\r
1263             final uk.ac.vamsas.objects.core.Link[] vLinkArray) {\r
1264         //-- copy array\r
1265         _linkList.clear();\r
1266         \r
1267         for (int i = 0; i < vLinkArray.length; i++) {\r
1268                 this._linkList.add(vLinkArray[i]);\r
1269         }\r
1270     }\r
1271 \r
1272     /**\r
1273      * Sets the value of '_linkList' by copying the given Vector.\r
1274      * All elements will be checked for type safety.\r
1275      * \r
1276      * @param vLinkList the Vector to copy.\r
1277      */\r
1278     public void setLink(\r
1279             final java.util.Vector vLinkList) {\r
1280         // copy vector\r
1281         this._linkList.clear();\r
1282         \r
1283         this._linkList.addAll(vLinkList);\r
1284     }\r
1285 \r
1286     /**\r
1287      * Sets the value of '_linkList' by setting it to the given\r
1288      * Vector. No type checking is performed.\r
1289      * @deprecated\r
1290      * \r
1291      * @param linkVector the Vector to set.\r
1292      */\r
1293     public void setLinkAsReference(\r
1294             final java.util.Vector linkVector) {\r
1295         this._linkList = linkVector;\r
1296     }\r
1297 \r
1298     /**\r
1299      * Sets the value of field 'modifiable'.\r
1300      * \r
1301      * @param modifiable the value of field 'modifiable'.\r
1302      */\r
1303     public void setModifiable(\r
1304             final java.lang.String modifiable) {\r
1305         this._modifiable = modifiable;\r
1306     }\r
1307 \r
1308     /**\r
1309      * \r
1310      * \r
1311      * @param index\r
1312      * @param vProperty\r
1313      * @throws java.lang.IndexOutOfBoundsException if the index\r
1314      * given is outside the bounds of the collection\r
1315      */\r
1316     public void setProperty(\r
1317             final int index,\r
1318             final uk.ac.vamsas.objects.core.Property vProperty)\r
1319     throws java.lang.IndexOutOfBoundsException {\r
1320         // check bounds for index\r
1321         if (index < 0 || index >= this._propertyList.size()) {\r
1322             throw new IndexOutOfBoundsException("setProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");\r
1323         }\r
1324         \r
1325         this._propertyList.set(index, vProperty);\r
1326     }\r
1327 \r
1328     /**\r
1329      * \r
1330      * \r
1331      * @param vPropertyArray\r
1332      */\r
1333     public void setProperty(\r
1334             final uk.ac.vamsas.objects.core.Property[] vPropertyArray) {\r
1335         //-- copy array\r
1336         _propertyList.clear();\r
1337         \r
1338         for (int i = 0; i < vPropertyArray.length; i++) {\r
1339                 this._propertyList.add(vPropertyArray[i]);\r
1340         }\r
1341     }\r
1342 \r
1343     /**\r
1344      * Sets the value of '_propertyList' by copying the given\r
1345      * Vector. All elements will be checked for type safety.\r
1346      * \r
1347      * @param vPropertyList the Vector to copy.\r
1348      */\r
1349     public void setProperty(\r
1350             final java.util.Vector vPropertyList) {\r
1351         // copy vector\r
1352         this._propertyList.clear();\r
1353         \r
1354         this._propertyList.addAll(vPropertyList);\r
1355     }\r
1356 \r
1357     /**\r
1358      * Sets the value of '_propertyList' by setting it to the given\r
1359      * Vector. No type checking is performed.\r
1360      * @deprecated\r
1361      * \r
1362      * @param propertyVector the Vector to set.\r
1363      */\r
1364     public void setPropertyAsReference(\r
1365             final java.util.Vector propertyVector) {\r
1366         this._propertyList = propertyVector;\r
1367     }\r
1368 \r
1369     /**\r
1370      * \r
1371      * \r
1372      * @param index\r
1373      * @param vScore\r
1374      * @throws java.lang.IndexOutOfBoundsException if the index\r
1375      * given is outside the bounds of the collection\r
1376      */\r
1377     public void setScore(\r
1378             final int index,\r
1379             final uk.ac.vamsas.objects.core.Score vScore)\r
1380     throws java.lang.IndexOutOfBoundsException {\r
1381         // check bounds for index\r
1382         if (index < 0 || index >= this._scoreList.size()) {\r
1383             throw new IndexOutOfBoundsException("setScore: Index value '" + index + "' not in range [0.." + (this._scoreList.size() - 1) + "]");\r
1384         }\r
1385         \r
1386         this._scoreList.set(index, vScore);\r
1387     }\r
1388 \r
1389     /**\r
1390      * \r
1391      * \r
1392      * @param vScoreArray\r
1393      */\r
1394     public void setScore(\r
1395             final uk.ac.vamsas.objects.core.Score[] vScoreArray) {\r
1396         //-- copy array\r
1397         _scoreList.clear();\r
1398         \r
1399         for (int i = 0; i < vScoreArray.length; i++) {\r
1400                 this._scoreList.add(vScoreArray[i]);\r
1401         }\r
1402     }\r
1403 \r
1404     /**\r
1405      * Sets the value of '_scoreList' by copying the given Vector.\r
1406      * All elements will be checked for type safety.\r
1407      * \r
1408      * @param vScoreList the Vector to copy.\r
1409      */\r
1410     public void setScore(\r
1411             final java.util.Vector vScoreList) {\r
1412         // copy vector\r
1413         this._scoreList.clear();\r
1414         \r
1415         this._scoreList.addAll(vScoreList);\r
1416     }\r
1417 \r
1418     /**\r
1419      * Sets the value of '_scoreList' by setting it to the given\r
1420      * Vector. No type checking is performed.\r
1421      * @deprecated\r
1422      * \r
1423      * @param scoreVector the Vector to set.\r
1424      */\r
1425     public void setScoreAsReference(\r
1426             final java.util.Vector scoreVector) {\r
1427         this._scoreList = scoreVector;\r
1428     }\r
1429 \r
1430     /**\r
1431      * Sets the value of field 'status'. The field 'status' has the\r
1432      * following description: TODO: specify this - we have\r
1433      * considered taking the GO\r
1434      *  evidence codes as a model for assessing a measure of\r
1435      * quality to an\r
1436      *  annotation. \r
1437      * \r
1438      * @param status the value of field 'status'.\r
1439      */\r
1440     public void setStatus(\r
1441             final java.lang.String status) {\r
1442         this._status = status;\r
1443     }\r
1444 \r
1445     /**\r
1446      * Sets the value of field 'type'. The field 'type' has the\r
1447      * following description: A Das Feature has both a type and a\r
1448      * Type ID. We go the\r
1449      *  route of requiring the type string to be taken from a\r
1450      * controlled\r
1451      *  vocabulary if an application expects others to make sense\r
1452      * of it. The\r
1453      *  type may qualified - so uniprot:CHAIN is a valid type name,\r
1454      * and\r
1455      *  considered distinct from someotherDB:CHAIN \r
1456      * \r
1457      * @param type the value of field 'type'.\r
1458      */\r
1459     public void setType(\r
1460             final java.lang.String type) {\r
1461         this._type = type;\r
1462     }\r
1463 \r
1464     /**\r
1465      * Method unmarshal.\r
1466      * \r
1467      * @param reader\r
1468      * @throws org.exolab.castor.xml.MarshalException if object is\r
1469      * null or if any SAXException is thrown during marshaling\r
1470      * @throws org.exolab.castor.xml.ValidationException if this\r
1471      * object is an invalid instance according to the schema\r
1472      * @return the unmarshaled uk.ac.vamsas.objects.core.RangeType\r
1473      */\r
1474     public static uk.ac.vamsas.objects.core.RangeType unmarshal(\r
1475             final java.io.Reader reader)\r
1476     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {\r
1477         return (uk.ac.vamsas.objects.core.RangeType) Unmarshaller.unmarshal(uk.ac.vamsas.objects.core.RangeAnnotation.class, reader);\r
1478     }\r
1479 \r
1480     /**\r
1481      * \r
1482      * \r
1483      * @throws org.exolab.castor.xml.ValidationException if this\r
1484      * object is an invalid instance according to the schema\r
1485      */\r
1486     public void validate(\r
1487     )\r
1488     throws org.exolab.castor.xml.ValidationException {\r
1489         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();\r
1490         validator.validate(this);\r
1491     }\r
1492 \r
1493 }\r