2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1)
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.binding;
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 // --------------------------/
46 * keeps track of state for field: _width
48 private boolean _has_width;
56 * keeps track of state for field: _height
58 private boolean _has_height;
66 * keeps track of state for field: _xpos
68 private boolean _has_xpos;
76 * keeps track of state for field: _ypos
78 private boolean _has_ypos;
83 private java.lang.String _fontName;
88 private int _fontSize;
91 * keeps track of state for field: _fontSize
93 private boolean _has_fontSize;
98 private int _fontStyle;
101 * keeps track of state for field: _fontStyle
103 private boolean _has_fontStyle;
108 private float _threshold;
111 * keeps track of state for field: _threshold
113 private boolean _has_threshold;
116 * Field _showBootstrap.
118 private boolean _showBootstrap;
121 * keeps track of state for field: _showBootstrap
123 private boolean _has_showBootstrap;
126 * Field _showDistances.
128 private boolean _showDistances;
131 * keeps track of state for field: _showDistances
133 private boolean _has_showDistances;
136 * Field _markUnlinked.
138 private boolean _markUnlinked;
141 * keeps track of state for field: _markUnlinked
143 private boolean _has_markUnlinked;
146 * Field _fitToWindow.
148 private boolean _fitToWindow;
151 * keeps track of state for field: _fitToWindow
153 private boolean _has_fitToWindow;
156 * Field _currentTree.
158 private boolean _currentTree;
161 * keeps track of state for field: _currentTree
163 private boolean _has_currentTree;
168 private java.lang.String _title;
173 private java.lang.String _newick;
190 public void deleteCurrentTree()
192 this._has_currentTree = false;
197 public void deleteFitToWindow()
199 this._has_fitToWindow = false;
204 public void deleteFontSize()
206 this._has_fontSize = false;
211 public void deleteFontStyle()
213 this._has_fontStyle = false;
218 public void deleteHeight()
220 this._has_height = false;
225 public void deleteMarkUnlinked()
227 this._has_markUnlinked = false;
232 public void deleteShowBootstrap()
234 this._has_showBootstrap = false;
239 public void deleteShowDistances()
241 this._has_showDistances = false;
246 public void deleteThreshold()
248 this._has_threshold = false;
253 public void deleteWidth()
255 this._has_width = false;
260 public void deleteXpos()
262 this._has_xpos = false;
267 public void deleteYpos()
269 this._has_ypos = false;
273 * Returns the value of field 'currentTree'.
275 * @return the value of field 'CurrentTree'.
277 public boolean getCurrentTree()
279 return this._currentTree;
283 * Returns the value of field 'fitToWindow'.
285 * @return the value of field 'FitToWindow'.
287 public boolean getFitToWindow()
289 return this._fitToWindow;
293 * Returns the value of field 'fontName'.
295 * @return the value of field 'FontName'.
297 public java.lang.String getFontName()
299 return this._fontName;
303 * Returns the value of field 'fontSize'.
305 * @return the value of field 'FontSize'.
307 public int getFontSize()
309 return this._fontSize;
313 * Returns the value of field 'fontStyle'.
315 * @return the value of field 'FontStyle'.
317 public int getFontStyle()
319 return this._fontStyle;
323 * Returns the value of field 'height'.
325 * @return the value of field 'Height'.
327 public int getHeight()
333 * Returns the value of field 'markUnlinked'.
335 * @return the value of field 'MarkUnlinked'.
337 public boolean getMarkUnlinked()
339 return this._markUnlinked;
343 * Returns the value of field 'newick'.
345 * @return the value of field 'Newick'.
347 public java.lang.String getNewick()
353 * Returns the value of field 'showBootstrap'.
355 * @return the value of field 'ShowBootstrap'.
357 public boolean getShowBootstrap()
359 return this._showBootstrap;
363 * Returns the value of field 'showDistances'.
365 * @return the value of field 'ShowDistances'.
367 public boolean getShowDistances()
369 return this._showDistances;
373 * Returns the value of field 'threshold'.
375 * @return the value of field 'Threshold'.
377 public float getThreshold()
379 return this._threshold;
383 * Returns the value of field 'title'.
385 * @return the value of field 'Title'.
387 public java.lang.String getTitle()
393 * Returns the value of field 'width'.
395 * @return the value of field 'Width'.
397 public int getWidth()
403 * Returns the value of field 'xpos'.
405 * @return the value of field 'Xpos'.
413 * Returns the value of field 'ypos'.
415 * @return the value of field 'Ypos'.
423 * Method hasCurrentTree.
425 * @return true if at least one CurrentTree has been added
427 public boolean hasCurrentTree()
429 return this._has_currentTree;
433 * Method hasFitToWindow.
435 * @return true if at least one FitToWindow has been added
437 public boolean hasFitToWindow()
439 return this._has_fitToWindow;
443 * Method hasFontSize.
445 * @return true if at least one FontSize has been added
447 public boolean hasFontSize()
449 return this._has_fontSize;
453 * Method hasFontStyle.
455 * @return true if at least one FontStyle has been added
457 public boolean hasFontStyle()
459 return this._has_fontStyle;
465 * @return true if at least one Height has been added
467 public boolean hasHeight()
469 return this._has_height;
473 * Method hasMarkUnlinked.
475 * @return true if at least one MarkUnlinked has been added
477 public boolean hasMarkUnlinked()
479 return this._has_markUnlinked;
483 * Method hasShowBootstrap.
485 * @return true if at least one ShowBootstrap has been added
487 public boolean hasShowBootstrap()
489 return this._has_showBootstrap;
493 * Method hasShowDistances.
495 * @return true if at least one ShowDistances has been added
497 public boolean hasShowDistances()
499 return this._has_showDistances;
503 * Method hasThreshold.
505 * @return true if at least one Threshold has been added
507 public boolean hasThreshold()
509 return this._has_threshold;
515 * @return true if at least one Width has been added
517 public boolean hasWidth()
519 return this._has_width;
525 * @return true if at least one Xpos has been added
527 public boolean hasXpos()
529 return this._has_xpos;
535 * @return true if at least one Ypos has been added
537 public boolean hasYpos()
539 return this._has_ypos;
543 * Returns the value of field 'currentTree'.
545 * @return the value of field 'CurrentTree'.
547 public boolean isCurrentTree()
549 return this._currentTree;
553 * Returns the value of field 'fitToWindow'.
555 * @return the value of field 'FitToWindow'.
557 public boolean isFitToWindow()
559 return this._fitToWindow;
563 * Returns the value of field 'markUnlinked'.
565 * @return the value of field 'MarkUnlinked'.
567 public boolean isMarkUnlinked()
569 return this._markUnlinked;
573 * Returns the value of field 'showBootstrap'.
575 * @return the value of field 'ShowBootstrap'.
577 public boolean isShowBootstrap()
579 return this._showBootstrap;
583 * Returns the value of field 'showDistances'.
585 * @return the value of field 'ShowDistances'.
587 public boolean isShowDistances()
589 return this._showDistances;
595 * @return true if this object is valid according to the schema
597 public boolean isValid()
602 } catch (org.exolab.castor.xml.ValidationException vex)
613 * @throws org.exolab.castor.xml.MarshalException
614 * if object is null or if any SAXException is thrown during
616 * @throws org.exolab.castor.xml.ValidationException
617 * if this object is an invalid instance according to the schema
619 public void marshal(final java.io.Writer out)
620 throws org.exolab.castor.xml.MarshalException,
621 org.exolab.castor.xml.ValidationException
623 Marshaller.marshal(this, out);
630 * @throws java.io.IOException
631 * if an IOException occurs during marshaling
632 * @throws org.exolab.castor.xml.ValidationException
633 * if this object is an invalid instance according to the schema
634 * @throws org.exolab.castor.xml.MarshalException
635 * if object is null or if any SAXException is thrown during
638 public void marshal(final org.xml.sax.ContentHandler handler)
639 throws java.io.IOException,
640 org.exolab.castor.xml.MarshalException,
641 org.exolab.castor.xml.ValidationException
643 Marshaller.marshal(this, handler);
647 * Sets the value of field 'currentTree'.
650 * the value of field 'currentTree'.
652 public void setCurrentTree(final boolean currentTree)
654 this._currentTree = currentTree;
655 this._has_currentTree = true;
659 * Sets the value of field 'fitToWindow'.
662 * the value of field 'fitToWindow'.
664 public void setFitToWindow(final boolean fitToWindow)
666 this._fitToWindow = fitToWindow;
667 this._has_fitToWindow = true;
671 * Sets the value of field 'fontName'.
674 * the value of field 'fontName'.
676 public void setFontName(final java.lang.String fontName)
678 this._fontName = fontName;
682 * Sets the value of field 'fontSize'.
685 * the value of field 'fontSize'.
687 public void setFontSize(final int fontSize)
689 this._fontSize = fontSize;
690 this._has_fontSize = true;
694 * Sets the value of field 'fontStyle'.
697 * the value of field 'fontStyle'.
699 public void setFontStyle(final int fontStyle)
701 this._fontStyle = fontStyle;
702 this._has_fontStyle = true;
706 * Sets the value of field 'height'.
709 * the value of field 'height'.
711 public void setHeight(final int height)
713 this._height = height;
714 this._has_height = true;
718 * Sets the value of field 'markUnlinked'.
720 * @param markUnlinked
721 * the value of field 'markUnlinked'.
723 public void setMarkUnlinked(final boolean markUnlinked)
725 this._markUnlinked = markUnlinked;
726 this._has_markUnlinked = true;
730 * Sets the value of field 'newick'.
733 * the value of field 'newick'.
735 public void setNewick(final java.lang.String newick)
737 this._newick = newick;
741 * Sets the value of field 'showBootstrap'.
743 * @param showBootstrap
744 * the value of field 'showBootstrap'.
746 public void setShowBootstrap(final boolean showBootstrap)
748 this._showBootstrap = showBootstrap;
749 this._has_showBootstrap = true;
753 * Sets the value of field 'showDistances'.
755 * @param showDistances
756 * the value of field 'showDistances'.
758 public void setShowDistances(final boolean showDistances)
760 this._showDistances = showDistances;
761 this._has_showDistances = true;
765 * Sets the value of field 'threshold'.
768 * the value of field 'threshold'.
770 public void setThreshold(final float threshold)
772 this._threshold = threshold;
773 this._has_threshold = true;
777 * Sets the value of field 'title'.
780 * the value of field 'title'.
782 public void setTitle(final java.lang.String title)
788 * Sets the value of field 'width'.
791 * the value of field 'width'.
793 public void setWidth(final int width)
796 this._has_width = true;
800 * Sets the value of field 'xpos'.
803 * the value of field 'xpos'.
805 public void setXpos(final int xpos)
808 this._has_xpos = true;
812 * Sets the value of field 'ypos'.
815 * the value of field 'ypos'.
817 public void setYpos(final int ypos)
820 this._has_ypos = true;
827 * @throws org.exolab.castor.xml.MarshalException
828 * if object is null or if any SAXException is thrown during
830 * @throws org.exolab.castor.xml.ValidationException
831 * if this object is an invalid instance according to the schema
832 * @return the unmarshaled jalview.binding.Tree
834 public static jalview.binding.Tree unmarshal(final java.io.Reader reader)
835 throws org.exolab.castor.xml.MarshalException,
836 org.exolab.castor.xml.ValidationException
838 return (jalview.binding.Tree) Unmarshaller.unmarshal(
839 jalview.binding.Tree.class, reader);
845 * @throws org.exolab.castor.xml.ValidationException
846 * if this object is an invalid instance according to the schema
848 public void validate() throws org.exolab.castor.xml.ValidationException
850 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
851 validator.validate(this);