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