2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ 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
10 * of the License, or (at your option) any later version.
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.
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.
21 package jalview.schemabinding.version2;
23 //---------------------------------/
24 //- Imported classes and packages -/
25 //---------------------------------/
27 import org.exolab.castor.xml.Marshaller;
28 import org.exolab.castor.xml.Unmarshaller;
33 * @version $Revision$ $Date$
35 public class Tree implements java.io.Serializable
38 // --------------------------/
39 // - Class/Member Variables -/
40 // --------------------------/
45 private java.lang.String _fontName;
50 private int _fontSize;
53 * keeps track of state for field: _fontSize
55 private boolean _has_fontSize;
60 private int _fontStyle;
63 * keeps track of state for field: _fontStyle
65 private boolean _has_fontStyle;
70 private float _threshold;
73 * keeps track of state for field: _threshold
75 private boolean _has_threshold;
78 * Field _showBootstrap.
80 private boolean _showBootstrap;
83 * keeps track of state for field: _showBootstrap
85 private boolean _has_showBootstrap;
88 * Field _showDistances.
90 private boolean _showDistances;
93 * keeps track of state for field: _showDistances
95 private boolean _has_showDistances;
98 * Field _markUnlinked.
100 private boolean _markUnlinked;
103 * keeps track of state for field: _markUnlinked
105 private boolean _has_markUnlinked;
108 * Field _fitToWindow.
110 private boolean _fitToWindow;
113 * keeps track of state for field: _fitToWindow
115 private boolean _has_fitToWindow;
118 * Field _currentTree.
120 private boolean _currentTree;
123 * keeps track of state for field: _currentTree
125 private boolean _has_currentTree;
128 * Tree ID added for binding tree visualization settings to vamsas document
129 * trees in jalview 2.4.1
132 private java.lang.String _id;
140 * keeps track of state for field: _width
142 private boolean _has_width;
150 * keeps track of state for field: _height
152 private boolean _has_height;
160 * keeps track of state for field: _xpos
162 private boolean _has_xpos;
170 * keeps track of state for field: _ypos
172 private boolean _has_ypos;
177 private java.lang.String _title;
182 private java.lang.String _newick;
199 public void deleteCurrentTree()
201 this._has_currentTree = false;
206 public void deleteFitToWindow()
208 this._has_fitToWindow = false;
213 public void deleteFontSize()
215 this._has_fontSize = false;
220 public void deleteFontStyle()
222 this._has_fontStyle = false;
227 public void deleteHeight()
229 this._has_height = false;
234 public void deleteMarkUnlinked()
236 this._has_markUnlinked = false;
241 public void deleteShowBootstrap()
243 this._has_showBootstrap = false;
248 public void deleteShowDistances()
250 this._has_showDistances = false;
255 public void deleteThreshold()
257 this._has_threshold = false;
262 public void deleteWidth()
264 this._has_width = false;
269 public void deleteXpos()
271 this._has_xpos = false;
276 public void deleteYpos()
278 this._has_ypos = false;
282 * Returns the value of field 'currentTree'.
284 * @return the value of field 'CurrentTree'.
286 public boolean getCurrentTree()
288 return this._currentTree;
292 * Returns the value of field 'fitToWindow'.
294 * @return the value of field 'FitToWindow'.
296 public boolean getFitToWindow()
298 return this._fitToWindow;
302 * Returns the value of field 'fontName'.
304 * @return the value of field 'FontName'.
306 public java.lang.String getFontName()
308 return this._fontName;
312 * Returns the value of field 'fontSize'.
314 * @return the value of field 'FontSize'.
316 public int getFontSize()
318 return this._fontSize;
322 * Returns the value of field 'fontStyle'.
324 * @return the value of field 'FontStyle'.
326 public int getFontStyle()
328 return this._fontStyle;
332 * Returns the value of field 'height'.
334 * @return the value of field 'Height'.
336 public int getHeight()
342 * Returns the value of field 'id'. The field 'id' has the following
343 * description: Tree ID added for binding tree visualization settings to
344 * vamsas document trees in jalview 2.4.1
347 * @return the value of field 'Id'.
349 public java.lang.String getId()
355 * Returns the value of field 'markUnlinked'.
357 * @return the value of field 'MarkUnlinked'.
359 public boolean getMarkUnlinked()
361 return this._markUnlinked;
365 * Returns the value of field 'newick'.
367 * @return the value of field 'Newick'.
369 public java.lang.String getNewick()
375 * Returns the value of field 'showBootstrap'.
377 * @return the value of field 'ShowBootstrap'.
379 public boolean getShowBootstrap()
381 return this._showBootstrap;
385 * Returns the value of field 'showDistances'.
387 * @return the value of field 'ShowDistances'.
389 public boolean getShowDistances()
391 return this._showDistances;
395 * Returns the value of field 'threshold'.
397 * @return the value of field 'Threshold'.
399 public float getThreshold()
401 return this._threshold;
405 * Returns the value of field 'title'.
407 * @return the value of field 'Title'.
409 public java.lang.String getTitle()
415 * Returns the value of field 'width'.
417 * @return the value of field 'Width'.
419 public int getWidth()
425 * Returns the value of field 'xpos'.
427 * @return the value of field 'Xpos'.
435 * Returns the value of field 'ypos'.
437 * @return the value of field 'Ypos'.
445 * Method hasCurrentTree.
447 * @return true if at least one CurrentTree has been added
449 public boolean hasCurrentTree()
451 return this._has_currentTree;
455 * Method hasFitToWindow.
457 * @return true if at least one FitToWindow has been added
459 public boolean hasFitToWindow()
461 return this._has_fitToWindow;
465 * Method hasFontSize.
467 * @return true if at least one FontSize has been added
469 public boolean hasFontSize()
471 return this._has_fontSize;
475 * Method hasFontStyle.
477 * @return true if at least one FontStyle has been added
479 public boolean hasFontStyle()
481 return this._has_fontStyle;
487 * @return true if at least one Height has been added
489 public boolean hasHeight()
491 return this._has_height;
495 * Method hasMarkUnlinked.
497 * @return true if at least one MarkUnlinked has been added
499 public boolean hasMarkUnlinked()
501 return this._has_markUnlinked;
505 * Method hasShowBootstrap.
507 * @return true if at least one ShowBootstrap has been added
509 public boolean hasShowBootstrap()
511 return this._has_showBootstrap;
515 * Method hasShowDistances.
517 * @return true if at least one ShowDistances has been added
519 public boolean hasShowDistances()
521 return this._has_showDistances;
525 * Method hasThreshold.
527 * @return true if at least one Threshold has been added
529 public boolean hasThreshold()
531 return this._has_threshold;
537 * @return true if at least one Width has been added
539 public boolean hasWidth()
541 return this._has_width;
547 * @return true if at least one Xpos has been added
549 public boolean hasXpos()
551 return this._has_xpos;
557 * @return true if at least one Ypos has been added
559 public boolean hasYpos()
561 return this._has_ypos;
565 * Returns the value of field 'currentTree'.
567 * @return the value of field 'CurrentTree'.
569 public boolean isCurrentTree()
571 return this._currentTree;
575 * Returns the value of field 'fitToWindow'.
577 * @return the value of field 'FitToWindow'.
579 public boolean isFitToWindow()
581 return this._fitToWindow;
585 * Returns the value of field 'markUnlinked'.
587 * @return the value of field 'MarkUnlinked'.
589 public boolean isMarkUnlinked()
591 return this._markUnlinked;
595 * Returns the value of field 'showBootstrap'.
597 * @return the value of field 'ShowBootstrap'.
599 public boolean isShowBootstrap()
601 return this._showBootstrap;
605 * Returns the value of field 'showDistances'.
607 * @return the value of field 'ShowDistances'.
609 public boolean isShowDistances()
611 return this._showDistances;
617 * @return true if this object is valid according to the schema
619 public boolean isValid()
624 } catch (org.exolab.castor.xml.ValidationException vex)
635 * @throws org.exolab.castor.xml.MarshalException
636 * if object is null or if any SAXException is thrown during
638 * @throws org.exolab.castor.xml.ValidationException
639 * if this object is an invalid instance according to the schema
641 public void marshal(final java.io.Writer out)
642 throws org.exolab.castor.xml.MarshalException,
643 org.exolab.castor.xml.ValidationException
645 Marshaller.marshal(this, out);
652 * @throws java.io.IOException
653 * if an IOException occurs during marshaling
654 * @throws org.exolab.castor.xml.ValidationException
655 * if this object is an invalid instance according to the schema
656 * @throws org.exolab.castor.xml.MarshalException
657 * if object is null or if any SAXException is thrown during
660 public void marshal(final org.xml.sax.ContentHandler handler)
661 throws java.io.IOException,
662 org.exolab.castor.xml.MarshalException,
663 org.exolab.castor.xml.ValidationException
665 Marshaller.marshal(this, handler);
669 * Sets the value of field 'currentTree'.
672 * the value of field 'currentTree'.
674 public void setCurrentTree(final boolean currentTree)
676 this._currentTree = currentTree;
677 this._has_currentTree = true;
681 * Sets the value of field 'fitToWindow'.
684 * the value of field 'fitToWindow'.
686 public void setFitToWindow(final boolean fitToWindow)
688 this._fitToWindow = fitToWindow;
689 this._has_fitToWindow = true;
693 * Sets the value of field 'fontName'.
696 * the value of field 'fontName'.
698 public void setFontName(final java.lang.String fontName)
700 this._fontName = fontName;
704 * Sets the value of field 'fontSize'.
707 * the value of field 'fontSize'.
709 public void setFontSize(final int fontSize)
711 this._fontSize = fontSize;
712 this._has_fontSize = true;
716 * Sets the value of field 'fontStyle'.
719 * the value of field 'fontStyle'.
721 public void setFontStyle(final int fontStyle)
723 this._fontStyle = fontStyle;
724 this._has_fontStyle = true;
728 * Sets the value of field 'height'.
731 * the value of field 'height'.
733 public void setHeight(final int height)
735 this._height = height;
736 this._has_height = true;
740 * Sets the value of field 'id'. The field 'id' has the following description:
741 * Tree ID added for binding tree visualization settings to vamsas document
742 * trees in jalview 2.4.1
746 * the value of field 'id'.
748 public void setId(final java.lang.String id)
754 * Sets the value of field 'markUnlinked'.
756 * @param markUnlinked
757 * the value of field 'markUnlinked'.
759 public void setMarkUnlinked(final boolean markUnlinked)
761 this._markUnlinked = markUnlinked;
762 this._has_markUnlinked = true;
766 * Sets the value of field 'newick'.
769 * the value of field 'newick'.
771 public void setNewick(final java.lang.String newick)
773 this._newick = newick;
777 * Sets the value of field 'showBootstrap'.
779 * @param showBootstrap
780 * the value of field 'showBootstrap'.
782 public void setShowBootstrap(final boolean showBootstrap)
784 this._showBootstrap = showBootstrap;
785 this._has_showBootstrap = true;
789 * Sets the value of field 'showDistances'.
791 * @param showDistances
792 * the value of field 'showDistances'.
794 public void setShowDistances(final boolean showDistances)
796 this._showDistances = showDistances;
797 this._has_showDistances = true;
801 * Sets the value of field 'threshold'.
804 * the value of field 'threshold'.
806 public void setThreshold(final float threshold)
808 this._threshold = threshold;
809 this._has_threshold = true;
813 * Sets the value of field 'title'.
816 * the value of field 'title'.
818 public void setTitle(final java.lang.String title)
824 * Sets the value of field 'width'.
827 * the value of field 'width'.
829 public void setWidth(final int width)
832 this._has_width = true;
836 * Sets the value of field 'xpos'.
839 * the value of field 'xpos'.
841 public void setXpos(final int xpos)
844 this._has_xpos = true;
848 * Sets the value of field 'ypos'.
851 * the value of field 'ypos'.
853 public void setYpos(final int ypos)
856 this._has_ypos = true;
863 * @throws org.exolab.castor.xml.MarshalException
864 * if object is null or if any SAXException is thrown during
866 * @throws org.exolab.castor.xml.ValidationException
867 * if this object is an invalid instance according to the schema
868 * @return the unmarshaled jalview.schemabinding.version2.Tree
870 public static jalview.schemabinding.version2.Tree unmarshal(
871 final java.io.Reader reader)
872 throws org.exolab.castor.xml.MarshalException,
873 org.exolab.castor.xml.ValidationException
875 return (jalview.schemabinding.version2.Tree) Unmarshaller.unmarshal(
876 jalview.schemabinding.version2.Tree.class, reader);
882 * @throws org.exolab.castor.xml.ValidationException
883 * if this object is an invalid instance according to the schema
885 public void validate() throws org.exolab.castor.xml.ValidationException
887 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
888 validator.validate(this);