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