2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
3 * Copyright (C) 2014 The Jalview Authors
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 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 package jalview.schemabinding.version2;
21 //---------------------------------/
22 //- Imported classes and packages -/
23 //---------------------------------/
25 import org.exolab.castor.xml.Marshaller;
26 import org.exolab.castor.xml.Unmarshaller;
31 * @version $Revision$ $Date$
33 public class Tree implements java.io.Serializable
36 // --------------------------/
37 // - Class/Member Variables -/
38 // --------------------------/
43 private java.lang.String _fontName;
48 private int _fontSize;
51 * keeps track of state for field: _fontSize
53 private boolean _has_fontSize;
58 private int _fontStyle;
61 * keeps track of state for field: _fontStyle
63 private boolean _has_fontStyle;
68 private float _threshold;
71 * keeps track of state for field: _threshold
73 private boolean _has_threshold;
76 * Field _showBootstrap.
78 private boolean _showBootstrap;
81 * keeps track of state for field: _showBootstrap
83 private boolean _has_showBootstrap;
86 * Field _showDistances.
88 private boolean _showDistances;
91 * keeps track of state for field: _showDistances
93 private boolean _has_showDistances;
96 * Field _markUnlinked.
98 private boolean _markUnlinked;
101 * keeps track of state for field: _markUnlinked
103 private boolean _has_markUnlinked;
106 * Field _fitToWindow.
108 private boolean _fitToWindow;
111 * keeps track of state for field: _fitToWindow
113 private boolean _has_fitToWindow;
116 * Field _currentTree.
118 private boolean _currentTree;
121 * keeps track of state for field: _currentTree
123 private boolean _has_currentTree;
126 * Tree ID added for binding tree visualization settings to vamsas document
127 * trees in jalview 2.4.1
130 private java.lang.String _id;
138 * keeps track of state for field: _width
140 private boolean _has_width;
148 * keeps track of state for field: _height
150 private boolean _has_height;
158 * keeps track of state for field: _xpos
160 private boolean _has_xpos;
168 * keeps track of state for field: _ypos
170 private boolean _has_ypos;
175 private java.lang.String _title;
180 private java.lang.String _newick;
197 public void deleteCurrentTree()
199 this._has_currentTree = false;
204 public void deleteFitToWindow()
206 this._has_fitToWindow = false;
211 public void deleteFontSize()
213 this._has_fontSize = false;
218 public void deleteFontStyle()
220 this._has_fontStyle = false;
225 public void deleteHeight()
227 this._has_height = false;
232 public void deleteMarkUnlinked()
234 this._has_markUnlinked = false;
239 public void deleteShowBootstrap()
241 this._has_showBootstrap = false;
246 public void deleteShowDistances()
248 this._has_showDistances = false;
253 public void deleteThreshold()
255 this._has_threshold = false;
260 public void deleteWidth()
262 this._has_width = false;
267 public void deleteXpos()
269 this._has_xpos = false;
274 public void deleteYpos()
276 this._has_ypos = false;
280 * Returns the value of field 'currentTree'.
282 * @return the value of field 'CurrentTree'.
284 public boolean getCurrentTree()
286 return this._currentTree;
290 * Returns the value of field 'fitToWindow'.
292 * @return the value of field 'FitToWindow'.
294 public boolean getFitToWindow()
296 return this._fitToWindow;
300 * Returns the value of field 'fontName'.
302 * @return the value of field 'FontName'.
304 public java.lang.String getFontName()
306 return this._fontName;
310 * Returns the value of field 'fontSize'.
312 * @return the value of field 'FontSize'.
314 public int getFontSize()
316 return this._fontSize;
320 * Returns the value of field 'fontStyle'.
322 * @return the value of field 'FontStyle'.
324 public int getFontStyle()
326 return this._fontStyle;
330 * Returns the value of field 'height'.
332 * @return the value of field 'Height'.
334 public int getHeight()
340 * Returns the value of field 'id'. The field 'id' has the following
341 * description: Tree ID added for binding tree visualization settings to
342 * vamsas document trees in jalview 2.4.1
345 * @return the value of field 'Id'.
347 public java.lang.String getId()
353 * Returns the value of field 'markUnlinked'.
355 * @return the value of field 'MarkUnlinked'.
357 public boolean getMarkUnlinked()
359 return this._markUnlinked;
363 * Returns the value of field 'newick'.
365 * @return the value of field 'Newick'.
367 public java.lang.String getNewick()
373 * Returns the value of field 'showBootstrap'.
375 * @return the value of field 'ShowBootstrap'.
377 public boolean getShowBootstrap()
379 return this._showBootstrap;
383 * Returns the value of field 'showDistances'.
385 * @return the value of field 'ShowDistances'.
387 public boolean getShowDistances()
389 return this._showDistances;
393 * Returns the value of field 'threshold'.
395 * @return the value of field 'Threshold'.
397 public float getThreshold()
399 return this._threshold;
403 * Returns the value of field 'title'.
405 * @return the value of field 'Title'.
407 public java.lang.String getTitle()
413 * Returns the value of field 'width'.
415 * @return the value of field 'Width'.
417 public int getWidth()
423 * Returns the value of field 'xpos'.
425 * @return the value of field 'Xpos'.
433 * Returns the value of field 'ypos'.
435 * @return the value of field 'Ypos'.
443 * Method hasCurrentTree.
445 * @return true if at least one CurrentTree has been added
447 public boolean hasCurrentTree()
449 return this._has_currentTree;
453 * Method hasFitToWindow.
455 * @return true if at least one FitToWindow has been added
457 public boolean hasFitToWindow()
459 return this._has_fitToWindow;
463 * Method hasFontSize.
465 * @return true if at least one FontSize has been added
467 public boolean hasFontSize()
469 return this._has_fontSize;
473 * Method hasFontStyle.
475 * @return true if at least one FontStyle has been added
477 public boolean hasFontStyle()
479 return this._has_fontStyle;
485 * @return true if at least one Height has been added
487 public boolean hasHeight()
489 return this._has_height;
493 * Method hasMarkUnlinked.
495 * @return true if at least one MarkUnlinked has been added
497 public boolean hasMarkUnlinked()
499 return this._has_markUnlinked;
503 * Method hasShowBootstrap.
505 * @return true if at least one ShowBootstrap has been added
507 public boolean hasShowBootstrap()
509 return this._has_showBootstrap;
513 * Method hasShowDistances.
515 * @return true if at least one ShowDistances has been added
517 public boolean hasShowDistances()
519 return this._has_showDistances;
523 * Method hasThreshold.
525 * @return true if at least one Threshold has been added
527 public boolean hasThreshold()
529 return this._has_threshold;
535 * @return true if at least one Width has been added
537 public boolean hasWidth()
539 return this._has_width;
545 * @return true if at least one Xpos has been added
547 public boolean hasXpos()
549 return this._has_xpos;
555 * @return true if at least one Ypos has been added
557 public boolean hasYpos()
559 return this._has_ypos;
563 * Returns the value of field 'currentTree'.
565 * @return the value of field 'CurrentTree'.
567 public boolean isCurrentTree()
569 return this._currentTree;
573 * Returns the value of field 'fitToWindow'.
575 * @return the value of field 'FitToWindow'.
577 public boolean isFitToWindow()
579 return this._fitToWindow;
583 * Returns the value of field 'markUnlinked'.
585 * @return the value of field 'MarkUnlinked'.
587 public boolean isMarkUnlinked()
589 return this._markUnlinked;
593 * Returns the value of field 'showBootstrap'.
595 * @return the value of field 'ShowBootstrap'.
597 public boolean isShowBootstrap()
599 return this._showBootstrap;
603 * Returns the value of field 'showDistances'.
605 * @return the value of field 'ShowDistances'.
607 public boolean isShowDistances()
609 return this._showDistances;
615 * @return true if this object is valid according to the schema
617 public boolean isValid()
622 } catch (org.exolab.castor.xml.ValidationException vex)
633 * @throws org.exolab.castor.xml.MarshalException
634 * if object is null or if any SAXException is thrown during
636 * @throws org.exolab.castor.xml.ValidationException
637 * if this object is an invalid instance according to the schema
639 public void marshal(final java.io.Writer out)
640 throws org.exolab.castor.xml.MarshalException,
641 org.exolab.castor.xml.ValidationException
643 Marshaller.marshal(this, out);
650 * @throws java.io.IOException
651 * if an IOException occurs during marshaling
652 * @throws org.exolab.castor.xml.ValidationException
653 * if this object is an invalid instance according to the schema
654 * @throws org.exolab.castor.xml.MarshalException
655 * if object is null or if any SAXException is thrown during
658 public void marshal(final org.xml.sax.ContentHandler handler)
659 throws java.io.IOException,
660 org.exolab.castor.xml.MarshalException,
661 org.exolab.castor.xml.ValidationException
663 Marshaller.marshal(this, handler);
667 * Sets the value of field 'currentTree'.
670 * the value of field 'currentTree'.
672 public void setCurrentTree(final boolean currentTree)
674 this._currentTree = currentTree;
675 this._has_currentTree = true;
679 * Sets the value of field 'fitToWindow'.
682 * the value of field 'fitToWindow'.
684 public void setFitToWindow(final boolean fitToWindow)
686 this._fitToWindow = fitToWindow;
687 this._has_fitToWindow = true;
691 * Sets the value of field 'fontName'.
694 * the value of field 'fontName'.
696 public void setFontName(final java.lang.String fontName)
698 this._fontName = fontName;
702 * Sets the value of field 'fontSize'.
705 * the value of field 'fontSize'.
707 public void setFontSize(final int fontSize)
709 this._fontSize = fontSize;
710 this._has_fontSize = true;
714 * Sets the value of field 'fontStyle'.
717 * the value of field 'fontStyle'.
719 public void setFontStyle(final int fontStyle)
721 this._fontStyle = fontStyle;
722 this._has_fontStyle = true;
726 * Sets the value of field 'height'.
729 * the value of field 'height'.
731 public void setHeight(final int height)
733 this._height = height;
734 this._has_height = true;
738 * Sets the value of field 'id'. The field 'id' has the following description:
739 * Tree ID added for binding tree visualization settings to vamsas document
740 * trees in jalview 2.4.1
744 * the value of field 'id'.
746 public void setId(final java.lang.String id)
752 * Sets the value of field 'markUnlinked'.
754 * @param markUnlinked
755 * the value of field 'markUnlinked'.
757 public void setMarkUnlinked(final boolean markUnlinked)
759 this._markUnlinked = markUnlinked;
760 this._has_markUnlinked = true;
764 * Sets the value of field 'newick'.
767 * the value of field 'newick'.
769 public void setNewick(final java.lang.String newick)
771 this._newick = newick;
775 * Sets the value of field 'showBootstrap'.
777 * @param showBootstrap
778 * the value of field 'showBootstrap'.
780 public void setShowBootstrap(final boolean showBootstrap)
782 this._showBootstrap = showBootstrap;
783 this._has_showBootstrap = true;
787 * Sets the value of field 'showDistances'.
789 * @param showDistances
790 * the value of field 'showDistances'.
792 public void setShowDistances(final boolean showDistances)
794 this._showDistances = showDistances;
795 this._has_showDistances = true;
799 * Sets the value of field 'threshold'.
802 * the value of field 'threshold'.
804 public void setThreshold(final float threshold)
806 this._threshold = threshold;
807 this._has_threshold = true;
811 * Sets the value of field 'title'.
814 * the value of field 'title'.
816 public void setTitle(final java.lang.String title)
822 * Sets the value of field 'width'.
825 * the value of field 'width'.
827 public void setWidth(final int width)
830 this._has_width = true;
834 * Sets the value of field 'xpos'.
837 * the value of field 'xpos'.
839 public void setXpos(final int xpos)
842 this._has_xpos = true;
846 * Sets the value of field 'ypos'.
849 * the value of field 'ypos'.
851 public void setYpos(final int ypos)
854 this._has_ypos = true;
861 * @throws org.exolab.castor.xml.MarshalException
862 * if object is null or if any SAXException is thrown during
864 * @throws org.exolab.castor.xml.ValidationException
865 * if this object is an invalid instance according to the schema
866 * @return the unmarshaled jalview.schemabinding.version2.Tree
868 public static jalview.schemabinding.version2.Tree unmarshal(
869 final java.io.Reader reader)
870 throws org.exolab.castor.xml.MarshalException,
871 org.exolab.castor.xml.ValidationException
873 return (jalview.schemabinding.version2.Tree) Unmarshaller.unmarshal(
874 jalview.schemabinding.version2.Tree.class, reader);
880 * @throws org.exolab.castor.xml.ValidationException
881 * if this object is an invalid instance according to the schema
883 public void validate() throws org.exolab.castor.xml.ValidationException
885 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
886 validator.validate(this);