JAL-1578 JAL-674 store/restore alignment annotation properties in Jalview 2.8.2 proje...
[jalview.git] / src / jalview / schemabinding / version2 / Annotation.java
1 /*
2  * This class was automatically generated with 
3  * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
4  * Schema.
5  * $Id$
6  */
7
8 package jalview.schemabinding.version2;
9
10   //---------------------------------/
11  //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
16
17 /**
18  * Class Annotation.
19  * 
20  * @version $Revision$ $Date$
21  */
22 public class Annotation implements java.io.Serializable {
23
24
25       //--------------------------/
26      //- Class/Member Variables -/
27     //--------------------------/
28
29     /**
30      * Field _graph.
31      */
32     private boolean _graph;
33
34     /**
35      * keeps track of state for field: _graph
36      */
37     private boolean _has_graph;
38
39     /**
40      * Field _graphType.
41      */
42     private int _graphType;
43
44     /**
45      * keeps track of state for field: _graphType
46      */
47     private boolean _has_graphType;
48
49     /**
50      * Field _sequenceRef.
51      */
52     private java.lang.String _sequenceRef;
53
54     /**
55      * Field _groupRef.
56      */
57     private java.lang.String _groupRef;
58
59     /**
60      * Field _graphColour.
61      */
62     private int _graphColour;
63
64     /**
65      * keeps track of state for field: _graphColour
66      */
67     private boolean _has_graphColour;
68
69     /**
70      * Field _graphGroup.
71      */
72     private int _graphGroup;
73
74     /**
75      * keeps track of state for field: _graphGroup
76      */
77     private boolean _has_graphGroup;
78
79     /**
80      * height in pixels for the graph if this is a graph-type
81      * annotation.
82      */
83     private int _graphHeight;
84
85     /**
86      * keeps track of state for field: _graphHeight
87      */
88     private boolean _has_graphHeight;
89
90     /**
91      * Field _id.
92      */
93     private java.lang.String _id;
94
95     /**
96      * Field _scoreOnly.
97      */
98     private boolean _scoreOnly = false;
99
100     /**
101      * keeps track of state for field: _scoreOnly
102      */
103     private boolean _has_scoreOnly;
104
105     /**
106      * Field _score.
107      */
108     private double _score;
109
110     /**
111      * keeps track of state for field: _score
112      */
113     private boolean _has_score;
114
115     /**
116      * Field _visible.
117      */
118     private boolean _visible;
119
120     /**
121      * keeps track of state for field: _visible
122      */
123     private boolean _has_visible;
124
125     /**
126      * Field _centreColLabels.
127      */
128     private boolean _centreColLabels;
129
130     /**
131      * keeps track of state for field: _centreColLabels
132      */
133     private boolean _has_centreColLabels;
134
135     /**
136      * Field _scaleColLabels.
137      */
138     private boolean _scaleColLabels;
139
140     /**
141      * keeps track of state for field: _scaleColLabels
142      */
143     private boolean _has_scaleColLabels;
144
145     /**
146      * Field _showAllColLabels.
147      */
148     private boolean _showAllColLabels;
149
150     /**
151      * keeps track of state for field: _showAllColLabels
152      */
153     private boolean _has_showAllColLabels;
154
155     /**
156      * is an autocalculated annotation row
157      */
158     private boolean _autoCalculated = false;
159
160     /**
161      * keeps track of state for field: _autoCalculated
162      */
163     private boolean _has_autoCalculated;
164
165     /**
166      * is to be shown below the alignment - introduced in Jalview
167      * 2.8 for visualizing T-COFFEE alignment scores
168      */
169     private boolean _belowAlignment = true;
170
171     /**
172      * keeps track of state for field: _belowAlignment
173      */
174     private boolean _has_belowAlignment;
175
176     /**
177      * Optional string identifier used to group sets of annotation
178      * produced by a particular calculation. Values are opaque
179      * strings but have semantic meaning to Jalview's renderer,
180      * data importer and calculation system.
181      */
182     private java.lang.String _calcId;
183
184     /**
185      * Field _annotationElementList.
186      */
187     private java.util.Vector _annotationElementList;
188
189     /**
190      * Field _label.
191      */
192     private java.lang.String _label;
193
194     /**
195      * Field _description.
196      */
197     private java.lang.String _description;
198
199     /**
200      * Field _thresholdLine.
201      */
202     private jalview.schemabinding.version2.ThresholdLine _thresholdLine;
203
204     /**
205      * Field _propertyList.
206      */
207     private java.util.Vector _propertyList;
208
209
210       //----------------/
211      //- Constructors -/
212     //----------------/
213
214     public Annotation() {
215         super();
216         this._annotationElementList = new java.util.Vector();
217         this._propertyList = new java.util.Vector();
218     }
219
220
221       //-----------/
222      //- Methods -/
223     //-----------/
224
225     /**
226      * 
227      * 
228      * @param vAnnotationElement
229      * @throws java.lang.IndexOutOfBoundsException if the index
230      * given is outside the bounds of the collection
231      */
232     public void addAnnotationElement(
233             final jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
234     throws java.lang.IndexOutOfBoundsException {
235         this._annotationElementList.addElement(vAnnotationElement);
236     }
237
238     /**
239      * 
240      * 
241      * @param index
242      * @param vAnnotationElement
243      * @throws java.lang.IndexOutOfBoundsException if the index
244      * given is outside the bounds of the collection
245      */
246     public void addAnnotationElement(
247             final int index,
248             final jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
249     throws java.lang.IndexOutOfBoundsException {
250         this._annotationElementList.add(index, vAnnotationElement);
251     }
252
253     /**
254      * 
255      * 
256      * @param vProperty
257      * @throws java.lang.IndexOutOfBoundsException if the index
258      * given is outside the bounds of the collection
259      */
260     public void addProperty(
261             final jalview.schemabinding.version2.Property vProperty)
262     throws java.lang.IndexOutOfBoundsException {
263         this._propertyList.addElement(vProperty);
264     }
265
266     /**
267      * 
268      * 
269      * @param index
270      * @param vProperty
271      * @throws java.lang.IndexOutOfBoundsException if the index
272      * given is outside the bounds of the collection
273      */
274     public void addProperty(
275             final int index,
276             final jalview.schemabinding.version2.Property vProperty)
277     throws java.lang.IndexOutOfBoundsException {
278         this._propertyList.add(index, vProperty);
279     }
280
281     /**
282      */
283     public void deleteAutoCalculated(
284     ) {
285         this._has_autoCalculated= false;
286     }
287
288     /**
289      */
290     public void deleteBelowAlignment(
291     ) {
292         this._has_belowAlignment= false;
293     }
294
295     /**
296      */
297     public void deleteCentreColLabels(
298     ) {
299         this._has_centreColLabels= false;
300     }
301
302     /**
303      */
304     public void deleteGraph(
305     ) {
306         this._has_graph= false;
307     }
308
309     /**
310      */
311     public void deleteGraphColour(
312     ) {
313         this._has_graphColour= false;
314     }
315
316     /**
317      */
318     public void deleteGraphGroup(
319     ) {
320         this._has_graphGroup= false;
321     }
322
323     /**
324      */
325     public void deleteGraphHeight(
326     ) {
327         this._has_graphHeight= false;
328     }
329
330     /**
331      */
332     public void deleteGraphType(
333     ) {
334         this._has_graphType= false;
335     }
336
337     /**
338      */
339     public void deleteScaleColLabels(
340     ) {
341         this._has_scaleColLabels= false;
342     }
343
344     /**
345      */
346     public void deleteScore(
347     ) {
348         this._has_score= false;
349     }
350
351     /**
352      */
353     public void deleteScoreOnly(
354     ) {
355         this._has_scoreOnly= false;
356     }
357
358     /**
359      */
360     public void deleteShowAllColLabels(
361     ) {
362         this._has_showAllColLabels= false;
363     }
364
365     /**
366      */
367     public void deleteVisible(
368     ) {
369         this._has_visible= false;
370     }
371
372     /**
373      * Method enumerateAnnotationElement.
374      * 
375      * @return an Enumeration over all
376      * jalview.schemabinding.version2.AnnotationElement elements
377      */
378     public java.util.Enumeration enumerateAnnotationElement(
379     ) {
380         return this._annotationElementList.elements();
381     }
382
383     /**
384      * Method enumerateProperty.
385      * 
386      * @return an Enumeration over all
387      * jalview.schemabinding.version2.Property elements
388      */
389     public java.util.Enumeration enumerateProperty(
390     ) {
391         return this._propertyList.elements();
392     }
393
394     /**
395      * Method getAnnotationElement.
396      * 
397      * @param index
398      * @throws java.lang.IndexOutOfBoundsException if the index
399      * given is outside the bounds of the collection
400      * @return the value of the
401      * jalview.schemabinding.version2.AnnotationElement at the
402      * given index
403      */
404     public jalview.schemabinding.version2.AnnotationElement getAnnotationElement(
405             final int index)
406     throws java.lang.IndexOutOfBoundsException {
407         // check bounds for index
408         if (index < 0 || index >= this._annotationElementList.size()) {
409             throw new IndexOutOfBoundsException("getAnnotationElement: Index value '" + index + "' not in range [0.." + (this._annotationElementList.size() - 1) + "]");
410         }
411         
412         return (jalview.schemabinding.version2.AnnotationElement) _annotationElementList.get(index);
413     }
414
415     /**
416      * Method getAnnotationElement.Returns the contents of the
417      * collection in an Array.  <p>Note:  Just in case the
418      * collection contents are changing in another thread, we pass
419      * a 0-length Array of the correct type into the API call. 
420      * This way we <i>know</i> that the Array returned is of
421      * exactly the correct length.
422      * 
423      * @return this collection as an Array
424      */
425     public jalview.schemabinding.version2.AnnotationElement[] getAnnotationElement(
426     ) {
427         jalview.schemabinding.version2.AnnotationElement[] array = new jalview.schemabinding.version2.AnnotationElement[0];
428         return (jalview.schemabinding.version2.AnnotationElement[]) this._annotationElementList.toArray(array);
429     }
430
431     /**
432      * Method getAnnotationElementCount.
433      * 
434      * @return the size of this collection
435      */
436     public int getAnnotationElementCount(
437     ) {
438         return this._annotationElementList.size();
439     }
440
441     /**
442      * Returns the value of field 'autoCalculated'. The field
443      * 'autoCalculated' has the following description: is an
444      * autocalculated annotation row
445      * 
446      * @return the value of field 'AutoCalculated'.
447      */
448     public boolean getAutoCalculated(
449     ) {
450         return this._autoCalculated;
451     }
452
453     /**
454      * Returns the value of field 'belowAlignment'. The field
455      * 'belowAlignment' has the following description: is to be
456      * shown below the alignment - introduced in Jalview 2.8 for
457      * visualizing T-COFFEE alignment scores
458      * 
459      * @return the value of field 'BelowAlignment'.
460      */
461     public boolean getBelowAlignment(
462     ) {
463         return this._belowAlignment;
464     }
465
466     /**
467      * Returns the value of field 'calcId'. The field 'calcId' has
468      * the following description: Optional string identifier used
469      * to group sets of annotation produced by a particular
470      * calculation. Values are opaque strings but have semantic
471      * meaning to Jalview's renderer, data importer and calculation
472      * system.
473      * 
474      * @return the value of field 'CalcId'.
475      */
476     public java.lang.String getCalcId(
477     ) {
478         return this._calcId;
479     }
480
481     /**
482      * Returns the value of field 'centreColLabels'.
483      * 
484      * @return the value of field 'CentreColLabels'.
485      */
486     public boolean getCentreColLabels(
487     ) {
488         return this._centreColLabels;
489     }
490
491     /**
492      * Returns the value of field 'description'.
493      * 
494      * @return the value of field 'Description'.
495      */
496     public java.lang.String getDescription(
497     ) {
498         return this._description;
499     }
500
501     /**
502      * Returns the value of field 'graph'.
503      * 
504      * @return the value of field 'Graph'.
505      */
506     public boolean getGraph(
507     ) {
508         return this._graph;
509     }
510
511     /**
512      * Returns the value of field 'graphColour'.
513      * 
514      * @return the value of field 'GraphColour'.
515      */
516     public int getGraphColour(
517     ) {
518         return this._graphColour;
519     }
520
521     /**
522      * Returns the value of field 'graphGroup'.
523      * 
524      * @return the value of field 'GraphGroup'.
525      */
526     public int getGraphGroup(
527     ) {
528         return this._graphGroup;
529     }
530
531     /**
532      * Returns the value of field 'graphHeight'. The field
533      * 'graphHeight' has the following description: height in
534      * pixels for the graph if this is a graph-type annotation.
535      * 
536      * @return the value of field 'GraphHeight'.
537      */
538     public int getGraphHeight(
539     ) {
540         return this._graphHeight;
541     }
542
543     /**
544      * Returns the value of field 'graphType'.
545      * 
546      * @return the value of field 'GraphType'.
547      */
548     public int getGraphType(
549     ) {
550         return this._graphType;
551     }
552
553     /**
554      * Returns the value of field 'groupRef'.
555      * 
556      * @return the value of field 'GroupRef'.
557      */
558     public java.lang.String getGroupRef(
559     ) {
560         return this._groupRef;
561     }
562
563     /**
564      * Returns the value of field 'id'.
565      * 
566      * @return the value of field 'Id'.
567      */
568     public java.lang.String getId(
569     ) {
570         return this._id;
571     }
572
573     /**
574      * Returns the value of field 'label'.
575      * 
576      * @return the value of field 'Label'.
577      */
578     public java.lang.String getLabel(
579     ) {
580         return this._label;
581     }
582
583     /**
584      * Method getProperty.
585      * 
586      * @param index
587      * @throws java.lang.IndexOutOfBoundsException if the index
588      * given is outside the bounds of the collection
589      * @return the value of the
590      * jalview.schemabinding.version2.Property at the given index
591      */
592     public jalview.schemabinding.version2.Property getProperty(
593             final int index)
594     throws java.lang.IndexOutOfBoundsException {
595         // check bounds for index
596         if (index < 0 || index >= this._propertyList.size()) {
597             throw new IndexOutOfBoundsException("getProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
598         }
599         
600         return (jalview.schemabinding.version2.Property) _propertyList.get(index);
601     }
602
603     /**
604      * Method getProperty.Returns the contents of the collection in
605      * an Array.  <p>Note:  Just in case the collection contents
606      * are changing in another thread, we pass a 0-length Array of
607      * the correct type into the API call.  This way we <i>know</i>
608      * that the Array returned is of exactly the correct length.
609      * 
610      * @return this collection as an Array
611      */
612     public jalview.schemabinding.version2.Property[] getProperty(
613     ) {
614         jalview.schemabinding.version2.Property[] array = new jalview.schemabinding.version2.Property[0];
615         return (jalview.schemabinding.version2.Property[]) this._propertyList.toArray(array);
616     }
617
618     /**
619      * Method getPropertyCount.
620      * 
621      * @return the size of this collection
622      */
623     public int getPropertyCount(
624     ) {
625         return this._propertyList.size();
626     }
627
628     /**
629      * Returns the value of field 'scaleColLabels'.
630      * 
631      * @return the value of field 'ScaleColLabels'.
632      */
633     public boolean getScaleColLabels(
634     ) {
635         return this._scaleColLabels;
636     }
637
638     /**
639      * Returns the value of field 'score'.
640      * 
641      * @return the value of field 'Score'.
642      */
643     public double getScore(
644     ) {
645         return this._score;
646     }
647
648     /**
649      * Returns the value of field 'scoreOnly'.
650      * 
651      * @return the value of field 'ScoreOnly'.
652      */
653     public boolean getScoreOnly(
654     ) {
655         return this._scoreOnly;
656     }
657
658     /**
659      * Returns the value of field 'sequenceRef'.
660      * 
661      * @return the value of field 'SequenceRef'.
662      */
663     public java.lang.String getSequenceRef(
664     ) {
665         return this._sequenceRef;
666     }
667
668     /**
669      * Returns the value of field 'showAllColLabels'.
670      * 
671      * @return the value of field 'ShowAllColLabels'.
672      */
673     public boolean getShowAllColLabels(
674     ) {
675         return this._showAllColLabels;
676     }
677
678     /**
679      * Returns the value of field 'thresholdLine'.
680      * 
681      * @return the value of field 'ThresholdLine'.
682      */
683     public jalview.schemabinding.version2.ThresholdLine getThresholdLine(
684     ) {
685         return this._thresholdLine;
686     }
687
688     /**
689      * Returns the value of field 'visible'.
690      * 
691      * @return the value of field 'Visible'.
692      */
693     public boolean getVisible(
694     ) {
695         return this._visible;
696     }
697
698     /**
699      * Method hasAutoCalculated.
700      * 
701      * @return true if at least one AutoCalculated has been added
702      */
703     public boolean hasAutoCalculated(
704     ) {
705         return this._has_autoCalculated;
706     }
707
708     /**
709      * Method hasBelowAlignment.
710      * 
711      * @return true if at least one BelowAlignment has been added
712      */
713     public boolean hasBelowAlignment(
714     ) {
715         return this._has_belowAlignment;
716     }
717
718     /**
719      * Method hasCentreColLabels.
720      * 
721      * @return true if at least one CentreColLabels has been added
722      */
723     public boolean hasCentreColLabels(
724     ) {
725         return this._has_centreColLabels;
726     }
727
728     /**
729      * Method hasGraph.
730      * 
731      * @return true if at least one Graph has been added
732      */
733     public boolean hasGraph(
734     ) {
735         return this._has_graph;
736     }
737
738     /**
739      * Method hasGraphColour.
740      * 
741      * @return true if at least one GraphColour has been added
742      */
743     public boolean hasGraphColour(
744     ) {
745         return this._has_graphColour;
746     }
747
748     /**
749      * Method hasGraphGroup.
750      * 
751      * @return true if at least one GraphGroup has been added
752      */
753     public boolean hasGraphGroup(
754     ) {
755         return this._has_graphGroup;
756     }
757
758     /**
759      * Method hasGraphHeight.
760      * 
761      * @return true if at least one GraphHeight has been added
762      */
763     public boolean hasGraphHeight(
764     ) {
765         return this._has_graphHeight;
766     }
767
768     /**
769      * Method hasGraphType.
770      * 
771      * @return true if at least one GraphType has been added
772      */
773     public boolean hasGraphType(
774     ) {
775         return this._has_graphType;
776     }
777
778     /**
779      * Method hasScaleColLabels.
780      * 
781      * @return true if at least one ScaleColLabels has been added
782      */
783     public boolean hasScaleColLabels(
784     ) {
785         return this._has_scaleColLabels;
786     }
787
788     /**
789      * Method hasScore.
790      * 
791      * @return true if at least one Score has been added
792      */
793     public boolean hasScore(
794     ) {
795         return this._has_score;
796     }
797
798     /**
799      * Method hasScoreOnly.
800      * 
801      * @return true if at least one ScoreOnly has been added
802      */
803     public boolean hasScoreOnly(
804     ) {
805         return this._has_scoreOnly;
806     }
807
808     /**
809      * Method hasShowAllColLabels.
810      * 
811      * @return true if at least one ShowAllColLabels has been added
812      */
813     public boolean hasShowAllColLabels(
814     ) {
815         return this._has_showAllColLabels;
816     }
817
818     /**
819      * Method hasVisible.
820      * 
821      * @return true if at least one Visible has been added
822      */
823     public boolean hasVisible(
824     ) {
825         return this._has_visible;
826     }
827
828     /**
829      * Returns the value of field 'autoCalculated'. The field
830      * 'autoCalculated' has the following description: is an
831      * autocalculated annotation row
832      * 
833      * @return the value of field 'AutoCalculated'.
834      */
835     public boolean isAutoCalculated(
836     ) {
837         return this._autoCalculated;
838     }
839
840     /**
841      * Returns the value of field 'belowAlignment'. The field
842      * 'belowAlignment' has the following description: is to be
843      * shown below the alignment - introduced in Jalview 2.8 for
844      * visualizing T-COFFEE alignment scores
845      * 
846      * @return the value of field 'BelowAlignment'.
847      */
848     public boolean isBelowAlignment(
849     ) {
850         return this._belowAlignment;
851     }
852
853     /**
854      * Returns the value of field 'centreColLabels'.
855      * 
856      * @return the value of field 'CentreColLabels'.
857      */
858     public boolean isCentreColLabels(
859     ) {
860         return this._centreColLabels;
861     }
862
863     /**
864      * Returns the value of field 'graph'.
865      * 
866      * @return the value of field 'Graph'.
867      */
868     public boolean isGraph(
869     ) {
870         return this._graph;
871     }
872
873     /**
874      * Returns the value of field 'scaleColLabels'.
875      * 
876      * @return the value of field 'ScaleColLabels'.
877      */
878     public boolean isScaleColLabels(
879     ) {
880         return this._scaleColLabels;
881     }
882
883     /**
884      * Returns the value of field 'scoreOnly'.
885      * 
886      * @return the value of field 'ScoreOnly'.
887      */
888     public boolean isScoreOnly(
889     ) {
890         return this._scoreOnly;
891     }
892
893     /**
894      * Returns the value of field 'showAllColLabels'.
895      * 
896      * @return the value of field 'ShowAllColLabels'.
897      */
898     public boolean isShowAllColLabels(
899     ) {
900         return this._showAllColLabels;
901     }
902
903     /**
904      * Method isValid.
905      * 
906      * @return true if this object is valid according to the schema
907      */
908     public boolean isValid(
909     ) {
910         try {
911             validate();
912         } catch (org.exolab.castor.xml.ValidationException vex) {
913             return false;
914         }
915         return true;
916     }
917
918     /**
919      * Returns the value of field 'visible'.
920      * 
921      * @return the value of field 'Visible'.
922      */
923     public boolean isVisible(
924     ) {
925         return this._visible;
926     }
927
928     /**
929      * 
930      * 
931      * @param out
932      * @throws org.exolab.castor.xml.MarshalException if object is
933      * null or if any SAXException is thrown during marshaling
934      * @throws org.exolab.castor.xml.ValidationException if this
935      * object is an invalid instance according to the schema
936      */
937     public void marshal(
938             final java.io.Writer out)
939     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
940         Marshaller.marshal(this, out);
941     }
942
943     /**
944      * 
945      * 
946      * @param handler
947      * @throws java.io.IOException if an IOException occurs during
948      * marshaling
949      * @throws org.exolab.castor.xml.ValidationException if this
950      * object is an invalid instance according to the schema
951      * @throws org.exolab.castor.xml.MarshalException if object is
952      * null or if any SAXException is thrown during marshaling
953      */
954     public void marshal(
955             final org.xml.sax.ContentHandler handler)
956     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
957         Marshaller.marshal(this, handler);
958     }
959
960     /**
961      */
962     public void removeAllAnnotationElement(
963     ) {
964         this._annotationElementList.clear();
965     }
966
967     /**
968      */
969     public void removeAllProperty(
970     ) {
971         this._propertyList.clear();
972     }
973
974     /**
975      * Method removeAnnotationElement.
976      * 
977      * @param vAnnotationElement
978      * @return true if the object was removed from the collection.
979      */
980     public boolean removeAnnotationElement(
981             final jalview.schemabinding.version2.AnnotationElement vAnnotationElement) {
982         boolean removed = _annotationElementList.remove(vAnnotationElement);
983         return removed;
984     }
985
986     /**
987      * Method removeAnnotationElementAt.
988      * 
989      * @param index
990      * @return the element removed from the collection
991      */
992     public jalview.schemabinding.version2.AnnotationElement removeAnnotationElementAt(
993             final int index) {
994         java.lang.Object obj = this._annotationElementList.remove(index);
995         return (jalview.schemabinding.version2.AnnotationElement) obj;
996     }
997
998     /**
999      * Method removeProperty.
1000      * 
1001      * @param vProperty
1002      * @return true if the object was removed from the collection.
1003      */
1004     public boolean removeProperty(
1005             final jalview.schemabinding.version2.Property vProperty) {
1006         boolean removed = _propertyList.remove(vProperty);
1007         return removed;
1008     }
1009
1010     /**
1011      * Method removePropertyAt.
1012      * 
1013      * @param index
1014      * @return the element removed from the collection
1015      */
1016     public jalview.schemabinding.version2.Property removePropertyAt(
1017             final int index) {
1018         java.lang.Object obj = this._propertyList.remove(index);
1019         return (jalview.schemabinding.version2.Property) obj;
1020     }
1021
1022     /**
1023      * 
1024      * 
1025      * @param index
1026      * @param vAnnotationElement
1027      * @throws java.lang.IndexOutOfBoundsException if the index
1028      * given is outside the bounds of the collection
1029      */
1030     public void setAnnotationElement(
1031             final int index,
1032             final jalview.schemabinding.version2.AnnotationElement vAnnotationElement)
1033     throws java.lang.IndexOutOfBoundsException {
1034         // check bounds for index
1035         if (index < 0 || index >= this._annotationElementList.size()) {
1036             throw new IndexOutOfBoundsException("setAnnotationElement: Index value '" + index + "' not in range [0.." + (this._annotationElementList.size() - 1) + "]");
1037         }
1038         
1039         this._annotationElementList.set(index, vAnnotationElement);
1040     }
1041
1042     /**
1043      * 
1044      * 
1045      * @param vAnnotationElementArray
1046      */
1047     public void setAnnotationElement(
1048             final jalview.schemabinding.version2.AnnotationElement[] vAnnotationElementArray) {
1049         //-- copy array
1050         _annotationElementList.clear();
1051         
1052         for (int i = 0; i < vAnnotationElementArray.length; i++) {
1053                 this._annotationElementList.add(vAnnotationElementArray[i]);
1054         }
1055     }
1056
1057     /**
1058      * Sets the value of field 'autoCalculated'. The field
1059      * 'autoCalculated' has the following description: is an
1060      * autocalculated annotation row
1061      * 
1062      * @param autoCalculated the value of field 'autoCalculated'.
1063      */
1064     public void setAutoCalculated(
1065             final boolean autoCalculated) {
1066         this._autoCalculated = autoCalculated;
1067         this._has_autoCalculated = true;
1068     }
1069
1070     /**
1071      * Sets the value of field 'belowAlignment'. The field
1072      * 'belowAlignment' has the following description: is to be
1073      * shown below the alignment - introduced in Jalview 2.8 for
1074      * visualizing T-COFFEE alignment scores
1075      * 
1076      * @param belowAlignment the value of field 'belowAlignment'.
1077      */
1078     public void setBelowAlignment(
1079             final boolean belowAlignment) {
1080         this._belowAlignment = belowAlignment;
1081         this._has_belowAlignment = true;
1082     }
1083
1084     /**
1085      * Sets the value of field 'calcId'. The field 'calcId' has the
1086      * following description: Optional string identifier used to
1087      * group sets of annotation produced by a particular
1088      * calculation. Values are opaque strings but have semantic
1089      * meaning to Jalview's renderer, data importer and calculation
1090      * system.
1091      * 
1092      * @param calcId the value of field 'calcId'.
1093      */
1094     public void setCalcId(
1095             final java.lang.String calcId) {
1096         this._calcId = calcId;
1097     }
1098
1099     /**
1100      * Sets the value of field 'centreColLabels'.
1101      * 
1102      * @param centreColLabels the value of field 'centreColLabels'.
1103      */
1104     public void setCentreColLabels(
1105             final boolean centreColLabels) {
1106         this._centreColLabels = centreColLabels;
1107         this._has_centreColLabels = true;
1108     }
1109
1110     /**
1111      * Sets the value of field 'description'.
1112      * 
1113      * @param description the value of field 'description'.
1114      */
1115     public void setDescription(
1116             final java.lang.String description) {
1117         this._description = description;
1118     }
1119
1120     /**
1121      * Sets the value of field 'graph'.
1122      * 
1123      * @param graph the value of field 'graph'.
1124      */
1125     public void setGraph(
1126             final boolean graph) {
1127         this._graph = graph;
1128         this._has_graph = true;
1129     }
1130
1131     /**
1132      * Sets the value of field 'graphColour'.
1133      * 
1134      * @param graphColour the value of field 'graphColour'.
1135      */
1136     public void setGraphColour(
1137             final int graphColour) {
1138         this._graphColour = graphColour;
1139         this._has_graphColour = true;
1140     }
1141
1142     /**
1143      * Sets the value of field 'graphGroup'.
1144      * 
1145      * @param graphGroup the value of field 'graphGroup'.
1146      */
1147     public void setGraphGroup(
1148             final int graphGroup) {
1149         this._graphGroup = graphGroup;
1150         this._has_graphGroup = true;
1151     }
1152
1153     /**
1154      * Sets the value of field 'graphHeight'. The field
1155      * 'graphHeight' has the following description: height in
1156      * pixels for the graph if this is a graph-type annotation.
1157      * 
1158      * @param graphHeight the value of field 'graphHeight'.
1159      */
1160     public void setGraphHeight(
1161             final int graphHeight) {
1162         this._graphHeight = graphHeight;
1163         this._has_graphHeight = true;
1164     }
1165
1166     /**
1167      * Sets the value of field 'graphType'.
1168      * 
1169      * @param graphType the value of field 'graphType'.
1170      */
1171     public void setGraphType(
1172             final int graphType) {
1173         this._graphType = graphType;
1174         this._has_graphType = true;
1175     }
1176
1177     /**
1178      * Sets the value of field 'groupRef'.
1179      * 
1180      * @param groupRef the value of field 'groupRef'.
1181      */
1182     public void setGroupRef(
1183             final java.lang.String groupRef) {
1184         this._groupRef = groupRef;
1185     }
1186
1187     /**
1188      * Sets the value of field 'id'.
1189      * 
1190      * @param id the value of field 'id'.
1191      */
1192     public void setId(
1193             final java.lang.String id) {
1194         this._id = id;
1195     }
1196
1197     /**
1198      * Sets the value of field 'label'.
1199      * 
1200      * @param label the value of field 'label'.
1201      */
1202     public void setLabel(
1203             final java.lang.String label) {
1204         this._label = label;
1205     }
1206
1207     /**
1208      * 
1209      * 
1210      * @param index
1211      * @param vProperty
1212      * @throws java.lang.IndexOutOfBoundsException if the index
1213      * given is outside the bounds of the collection
1214      */
1215     public void setProperty(
1216             final int index,
1217             final jalview.schemabinding.version2.Property vProperty)
1218     throws java.lang.IndexOutOfBoundsException {
1219         // check bounds for index
1220         if (index < 0 || index >= this._propertyList.size()) {
1221             throw new IndexOutOfBoundsException("setProperty: Index value '" + index + "' not in range [0.." + (this._propertyList.size() - 1) + "]");
1222         }
1223         
1224         this._propertyList.set(index, vProperty);
1225     }
1226
1227     /**
1228      * 
1229      * 
1230      * @param vPropertyArray
1231      */
1232     public void setProperty(
1233             final jalview.schemabinding.version2.Property[] vPropertyArray) {
1234         //-- copy array
1235         _propertyList.clear();
1236         
1237         for (int i = 0; i < vPropertyArray.length; i++) {
1238                 this._propertyList.add(vPropertyArray[i]);
1239         }
1240     }
1241
1242     /**
1243      * Sets the value of field 'scaleColLabels'.
1244      * 
1245      * @param scaleColLabels the value of field 'scaleColLabels'.
1246      */
1247     public void setScaleColLabels(
1248             final boolean scaleColLabels) {
1249         this._scaleColLabels = scaleColLabels;
1250         this._has_scaleColLabels = true;
1251     }
1252
1253     /**
1254      * Sets the value of field 'score'.
1255      * 
1256      * @param score the value of field 'score'.
1257      */
1258     public void setScore(
1259             final double score) {
1260         this._score = score;
1261         this._has_score = true;
1262     }
1263
1264     /**
1265      * Sets the value of field 'scoreOnly'.
1266      * 
1267      * @param scoreOnly the value of field 'scoreOnly'.
1268      */
1269     public void setScoreOnly(
1270             final boolean scoreOnly) {
1271         this._scoreOnly = scoreOnly;
1272         this._has_scoreOnly = true;
1273     }
1274
1275     /**
1276      * Sets the value of field 'sequenceRef'.
1277      * 
1278      * @param sequenceRef the value of field 'sequenceRef'.
1279      */
1280     public void setSequenceRef(
1281             final java.lang.String sequenceRef) {
1282         this._sequenceRef = sequenceRef;
1283     }
1284
1285     /**
1286      * Sets the value of field 'showAllColLabels'.
1287      * 
1288      * @param showAllColLabels the value of field 'showAllColLabels'
1289      */
1290     public void setShowAllColLabels(
1291             final boolean showAllColLabels) {
1292         this._showAllColLabels = showAllColLabels;
1293         this._has_showAllColLabels = true;
1294     }
1295
1296     /**
1297      * Sets the value of field 'thresholdLine'.
1298      * 
1299      * @param thresholdLine the value of field 'thresholdLine'.
1300      */
1301     public void setThresholdLine(
1302             final jalview.schemabinding.version2.ThresholdLine thresholdLine) {
1303         this._thresholdLine = thresholdLine;
1304     }
1305
1306     /**
1307      * Sets the value of field 'visible'.
1308      * 
1309      * @param visible the value of field 'visible'.
1310      */
1311     public void setVisible(
1312             final boolean visible) {
1313         this._visible = visible;
1314         this._has_visible = true;
1315     }
1316
1317     /**
1318      * Method unmarshal.
1319      * 
1320      * @param reader
1321      * @throws org.exolab.castor.xml.MarshalException if object is
1322      * null or if any SAXException is thrown during marshaling
1323      * @throws org.exolab.castor.xml.ValidationException if this
1324      * object is an invalid instance according to the schema
1325      * @return the unmarshaled
1326      * jalview.schemabinding.version2.Annotation
1327      */
1328     public static jalview.schemabinding.version2.Annotation unmarshal(
1329             final java.io.Reader reader)
1330     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
1331         return (jalview.schemabinding.version2.Annotation) Unmarshaller.unmarshal(jalview.schemabinding.version2.Annotation.class, reader);
1332     }
1333
1334     /**
1335      * 
1336      * 
1337      * @throws org.exolab.castor.xml.ValidationException if this
1338      * object is an invalid instance according to the schema
1339      */
1340     public void validate(
1341     )
1342     throws org.exolab.castor.xml.ValidationException {
1343         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
1344         validator.validate(this);
1345     }
1346
1347 }