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