Clover icon

jalviewX

  1. Project Clover database Wed Oct 31 2018 15:13:58 GMT
  2. Package jalview.schemabinding.version2

File Annotation.java

 

Coverage histogram

../../../img/srcFileCovDistChart6.png
35% of files have more coverage

Code metrics

12
139
102
1
1,396
549
113
0.81
1.36
102
1.11

Classes

Class Line # Actions
Annotation 22 139 113 121
0.521739152.2%
 

Contributing tests

This file is covered by 16 tests. .

Source view

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