4539ad3275f5f33fc3e2f84d7d00aeea6265c7ef
[jalview.git] / src / jalview / binding / 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.binding;
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 _width.
51    */
52   private int _width;
53
54   /**
55    * keeps track of state for field: _width
56    */
57   private boolean _has_width;
58
59   /**
60    * Field _height.
61    */
62   private int _height;
63
64   /**
65    * keeps track of state for field: _height
66    */
67   private boolean _has_height;
68
69   /**
70    * Field _xpos.
71    */
72   private int _xpos;
73
74   /**
75    * keeps track of state for field: _xpos
76    */
77   private boolean _has_xpos;
78
79   /**
80    * Field _ypos.
81    */
82   private int _ypos;
83
84   /**
85    * keeps track of state for field: _ypos
86    */
87   private boolean _has_ypos;
88
89   /**
90    * Field _fontName.
91    */
92   private java.lang.String _fontName;
93
94   /**
95    * Field _fontSize.
96    */
97   private int _fontSize;
98
99   /**
100    * keeps track of state for field: _fontSize
101    */
102   private boolean _has_fontSize;
103
104   /**
105    * Field _fontStyle.
106    */
107   private int _fontStyle;
108
109   /**
110    * keeps track of state for field: _fontStyle
111    */
112   private boolean _has_fontStyle;
113
114   /**
115    * Field _threshold.
116    */
117   private float _threshold;
118
119   /**
120    * keeps track of state for field: _threshold
121    */
122   private boolean _has_threshold;
123
124   /**
125    * Field _showBootstrap.
126    */
127   private boolean _showBootstrap;
128
129   /**
130    * keeps track of state for field: _showBootstrap
131    */
132   private boolean _has_showBootstrap;
133
134   /**
135    * Field _showDistances.
136    */
137   private boolean _showDistances;
138
139   /**
140    * keeps track of state for field: _showDistances
141    */
142   private boolean _has_showDistances;
143
144   /**
145    * Field _markUnlinked.
146    */
147   private boolean _markUnlinked;
148
149   /**
150    * keeps track of state for field: _markUnlinked
151    */
152   private boolean _has_markUnlinked;
153
154   /**
155    * Field _fitToWindow.
156    */
157   private boolean _fitToWindow;
158
159   /**
160    * keeps track of state for field: _fitToWindow
161    */
162   private boolean _has_fitToWindow;
163
164   /**
165    * Field _currentTree.
166    */
167   private boolean _currentTree;
168
169   /**
170    * keeps track of state for field: _currentTree
171    */
172   private boolean _has_currentTree;
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 'markUnlinked'.
343    * 
344    * @return the value of field 'MarkUnlinked'.
345    */
346   public boolean getMarkUnlinked()
347   {
348     return this._markUnlinked;
349   }
350
351   /**
352    * Returns the value of field 'newick'.
353    * 
354    * @return the value of field 'Newick'.
355    */
356   public java.lang.String getNewick()
357   {
358     return this._newick;
359   }
360
361   /**
362    * Returns the value of field 'showBootstrap'.
363    * 
364    * @return the value of field 'ShowBootstrap'.
365    */
366   public boolean getShowBootstrap()
367   {
368     return this._showBootstrap;
369   }
370
371   /**
372    * Returns the value of field 'showDistances'.
373    * 
374    * @return the value of field 'ShowDistances'.
375    */
376   public boolean getShowDistances()
377   {
378     return this._showDistances;
379   }
380
381   /**
382    * Returns the value of field 'threshold'.
383    * 
384    * @return the value of field 'Threshold'.
385    */
386   public float getThreshold()
387   {
388     return this._threshold;
389   }
390
391   /**
392    * Returns the value of field 'title'.
393    * 
394    * @return the value of field 'Title'.
395    */
396   public java.lang.String getTitle()
397   {
398     return this._title;
399   }
400
401   /**
402    * Returns the value of field 'width'.
403    * 
404    * @return the value of field 'Width'.
405    */
406   public int getWidth()
407   {
408     return this._width;
409   }
410
411   /**
412    * Returns the value of field 'xpos'.
413    * 
414    * @return the value of field 'Xpos'.
415    */
416   public int getXpos()
417   {
418     return this._xpos;
419   }
420
421   /**
422    * Returns the value of field 'ypos'.
423    * 
424    * @return the value of field 'Ypos'.
425    */
426   public int getYpos()
427   {
428     return this._ypos;
429   }
430
431   /**
432    * Method hasCurrentTree.
433    * 
434    * @return true if at least one CurrentTree has been added
435    */
436   public boolean hasCurrentTree()
437   {
438     return this._has_currentTree;
439   }
440
441   /**
442    * Method hasFitToWindow.
443    * 
444    * @return true if at least one FitToWindow has been added
445    */
446   public boolean hasFitToWindow()
447   {
448     return this._has_fitToWindow;
449   }
450
451   /**
452    * Method hasFontSize.
453    * 
454    * @return true if at least one FontSize has been added
455    */
456   public boolean hasFontSize()
457   {
458     return this._has_fontSize;
459   }
460
461   /**
462    * Method hasFontStyle.
463    * 
464    * @return true if at least one FontStyle has been added
465    */
466   public boolean hasFontStyle()
467   {
468     return this._has_fontStyle;
469   }
470
471   /**
472    * Method hasHeight.
473    * 
474    * @return true if at least one Height has been added
475    */
476   public boolean hasHeight()
477   {
478     return this._has_height;
479   }
480
481   /**
482    * Method hasMarkUnlinked.
483    * 
484    * @return true if at least one MarkUnlinked has been added
485    */
486   public boolean hasMarkUnlinked()
487   {
488     return this._has_markUnlinked;
489   }
490
491   /**
492    * Method hasShowBootstrap.
493    * 
494    * @return true if at least one ShowBootstrap has been added
495    */
496   public boolean hasShowBootstrap()
497   {
498     return this._has_showBootstrap;
499   }
500
501   /**
502    * Method hasShowDistances.
503    * 
504    * @return true if at least one ShowDistances has been added
505    */
506   public boolean hasShowDistances()
507   {
508     return this._has_showDistances;
509   }
510
511   /**
512    * Method hasThreshold.
513    * 
514    * @return true if at least one Threshold has been added
515    */
516   public boolean hasThreshold()
517   {
518     return this._has_threshold;
519   }
520
521   /**
522    * Method hasWidth.
523    * 
524    * @return true if at least one Width has been added
525    */
526   public boolean hasWidth()
527   {
528     return this._has_width;
529   }
530
531   /**
532    * Method hasXpos.
533    * 
534    * @return true if at least one Xpos has been added
535    */
536   public boolean hasXpos()
537   {
538     return this._has_xpos;
539   }
540
541   /**
542    * Method hasYpos.
543    * 
544    * @return true if at least one Ypos has been added
545    */
546   public boolean hasYpos()
547   {
548     return this._has_ypos;
549   }
550
551   /**
552    * Returns the value of field 'currentTree'.
553    * 
554    * @return the value of field 'CurrentTree'.
555    */
556   public boolean isCurrentTree()
557   {
558     return this._currentTree;
559   }
560
561   /**
562    * Returns the value of field 'fitToWindow'.
563    * 
564    * @return the value of field 'FitToWindow'.
565    */
566   public boolean isFitToWindow()
567   {
568     return this._fitToWindow;
569   }
570
571   /**
572    * Returns the value of field 'markUnlinked'.
573    * 
574    * @return the value of field 'MarkUnlinked'.
575    */
576   public boolean isMarkUnlinked()
577   {
578     return this._markUnlinked;
579   }
580
581   /**
582    * Returns the value of field 'showBootstrap'.
583    * 
584    * @return the value of field 'ShowBootstrap'.
585    */
586   public boolean isShowBootstrap()
587   {
588     return this._showBootstrap;
589   }
590
591   /**
592    * Returns the value of field 'showDistances'.
593    * 
594    * @return the value of field 'ShowDistances'.
595    */
596   public boolean isShowDistances()
597   {
598     return this._showDistances;
599   }
600
601   /**
602    * Method isValid.
603    * 
604    * @return true if this object is valid according to the schema
605    */
606   public boolean isValid()
607   {
608     try
609     {
610       validate();
611     } catch (org.exolab.castor.xml.ValidationException vex)
612     {
613       return false;
614     }
615     return true;
616   }
617
618   /**
619    * 
620    * 
621    * @param out
622    * @throws org.exolab.castor.xml.MarshalException
623    *           if object is null or if any SAXException is thrown during
624    *           marshaling
625    * @throws org.exolab.castor.xml.ValidationException
626    *           if this object is an invalid instance according to the schema
627    */
628   public void marshal(final java.io.Writer out)
629           throws org.exolab.castor.xml.MarshalException,
630           org.exolab.castor.xml.ValidationException
631   {
632     Marshaller.marshal(this, out);
633   }
634
635   /**
636    * 
637    * 
638    * @param handler
639    * @throws java.io.IOException
640    *           if an IOException occurs during marshaling
641    * @throws org.exolab.castor.xml.ValidationException
642    *           if this object is an invalid instance according to the schema
643    * @throws org.exolab.castor.xml.MarshalException
644    *           if object is null or if any SAXException is thrown during
645    *           marshaling
646    */
647   public void marshal(final org.xml.sax.ContentHandler handler)
648           throws java.io.IOException,
649           org.exolab.castor.xml.MarshalException,
650           org.exolab.castor.xml.ValidationException
651   {
652     Marshaller.marshal(this, handler);
653   }
654
655   /**
656    * Sets the value of field 'currentTree'.
657    * 
658    * @param currentTree
659    *          the value of field 'currentTree'.
660    */
661   public void setCurrentTree(final boolean currentTree)
662   {
663     this._currentTree = currentTree;
664     this._has_currentTree = true;
665   }
666
667   /**
668    * Sets the value of field 'fitToWindow'.
669    * 
670    * @param fitToWindow
671    *          the value of field 'fitToWindow'.
672    */
673   public void setFitToWindow(final boolean fitToWindow)
674   {
675     this._fitToWindow = fitToWindow;
676     this._has_fitToWindow = true;
677   }
678
679   /**
680    * Sets the value of field 'fontName'.
681    * 
682    * @param fontName
683    *          the value of field 'fontName'.
684    */
685   public void setFontName(final java.lang.String fontName)
686   {
687     this._fontName = fontName;
688   }
689
690   /**
691    * Sets the value of field 'fontSize'.
692    * 
693    * @param fontSize
694    *          the value of field 'fontSize'.
695    */
696   public void setFontSize(final int fontSize)
697   {
698     this._fontSize = fontSize;
699     this._has_fontSize = true;
700   }
701
702   /**
703    * Sets the value of field 'fontStyle'.
704    * 
705    * @param fontStyle
706    *          the value of field 'fontStyle'.
707    */
708   public void setFontStyle(final int fontStyle)
709   {
710     this._fontStyle = fontStyle;
711     this._has_fontStyle = true;
712   }
713
714   /**
715    * Sets the value of field 'height'.
716    * 
717    * @param height
718    *          the value of field 'height'.
719    */
720   public void setHeight(final int height)
721   {
722     this._height = height;
723     this._has_height = true;
724   }
725
726   /**
727    * Sets the value of field 'markUnlinked'.
728    * 
729    * @param markUnlinked
730    *          the value of field 'markUnlinked'.
731    */
732   public void setMarkUnlinked(final boolean markUnlinked)
733   {
734     this._markUnlinked = markUnlinked;
735     this._has_markUnlinked = true;
736   }
737
738   /**
739    * Sets the value of field 'newick'.
740    * 
741    * @param newick
742    *          the value of field 'newick'.
743    */
744   public void setNewick(final java.lang.String newick)
745   {
746     this._newick = newick;
747   }
748
749   /**
750    * Sets the value of field 'showBootstrap'.
751    * 
752    * @param showBootstrap
753    *          the value of field 'showBootstrap'.
754    */
755   public void setShowBootstrap(final boolean showBootstrap)
756   {
757     this._showBootstrap = showBootstrap;
758     this._has_showBootstrap = true;
759   }
760
761   /**
762    * Sets the value of field 'showDistances'.
763    * 
764    * @param showDistances
765    *          the value of field 'showDistances'.
766    */
767   public void setShowDistances(final boolean showDistances)
768   {
769     this._showDistances = showDistances;
770     this._has_showDistances = true;
771   }
772
773   /**
774    * Sets the value of field 'threshold'.
775    * 
776    * @param threshold
777    *          the value of field 'threshold'.
778    */
779   public void setThreshold(final float threshold)
780   {
781     this._threshold = threshold;
782     this._has_threshold = true;
783   }
784
785   /**
786    * Sets the value of field 'title'.
787    * 
788    * @param title
789    *          the value of field 'title'.
790    */
791   public void setTitle(final java.lang.String title)
792   {
793     this._title = title;
794   }
795
796   /**
797    * Sets the value of field 'width'.
798    * 
799    * @param width
800    *          the value of field 'width'.
801    */
802   public void setWidth(final int width)
803   {
804     this._width = width;
805     this._has_width = true;
806   }
807
808   /**
809    * Sets the value of field 'xpos'.
810    * 
811    * @param xpos
812    *          the value of field 'xpos'.
813    */
814   public void setXpos(final int xpos)
815   {
816     this._xpos = xpos;
817     this._has_xpos = true;
818   }
819
820   /**
821    * Sets the value of field 'ypos'.
822    * 
823    * @param ypos
824    *          the value of field 'ypos'.
825    */
826   public void setYpos(final int ypos)
827   {
828     this._ypos = ypos;
829     this._has_ypos = true;
830   }
831
832   /**
833    * Method unmarshal.
834    * 
835    * @param reader
836    * @throws org.exolab.castor.xml.MarshalException
837    *           if object is null or if any SAXException is thrown during
838    *           marshaling
839    * @throws org.exolab.castor.xml.ValidationException
840    *           if this object is an invalid instance according to the schema
841    * @return the unmarshaled jalview.binding.Tree
842    */
843   public static jalview.binding.Tree unmarshal(final java.io.Reader reader)
844           throws org.exolab.castor.xml.MarshalException,
845           org.exolab.castor.xml.ValidationException
846   {
847     return (jalview.binding.Tree) Unmarshaller
848             .unmarshal(jalview.binding.Tree.class, reader);
849   }
850
851   /**
852    * 
853    * 
854    * @throws org.exolab.castor.xml.ValidationException
855    *           if this object is an invalid instance according to the schema
856    */
857   public void validate() throws org.exolab.castor.xml.ValidationException
858   {
859     org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
860     validator.validate(this);
861   }
862
863 }