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