JAL-1620 version bump and release notes
[jalview.git] / src / jalview / schemabinding / version2 / Tree.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
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 Tree.
32  * 
33  * @version $Revision$ $Date$
34  */
35 public class Tree implements java.io.Serializable
36 {
37
38   // --------------------------/
39   // - Class/Member Variables -/
40   // --------------------------/
41
42   /**
43    * Field _fontName.
44    */
45   private java.lang.String _fontName;
46
47   /**
48    * Field _fontSize.
49    */
50   private int _fontSize;
51
52   /**
53    * keeps track of state for field: _fontSize
54    */
55   private boolean _has_fontSize;
56
57   /**
58    * Field _fontStyle.
59    */
60   private int _fontStyle;
61
62   /**
63    * keeps track of state for field: _fontStyle
64    */
65   private boolean _has_fontStyle;
66
67   /**
68    * Field _threshold.
69    */
70   private float _threshold;
71
72   /**
73    * keeps track of state for field: _threshold
74    */
75   private boolean _has_threshold;
76
77   /**
78    * Field _showBootstrap.
79    */
80   private boolean _showBootstrap;
81
82   /**
83    * keeps track of state for field: _showBootstrap
84    */
85   private boolean _has_showBootstrap;
86
87   /**
88    * Field _showDistances.
89    */
90   private boolean _showDistances;
91
92   /**
93    * keeps track of state for field: _showDistances
94    */
95   private boolean _has_showDistances;
96
97   /**
98    * Field _markUnlinked.
99    */
100   private boolean _markUnlinked;
101
102   /**
103    * keeps track of state for field: _markUnlinked
104    */
105   private boolean _has_markUnlinked;
106
107   /**
108    * Field _fitToWindow.
109    */
110   private boolean _fitToWindow;
111
112   /**
113    * keeps track of state for field: _fitToWindow
114    */
115   private boolean _has_fitToWindow;
116
117   /**
118    * Field _currentTree.
119    */
120   private boolean _currentTree;
121
122   /**
123    * keeps track of state for field: _currentTree
124    */
125   private boolean _has_currentTree;
126
127   /**
128    * Tree ID added for binding tree visualization settings to vamsas document
129    * trees in jalview 2.4.1
130    * 
131    */
132   private java.lang.String _id;
133
134   /**
135    * Field _width.
136    */
137   private int _width;
138
139   /**
140    * keeps track of state for field: _width
141    */
142   private boolean _has_width;
143
144   /**
145    * Field _height.
146    */
147   private int _height;
148
149   /**
150    * keeps track of state for field: _height
151    */
152   private boolean _has_height;
153
154   /**
155    * Field _xpos.
156    */
157   private int _xpos;
158
159   /**
160    * keeps track of state for field: _xpos
161    */
162   private boolean _has_xpos;
163
164   /**
165    * Field _ypos.
166    */
167   private int _ypos;
168
169   /**
170    * keeps track of state for field: _ypos
171    */
172   private boolean _has_ypos;
173
174   /**
175    * Field _title.
176    */
177   private java.lang.String _title;
178
179   /**
180    * Field _newick.
181    */
182   private java.lang.String _newick;
183
184   // ----------------/
185   // - Constructors -/
186   // ----------------/
187
188   public Tree()
189   {
190     super();
191   }
192
193   // -----------/
194   // - Methods -/
195   // -----------/
196
197   /**
198      */
199   public void deleteCurrentTree()
200   {
201     this._has_currentTree = false;
202   }
203
204   /**
205      */
206   public void deleteFitToWindow()
207   {
208     this._has_fitToWindow = false;
209   }
210
211   /**
212      */
213   public void deleteFontSize()
214   {
215     this._has_fontSize = false;
216   }
217
218   /**
219      */
220   public void deleteFontStyle()
221   {
222     this._has_fontStyle = false;
223   }
224
225   /**
226      */
227   public void deleteHeight()
228   {
229     this._has_height = false;
230   }
231
232   /**
233      */
234   public void deleteMarkUnlinked()
235   {
236     this._has_markUnlinked = false;
237   }
238
239   /**
240      */
241   public void deleteShowBootstrap()
242   {
243     this._has_showBootstrap = false;
244   }
245
246   /**
247      */
248   public void deleteShowDistances()
249   {
250     this._has_showDistances = false;
251   }
252
253   /**
254      */
255   public void deleteThreshold()
256   {
257     this._has_threshold = false;
258   }
259
260   /**
261      */
262   public void deleteWidth()
263   {
264     this._has_width = false;
265   }
266
267   /**
268      */
269   public void deleteXpos()
270   {
271     this._has_xpos = false;
272   }
273
274   /**
275      */
276   public void deleteYpos()
277   {
278     this._has_ypos = false;
279   }
280
281   /**
282    * Returns the value of field 'currentTree'.
283    * 
284    * @return the value of field 'CurrentTree'.
285    */
286   public boolean getCurrentTree()
287   {
288     return this._currentTree;
289   }
290
291   /**
292    * Returns the value of field 'fitToWindow'.
293    * 
294    * @return the value of field 'FitToWindow'.
295    */
296   public boolean getFitToWindow()
297   {
298     return this._fitToWindow;
299   }
300
301   /**
302    * Returns the value of field 'fontName'.
303    * 
304    * @return the value of field 'FontName'.
305    */
306   public java.lang.String getFontName()
307   {
308     return this._fontName;
309   }
310
311   /**
312    * Returns the value of field 'fontSize'.
313    * 
314    * @return the value of field 'FontSize'.
315    */
316   public int getFontSize()
317   {
318     return this._fontSize;
319   }
320
321   /**
322    * Returns the value of field 'fontStyle'.
323    * 
324    * @return the value of field 'FontStyle'.
325    */
326   public int getFontStyle()
327   {
328     return this._fontStyle;
329   }
330
331   /**
332    * Returns the value of field 'height'.
333    * 
334    * @return the value of field 'Height'.
335    */
336   public int getHeight()
337   {
338     return this._height;
339   }
340
341   /**
342    * Returns the value of field 'id'. The field 'id' has the following
343    * description: Tree ID added for binding tree visualization settings to
344    * vamsas document trees in jalview 2.4.1
345    * 
346    * 
347    * @return the value of field 'Id'.
348    */
349   public java.lang.String getId()
350   {
351     return this._id;
352   }
353
354   /**
355    * Returns the value of field 'markUnlinked'.
356    * 
357    * @return the value of field 'MarkUnlinked'.
358    */
359   public boolean getMarkUnlinked()
360   {
361     return this._markUnlinked;
362   }
363
364   /**
365    * Returns the value of field 'newick'.
366    * 
367    * @return the value of field 'Newick'.
368    */
369   public java.lang.String getNewick()
370   {
371     return this._newick;
372   }
373
374   /**
375    * Returns the value of field 'showBootstrap'.
376    * 
377    * @return the value of field 'ShowBootstrap'.
378    */
379   public boolean getShowBootstrap()
380   {
381     return this._showBootstrap;
382   }
383
384   /**
385    * Returns the value of field 'showDistances'.
386    * 
387    * @return the value of field 'ShowDistances'.
388    */
389   public boolean getShowDistances()
390   {
391     return this._showDistances;
392   }
393
394   /**
395    * Returns the value of field 'threshold'.
396    * 
397    * @return the value of field 'Threshold'.
398    */
399   public float getThreshold()
400   {
401     return this._threshold;
402   }
403
404   /**
405    * Returns the value of field 'title'.
406    * 
407    * @return the value of field 'Title'.
408    */
409   public java.lang.String getTitle()
410   {
411     return this._title;
412   }
413
414   /**
415    * Returns the value of field 'width'.
416    * 
417    * @return the value of field 'Width'.
418    */
419   public int getWidth()
420   {
421     return this._width;
422   }
423
424   /**
425    * Returns the value of field 'xpos'.
426    * 
427    * @return the value of field 'Xpos'.
428    */
429   public int getXpos()
430   {
431     return this._xpos;
432   }
433
434   /**
435    * Returns the value of field 'ypos'.
436    * 
437    * @return the value of field 'Ypos'.
438    */
439   public int getYpos()
440   {
441     return this._ypos;
442   }
443
444   /**
445    * Method hasCurrentTree.
446    * 
447    * @return true if at least one CurrentTree has been added
448    */
449   public boolean hasCurrentTree()
450   {
451     return this._has_currentTree;
452   }
453
454   /**
455    * Method hasFitToWindow.
456    * 
457    * @return true if at least one FitToWindow has been added
458    */
459   public boolean hasFitToWindow()
460   {
461     return this._has_fitToWindow;
462   }
463
464   /**
465    * Method hasFontSize.
466    * 
467    * @return true if at least one FontSize has been added
468    */
469   public boolean hasFontSize()
470   {
471     return this._has_fontSize;
472   }
473
474   /**
475    * Method hasFontStyle.
476    * 
477    * @return true if at least one FontStyle has been added
478    */
479   public boolean hasFontStyle()
480   {
481     return this._has_fontStyle;
482   }
483
484   /**
485    * Method hasHeight.
486    * 
487    * @return true if at least one Height has been added
488    */
489   public boolean hasHeight()
490   {
491     return this._has_height;
492   }
493
494   /**
495    * Method hasMarkUnlinked.
496    * 
497    * @return true if at least one MarkUnlinked has been added
498    */
499   public boolean hasMarkUnlinked()
500   {
501     return this._has_markUnlinked;
502   }
503
504   /**
505    * Method hasShowBootstrap.
506    * 
507    * @return true if at least one ShowBootstrap has been added
508    */
509   public boolean hasShowBootstrap()
510   {
511     return this._has_showBootstrap;
512   }
513
514   /**
515    * Method hasShowDistances.
516    * 
517    * @return true if at least one ShowDistances has been added
518    */
519   public boolean hasShowDistances()
520   {
521     return this._has_showDistances;
522   }
523
524   /**
525    * Method hasThreshold.
526    * 
527    * @return true if at least one Threshold has been added
528    */
529   public boolean hasThreshold()
530   {
531     return this._has_threshold;
532   }
533
534   /**
535    * Method hasWidth.
536    * 
537    * @return true if at least one Width has been added
538    */
539   public boolean hasWidth()
540   {
541     return this._has_width;
542   }
543
544   /**
545    * Method hasXpos.
546    * 
547    * @return true if at least one Xpos has been added
548    */
549   public boolean hasXpos()
550   {
551     return this._has_xpos;
552   }
553
554   /**
555    * Method hasYpos.
556    * 
557    * @return true if at least one Ypos has been added
558    */
559   public boolean hasYpos()
560   {
561     return this._has_ypos;
562   }
563
564   /**
565    * Returns the value of field 'currentTree'.
566    * 
567    * @return the value of field 'CurrentTree'.
568    */
569   public boolean isCurrentTree()
570   {
571     return this._currentTree;
572   }
573
574   /**
575    * Returns the value of field 'fitToWindow'.
576    * 
577    * @return the value of field 'FitToWindow'.
578    */
579   public boolean isFitToWindow()
580   {
581     return this._fitToWindow;
582   }
583
584   /**
585    * Returns the value of field 'markUnlinked'.
586    * 
587    * @return the value of field 'MarkUnlinked'.
588    */
589   public boolean isMarkUnlinked()
590   {
591     return this._markUnlinked;
592   }
593
594   /**
595    * Returns the value of field 'showBootstrap'.
596    * 
597    * @return the value of field 'ShowBootstrap'.
598    */
599   public boolean isShowBootstrap()
600   {
601     return this._showBootstrap;
602   }
603
604   /**
605    * Returns the value of field 'showDistances'.
606    * 
607    * @return the value of field 'ShowDistances'.
608    */
609   public boolean isShowDistances()
610   {
611     return this._showDistances;
612   }
613
614   /**
615    * Method isValid.
616    * 
617    * @return true if this object is valid according to the schema
618    */
619   public boolean isValid()
620   {
621     try
622     {
623       validate();
624     } catch (org.exolab.castor.xml.ValidationException vex)
625     {
626       return false;
627     }
628     return true;
629   }
630
631   /**
632    * 
633    * 
634    * @param out
635    * @throws org.exolab.castor.xml.MarshalException
636    *           if object is null or if any SAXException is thrown during
637    *           marshaling
638    * @throws org.exolab.castor.xml.ValidationException
639    *           if this object is an invalid instance according to the schema
640    */
641   public void marshal(final java.io.Writer out)
642           throws org.exolab.castor.xml.MarshalException,
643           org.exolab.castor.xml.ValidationException
644   {
645     Marshaller.marshal(this, out);
646   }
647
648   /**
649    * 
650    * 
651    * @param handler
652    * @throws java.io.IOException
653    *           if an IOException occurs during marshaling
654    * @throws org.exolab.castor.xml.ValidationException
655    *           if this object is an invalid instance according to the schema
656    * @throws org.exolab.castor.xml.MarshalException
657    *           if object is null or if any SAXException is thrown during
658    *           marshaling
659    */
660   public void marshal(final org.xml.sax.ContentHandler handler)
661           throws java.io.IOException,
662           org.exolab.castor.xml.MarshalException,
663           org.exolab.castor.xml.ValidationException
664   {
665     Marshaller.marshal(this, handler);
666   }
667
668   /**
669    * Sets the value of field 'currentTree'.
670    * 
671    * @param currentTree
672    *          the value of field 'currentTree'.
673    */
674   public void setCurrentTree(final boolean currentTree)
675   {
676     this._currentTree = currentTree;
677     this._has_currentTree = true;
678   }
679
680   /**
681    * Sets the value of field 'fitToWindow'.
682    * 
683    * @param fitToWindow
684    *          the value of field 'fitToWindow'.
685    */
686   public void setFitToWindow(final boolean fitToWindow)
687   {
688     this._fitToWindow = fitToWindow;
689     this._has_fitToWindow = true;
690   }
691
692   /**
693    * Sets the value of field 'fontName'.
694    * 
695    * @param fontName
696    *          the value of field 'fontName'.
697    */
698   public void setFontName(final java.lang.String fontName)
699   {
700     this._fontName = fontName;
701   }
702
703   /**
704    * Sets the value of field 'fontSize'.
705    * 
706    * @param fontSize
707    *          the value of field 'fontSize'.
708    */
709   public void setFontSize(final int fontSize)
710   {
711     this._fontSize = fontSize;
712     this._has_fontSize = true;
713   }
714
715   /**
716    * Sets the value of field 'fontStyle'.
717    * 
718    * @param fontStyle
719    *          the value of field 'fontStyle'.
720    */
721   public void setFontStyle(final int fontStyle)
722   {
723     this._fontStyle = fontStyle;
724     this._has_fontStyle = true;
725   }
726
727   /**
728    * Sets the value of field 'height'.
729    * 
730    * @param height
731    *          the value of field 'height'.
732    */
733   public void setHeight(final int height)
734   {
735     this._height = height;
736     this._has_height = true;
737   }
738
739   /**
740    * Sets the value of field 'id'. The field 'id' has the following description:
741    * Tree ID added for binding tree visualization settings to vamsas document
742    * trees in jalview 2.4.1
743    * 
744    * 
745    * @param id
746    *          the value of field 'id'.
747    */
748   public void setId(final java.lang.String id)
749   {
750     this._id = id;
751   }
752
753   /**
754    * Sets the value of field 'markUnlinked'.
755    * 
756    * @param markUnlinked
757    *          the value of field 'markUnlinked'.
758    */
759   public void setMarkUnlinked(final boolean markUnlinked)
760   {
761     this._markUnlinked = markUnlinked;
762     this._has_markUnlinked = true;
763   }
764
765   /**
766    * Sets the value of field 'newick'.
767    * 
768    * @param newick
769    *          the value of field 'newick'.
770    */
771   public void setNewick(final java.lang.String newick)
772   {
773     this._newick = newick;
774   }
775
776   /**
777    * Sets the value of field 'showBootstrap'.
778    * 
779    * @param showBootstrap
780    *          the value of field 'showBootstrap'.
781    */
782   public void setShowBootstrap(final boolean showBootstrap)
783   {
784     this._showBootstrap = showBootstrap;
785     this._has_showBootstrap = true;
786   }
787
788   /**
789    * Sets the value of field 'showDistances'.
790    * 
791    * @param showDistances
792    *          the value of field 'showDistances'.
793    */
794   public void setShowDistances(final boolean showDistances)
795   {
796     this._showDistances = showDistances;
797     this._has_showDistances = true;
798   }
799
800   /**
801    * Sets the value of field 'threshold'.
802    * 
803    * @param threshold
804    *          the value of field 'threshold'.
805    */
806   public void setThreshold(final float threshold)
807   {
808     this._threshold = threshold;
809     this._has_threshold = true;
810   }
811
812   /**
813    * Sets the value of field 'title'.
814    * 
815    * @param title
816    *          the value of field 'title'.
817    */
818   public void setTitle(final java.lang.String title)
819   {
820     this._title = title;
821   }
822
823   /**
824    * Sets the value of field 'width'.
825    * 
826    * @param width
827    *          the value of field 'width'.
828    */
829   public void setWidth(final int width)
830   {
831     this._width = width;
832     this._has_width = true;
833   }
834
835   /**
836    * Sets the value of field 'xpos'.
837    * 
838    * @param xpos
839    *          the value of field 'xpos'.
840    */
841   public void setXpos(final int xpos)
842   {
843     this._xpos = xpos;
844     this._has_xpos = true;
845   }
846
847   /**
848    * Sets the value of field 'ypos'.
849    * 
850    * @param ypos
851    *          the value of field 'ypos'.
852    */
853   public void setYpos(final int ypos)
854   {
855     this._ypos = ypos;
856     this._has_ypos = true;
857   }
858
859   /**
860    * Method unmarshal.
861    * 
862    * @param reader
863    * @throws org.exolab.castor.xml.MarshalException
864    *           if object is null or if any SAXException is thrown during
865    *           marshaling
866    * @throws org.exolab.castor.xml.ValidationException
867    *           if this object is an invalid instance according to the schema
868    * @return the unmarshaled jalview.schemabinding.version2.Tree
869    */
870   public static jalview.schemabinding.version2.Tree unmarshal(
871           final java.io.Reader reader)
872           throws org.exolab.castor.xml.MarshalException,
873           org.exolab.castor.xml.ValidationException
874   {
875     return (jalview.schemabinding.version2.Tree) Unmarshaller.unmarshal(
876             jalview.schemabinding.version2.Tree.class, reader);
877   }
878
879   /**
880    * 
881    * 
882    * @throws org.exolab.castor.xml.ValidationException
883    *           if this object is an invalid instance according to the schema
884    */
885   public void validate() throws org.exolab.castor.xml.ValidationException
886   {
887     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
888     validator.validate(this);
889   }
890
891 }