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