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