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
5 * This file is part of Jalview.
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.
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.
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 *******************************************************************************/
19 * This class was automatically generated with
20 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
25 package jalview.schemabinding.version2;
27 //---------------------------------/
28 //- Imported classes and packages -/
29 //---------------------------------/
31 import org.exolab.castor.xml.Marshaller;
32 import org.exolab.castor.xml.Unmarshaller;
37 * @version $Revision$ $Date$
39 public class Tree implements java.io.Serializable {
42 //--------------------------/
43 //- Class/Member Variables -/
44 //--------------------------/
49 private java.lang.String _fontName;
54 private int _fontSize;
57 * keeps track of state for field: _fontSize
59 private boolean _has_fontSize;
64 private int _fontStyle;
67 * keeps track of state for field: _fontStyle
69 private boolean _has_fontStyle;
74 private float _threshold;
77 * keeps track of state for field: _threshold
79 private boolean _has_threshold;
82 * Field _showBootstrap.
84 private boolean _showBootstrap;
87 * keeps track of state for field: _showBootstrap
89 private boolean _has_showBootstrap;
92 * Field _showDistances.
94 private boolean _showDistances;
97 * keeps track of state for field: _showDistances
99 private boolean _has_showDistances;
102 * Field _markUnlinked.
104 private boolean _markUnlinked;
107 * keeps track of state for field: _markUnlinked
109 private boolean _has_markUnlinked;
112 * Field _fitToWindow.
114 private boolean _fitToWindow;
117 * keeps track of state for field: _fitToWindow
119 private boolean _has_fitToWindow;
122 * Field _currentTree.
124 private boolean _currentTree;
127 * keeps track of state for field: _currentTree
129 private boolean _has_currentTree;
132 * Tree ID added for binding tree visualization settings to
133 * vamsas document trees in jalview 2.4.1
135 private java.lang.String _id;
143 * keeps track of state for field: _width
145 private boolean _has_width;
153 * keeps track of state for field: _height
155 private boolean _has_height;
163 * keeps track of state for field: _xpos
165 private boolean _has_xpos;
173 * keeps track of state for field: _ypos
175 private boolean _has_ypos;
180 private java.lang.String _title;
185 private java.lang.String _newick;
203 public void deleteCurrentTree(
205 this._has_currentTree= false;
210 public void deleteFitToWindow(
212 this._has_fitToWindow= false;
217 public void deleteFontSize(
219 this._has_fontSize= false;
224 public void deleteFontStyle(
226 this._has_fontStyle= false;
231 public void deleteHeight(
233 this._has_height= false;
238 public void deleteMarkUnlinked(
240 this._has_markUnlinked= false;
245 public void deleteShowBootstrap(
247 this._has_showBootstrap= false;
252 public void deleteShowDistances(
254 this._has_showDistances= false;
259 public void deleteThreshold(
261 this._has_threshold= false;
266 public void deleteWidth(
268 this._has_width= false;
273 public void deleteXpos(
275 this._has_xpos= false;
280 public void deleteYpos(
282 this._has_ypos= false;
286 * Returns the value of field 'currentTree'.
288 * @return the value of field 'CurrentTree'.
290 public boolean getCurrentTree(
292 return this._currentTree;
296 * Returns the value of field 'fitToWindow'.
298 * @return the value of field 'FitToWindow'.
300 public boolean getFitToWindow(
302 return this._fitToWindow;
306 * Returns the value of field 'fontName'.
308 * @return the value of field 'FontName'.
310 public java.lang.String getFontName(
312 return this._fontName;
316 * Returns the value of field 'fontSize'.
318 * @return the value of field 'FontSize'.
320 public int getFontSize(
322 return this._fontSize;
326 * Returns the value of field 'fontStyle'.
328 * @return the value of field 'FontStyle'.
330 public int getFontStyle(
332 return this._fontStyle;
336 * Returns the value of field 'height'.
338 * @return the value of field 'Height'.
340 public int getHeight(
346 * Returns the value of field 'id'. The field 'id' has the
347 * following description: Tree ID added for binding tree
348 * visualization settings to vamsas document trees in jalview
351 * @return the value of field 'Id'.
353 public java.lang.String getId(
359 * Returns the value of field 'markUnlinked'.
361 * @return the value of field 'MarkUnlinked'.
363 public boolean getMarkUnlinked(
365 return this._markUnlinked;
369 * Returns the value of field 'newick'.
371 * @return the value of field 'Newick'.
373 public java.lang.String getNewick(
379 * Returns the value of field 'showBootstrap'.
381 * @return the value of field 'ShowBootstrap'.
383 public boolean getShowBootstrap(
385 return this._showBootstrap;
389 * Returns the value of field 'showDistances'.
391 * @return the value of field 'ShowDistances'.
393 public boolean getShowDistances(
395 return this._showDistances;
399 * Returns the value of field 'threshold'.
401 * @return the value of field 'Threshold'.
403 public float getThreshold(
405 return this._threshold;
409 * Returns the value of field 'title'.
411 * @return the value of field 'Title'.
413 public java.lang.String getTitle(
419 * Returns the value of field 'width'.
421 * @return the value of field 'Width'.
429 * Returns the value of field 'xpos'.
431 * @return the value of field 'Xpos'.
439 * Returns the value of field 'ypos'.
441 * @return the value of field 'Ypos'.
449 * Method hasCurrentTree.
451 * @return true if at least one CurrentTree has been added
453 public boolean hasCurrentTree(
455 return this._has_currentTree;
459 * Method hasFitToWindow.
461 * @return true if at least one FitToWindow has been added
463 public boolean hasFitToWindow(
465 return this._has_fitToWindow;
469 * Method hasFontSize.
471 * @return true if at least one FontSize has been added
473 public boolean hasFontSize(
475 return this._has_fontSize;
479 * Method hasFontStyle.
481 * @return true if at least one FontStyle has been added
483 public boolean hasFontStyle(
485 return this._has_fontStyle;
491 * @return true if at least one Height has been added
493 public boolean hasHeight(
495 return this._has_height;
499 * Method hasMarkUnlinked.
501 * @return true if at least one MarkUnlinked has been added
503 public boolean hasMarkUnlinked(
505 return this._has_markUnlinked;
509 * Method hasShowBootstrap.
511 * @return true if at least one ShowBootstrap has been added
513 public boolean hasShowBootstrap(
515 return this._has_showBootstrap;
519 * Method hasShowDistances.
521 * @return true if at least one ShowDistances has been added
523 public boolean hasShowDistances(
525 return this._has_showDistances;
529 * Method hasThreshold.
531 * @return true if at least one Threshold has been added
533 public boolean hasThreshold(
535 return this._has_threshold;
541 * @return true if at least one Width has been added
543 public boolean hasWidth(
545 return this._has_width;
551 * @return true if at least one Xpos has been added
553 public boolean hasXpos(
555 return this._has_xpos;
561 * @return true if at least one Ypos has been added
563 public boolean hasYpos(
565 return this._has_ypos;
569 * Returns the value of field 'currentTree'.
571 * @return the value of field 'CurrentTree'.
573 public boolean isCurrentTree(
575 return this._currentTree;
579 * Returns the value of field 'fitToWindow'.
581 * @return the value of field 'FitToWindow'.
583 public boolean isFitToWindow(
585 return this._fitToWindow;
589 * Returns the value of field 'markUnlinked'.
591 * @return the value of field 'MarkUnlinked'.
593 public boolean isMarkUnlinked(
595 return this._markUnlinked;
599 * Returns the value of field 'showBootstrap'.
601 * @return the value of field 'ShowBootstrap'.
603 public boolean isShowBootstrap(
605 return this._showBootstrap;
609 * Returns the value of field 'showDistances'.
611 * @return the value of field 'ShowDistances'.
613 public boolean isShowDistances(
615 return this._showDistances;
621 * @return true if this object is valid according to the schema
623 public boolean isValid(
627 } catch (org.exolab.castor.xml.ValidationException vex) {
637 * @throws org.exolab.castor.xml.MarshalException if object is
638 * null or if any SAXException is thrown during marshaling
639 * @throws org.exolab.castor.xml.ValidationException if this
640 * object is an invalid instance according to the schema
643 final java.io.Writer out)
644 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
645 Marshaller.marshal(this, out);
652 * @throws java.io.IOException if an IOException occurs during
654 * @throws org.exolab.castor.xml.ValidationException if this
655 * object is an invalid instance according to the schema
656 * @throws org.exolab.castor.xml.MarshalException if object is
657 * null or if any SAXException is thrown during marshaling
660 final org.xml.sax.ContentHandler handler)
661 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
662 Marshaller.marshal(this, handler);
666 * Sets the value of field 'currentTree'.
668 * @param currentTree the value of field 'currentTree'.
670 public void setCurrentTree(
671 final boolean currentTree) {
672 this._currentTree = currentTree;
673 this._has_currentTree = true;
677 * Sets the value of field 'fitToWindow'.
679 * @param fitToWindow the value of field 'fitToWindow'.
681 public void setFitToWindow(
682 final boolean fitToWindow) {
683 this._fitToWindow = fitToWindow;
684 this._has_fitToWindow = true;
688 * Sets the value of field 'fontName'.
690 * @param fontName the value of field 'fontName'.
692 public void setFontName(
693 final java.lang.String fontName) {
694 this._fontName = fontName;
698 * Sets the value of field 'fontSize'.
700 * @param fontSize the value of field 'fontSize'.
702 public void setFontSize(
703 final int fontSize) {
704 this._fontSize = fontSize;
705 this._has_fontSize = true;
709 * Sets the value of field 'fontStyle'.
711 * @param fontStyle the value of field 'fontStyle'.
713 public void setFontStyle(
714 final int fontStyle) {
715 this._fontStyle = fontStyle;
716 this._has_fontStyle = true;
720 * Sets the value of field 'height'.
722 * @param height the value of field 'height'.
724 public void setHeight(
726 this._height = height;
727 this._has_height = true;
731 * Sets the value of field 'id'. The field 'id' has the
732 * following description: Tree ID added for binding tree
733 * visualization settings to vamsas document trees in jalview
736 * @param id the value of field 'id'.
739 final java.lang.String id) {
744 * Sets the value of field 'markUnlinked'.
746 * @param markUnlinked the value of field 'markUnlinked'.
748 public void setMarkUnlinked(
749 final boolean markUnlinked) {
750 this._markUnlinked = markUnlinked;
751 this._has_markUnlinked = true;
755 * Sets the value of field 'newick'.
757 * @param newick the value of field 'newick'.
759 public void setNewick(
760 final java.lang.String newick) {
761 this._newick = newick;
765 * Sets the value of field 'showBootstrap'.
767 * @param showBootstrap the value of field 'showBootstrap'.
769 public void setShowBootstrap(
770 final boolean showBootstrap) {
771 this._showBootstrap = showBootstrap;
772 this._has_showBootstrap = true;
776 * Sets the value of field 'showDistances'.
778 * @param showDistances the value of field 'showDistances'.
780 public void setShowDistances(
781 final boolean showDistances) {
782 this._showDistances = showDistances;
783 this._has_showDistances = true;
787 * Sets the value of field 'threshold'.
789 * @param threshold the value of field 'threshold'.
791 public void setThreshold(
792 final float threshold) {
793 this._threshold = threshold;
794 this._has_threshold = true;
798 * Sets the value of field 'title'.
800 * @param title the value of field 'title'.
802 public void setTitle(
803 final java.lang.String title) {
808 * Sets the value of field 'width'.
810 * @param width the value of field 'width'.
812 public void setWidth(
815 this._has_width = true;
819 * Sets the value of field 'xpos'.
821 * @param xpos the value of field 'xpos'.
826 this._has_xpos = true;
830 * Sets the value of field 'ypos'.
832 * @param ypos the value of field 'ypos'.
837 this._has_ypos = true;
844 * @throws org.exolab.castor.xml.MarshalException if object is
845 * null or if any SAXException is thrown during marshaling
846 * @throws org.exolab.castor.xml.ValidationException if this
847 * object is an invalid instance according to the schema
848 * @return the unmarshaled jalview.schemabinding.version2.Tree
850 public static jalview.schemabinding.version2.Tree unmarshal(
851 final java.io.Reader reader)
852 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
853 return (jalview.schemabinding.version2.Tree) Unmarshaller.unmarshal(jalview.schemabinding.version2.Tree.class, reader);
859 * @throws org.exolab.castor.xml.ValidationException if this
860 * object is an invalid instance according to the schema
862 public void validate(
864 throws org.exolab.castor.xml.ValidationException {
865 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
866 validator.validate(this);