2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
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
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.binding;
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 // --------------------------/
48 * keeps track of state for field: _width
50 private boolean _has_width;
58 * keeps track of state for field: _height
60 private boolean _has_height;
68 * keeps track of state for field: _xpos
70 private boolean _has_xpos;
78 * keeps track of state for field: _ypos
80 private boolean _has_ypos;
85 private java.lang.String _fontName;
90 private int _fontSize;
93 * keeps track of state for field: _fontSize
95 private boolean _has_fontSize;
100 private int _fontStyle;
103 * keeps track of state for field: _fontStyle
105 private boolean _has_fontStyle;
110 private float _threshold;
113 * keeps track of state for field: _threshold
115 private boolean _has_threshold;
118 * Field _showBootstrap.
120 private boolean _showBootstrap;
123 * keeps track of state for field: _showBootstrap
125 private boolean _has_showBootstrap;
128 * Field _showDistances.
130 private boolean _showDistances;
133 * keeps track of state for field: _showDistances
135 private boolean _has_showDistances;
138 * Field _markUnlinked.
140 private boolean _markUnlinked;
143 * keeps track of state for field: _markUnlinked
145 private boolean _has_markUnlinked;
148 * Field _fitToWindow.
150 private boolean _fitToWindow;
153 * keeps track of state for field: _fitToWindow
155 private boolean _has_fitToWindow;
158 * Field _currentTree.
160 private boolean _currentTree;
163 * keeps track of state for field: _currentTree
165 private boolean _has_currentTree;
170 private java.lang.String _title;
175 private java.lang.String _newick;
192 public void deleteCurrentTree()
194 this._has_currentTree = false;
199 public void deleteFitToWindow()
201 this._has_fitToWindow = false;
206 public void deleteFontSize()
208 this._has_fontSize = false;
213 public void deleteFontStyle()
215 this._has_fontStyle = false;
220 public void deleteHeight()
222 this._has_height = false;
227 public void deleteMarkUnlinked()
229 this._has_markUnlinked = false;
234 public void deleteShowBootstrap()
236 this._has_showBootstrap = false;
241 public void deleteShowDistances()
243 this._has_showDistances = false;
248 public void deleteThreshold()
250 this._has_threshold = false;
255 public void deleteWidth()
257 this._has_width = false;
262 public void deleteXpos()
264 this._has_xpos = false;
269 public void deleteYpos()
271 this._has_ypos = false;
275 * Returns the value of field 'currentTree'.
277 * @return the value of field 'CurrentTree'.
279 public boolean getCurrentTree()
281 return this._currentTree;
285 * Returns the value of field 'fitToWindow'.
287 * @return the value of field 'FitToWindow'.
289 public boolean getFitToWindow()
291 return this._fitToWindow;
295 * Returns the value of field 'fontName'.
297 * @return the value of field 'FontName'.
299 public java.lang.String getFontName()
301 return this._fontName;
305 * Returns the value of field 'fontSize'.
307 * @return the value of field 'FontSize'.
309 public int getFontSize()
311 return this._fontSize;
315 * Returns the value of field 'fontStyle'.
317 * @return the value of field 'FontStyle'.
319 public int getFontStyle()
321 return this._fontStyle;
325 * Returns the value of field 'height'.
327 * @return the value of field 'Height'.
329 public int getHeight()
335 * Returns the value of field 'markUnlinked'.
337 * @return the value of field 'MarkUnlinked'.
339 public boolean getMarkUnlinked()
341 return this._markUnlinked;
345 * Returns the value of field 'newick'.
347 * @return the value of field 'Newick'.
349 public java.lang.String getNewick()
355 * Returns the value of field 'showBootstrap'.
357 * @return the value of field 'ShowBootstrap'.
359 public boolean getShowBootstrap()
361 return this._showBootstrap;
365 * Returns the value of field 'showDistances'.
367 * @return the value of field 'ShowDistances'.
369 public boolean getShowDistances()
371 return this._showDistances;
375 * Returns the value of field 'threshold'.
377 * @return the value of field 'Threshold'.
379 public float getThreshold()
381 return this._threshold;
385 * Returns the value of field 'title'.
387 * @return the value of field 'Title'.
389 public java.lang.String getTitle()
395 * Returns the value of field 'width'.
397 * @return the value of field 'Width'.
399 public int getWidth()
405 * Returns the value of field 'xpos'.
407 * @return the value of field 'Xpos'.
415 * Returns the value of field 'ypos'.
417 * @return the value of field 'Ypos'.
425 * Method hasCurrentTree.
427 * @return true if at least one CurrentTree has been added
429 public boolean hasCurrentTree()
431 return this._has_currentTree;
435 * Method hasFitToWindow.
437 * @return true if at least one FitToWindow has been added
439 public boolean hasFitToWindow()
441 return this._has_fitToWindow;
445 * Method hasFontSize.
447 * @return true if at least one FontSize has been added
449 public boolean hasFontSize()
451 return this._has_fontSize;
455 * Method hasFontStyle.
457 * @return true if at least one FontStyle has been added
459 public boolean hasFontStyle()
461 return this._has_fontStyle;
467 * @return true if at least one Height has been added
469 public boolean hasHeight()
471 return this._has_height;
475 * Method hasMarkUnlinked.
477 * @return true if at least one MarkUnlinked has been added
479 public boolean hasMarkUnlinked()
481 return this._has_markUnlinked;
485 * Method hasShowBootstrap.
487 * @return true if at least one ShowBootstrap has been added
489 public boolean hasShowBootstrap()
491 return this._has_showBootstrap;
495 * Method hasShowDistances.
497 * @return true if at least one ShowDistances has been added
499 public boolean hasShowDistances()
501 return this._has_showDistances;
505 * Method hasThreshold.
507 * @return true if at least one Threshold has been added
509 public boolean hasThreshold()
511 return this._has_threshold;
517 * @return true if at least one Width has been added
519 public boolean hasWidth()
521 return this._has_width;
527 * @return true if at least one Xpos has been added
529 public boolean hasXpos()
531 return this._has_xpos;
537 * @return true if at least one Ypos has been added
539 public boolean hasYpos()
541 return this._has_ypos;
545 * Returns the value of field 'currentTree'.
547 * @return the value of field 'CurrentTree'.
549 public boolean isCurrentTree()
551 return this._currentTree;
555 * Returns the value of field 'fitToWindow'.
557 * @return the value of field 'FitToWindow'.
559 public boolean isFitToWindow()
561 return this._fitToWindow;
565 * Returns the value of field 'markUnlinked'.
567 * @return the value of field 'MarkUnlinked'.
569 public boolean isMarkUnlinked()
571 return this._markUnlinked;
575 * Returns the value of field 'showBootstrap'.
577 * @return the value of field 'ShowBootstrap'.
579 public boolean isShowBootstrap()
581 return this._showBootstrap;
585 * Returns the value of field 'showDistances'.
587 * @return the value of field 'ShowDistances'.
589 public boolean isShowDistances()
591 return this._showDistances;
597 * @return true if this object is valid according to the schema
599 public boolean isValid()
604 } catch (org.exolab.castor.xml.ValidationException vex)
615 * @throws org.exolab.castor.xml.MarshalException
616 * if object is null or if any SAXException is thrown during
618 * @throws org.exolab.castor.xml.ValidationException
619 * if this object is an invalid instance according to the schema
621 public void marshal(final java.io.Writer out)
622 throws org.exolab.castor.xml.MarshalException,
623 org.exolab.castor.xml.ValidationException
625 Marshaller.marshal(this, out);
632 * @throws java.io.IOException
633 * if an IOException occurs during marshaling
634 * @throws org.exolab.castor.xml.ValidationException
635 * if this object is an invalid instance according to the schema
636 * @throws org.exolab.castor.xml.MarshalException
637 * if object is null or if any SAXException is thrown during
640 public void marshal(final org.xml.sax.ContentHandler handler)
641 throws java.io.IOException,
642 org.exolab.castor.xml.MarshalException,
643 org.exolab.castor.xml.ValidationException
645 Marshaller.marshal(this, handler);
649 * Sets the value of field 'currentTree'.
652 * the value of field 'currentTree'.
654 public void setCurrentTree(final boolean currentTree)
656 this._currentTree = currentTree;
657 this._has_currentTree = true;
661 * Sets the value of field 'fitToWindow'.
664 * the value of field 'fitToWindow'.
666 public void setFitToWindow(final boolean fitToWindow)
668 this._fitToWindow = fitToWindow;
669 this._has_fitToWindow = true;
673 * Sets the value of field 'fontName'.
676 * the value of field 'fontName'.
678 public void setFontName(final java.lang.String fontName)
680 this._fontName = fontName;
684 * Sets the value of field 'fontSize'.
687 * the value of field 'fontSize'.
689 public void setFontSize(final int fontSize)
691 this._fontSize = fontSize;
692 this._has_fontSize = true;
696 * Sets the value of field 'fontStyle'.
699 * the value of field 'fontStyle'.
701 public void setFontStyle(final int fontStyle)
703 this._fontStyle = fontStyle;
704 this._has_fontStyle = true;
708 * Sets the value of field 'height'.
711 * the value of field 'height'.
713 public void setHeight(final int height)
715 this._height = height;
716 this._has_height = true;
720 * Sets the value of field 'markUnlinked'.
722 * @param markUnlinked
723 * the value of field 'markUnlinked'.
725 public void setMarkUnlinked(final boolean markUnlinked)
727 this._markUnlinked = markUnlinked;
728 this._has_markUnlinked = true;
732 * Sets the value of field 'newick'.
735 * the value of field 'newick'.
737 public void setNewick(final java.lang.String newick)
739 this._newick = newick;
743 * Sets the value of field 'showBootstrap'.
745 * @param showBootstrap
746 * the value of field 'showBootstrap'.
748 public void setShowBootstrap(final boolean showBootstrap)
750 this._showBootstrap = showBootstrap;
751 this._has_showBootstrap = true;
755 * Sets the value of field 'showDistances'.
757 * @param showDistances
758 * the value of field 'showDistances'.
760 public void setShowDistances(final boolean showDistances)
762 this._showDistances = showDistances;
763 this._has_showDistances = true;
767 * Sets the value of field 'threshold'.
770 * the value of field 'threshold'.
772 public void setThreshold(final float threshold)
774 this._threshold = threshold;
775 this._has_threshold = true;
779 * Sets the value of field 'title'.
782 * the value of field 'title'.
784 public void setTitle(final java.lang.String title)
790 * Sets the value of field 'width'.
793 * the value of field 'width'.
795 public void setWidth(final int width)
798 this._has_width = true;
802 * Sets the value of field 'xpos'.
805 * the value of field 'xpos'.
807 public void setXpos(final int xpos)
810 this._has_xpos = true;
814 * Sets the value of field 'ypos'.
817 * the value of field 'ypos'.
819 public void setYpos(final int ypos)
822 this._has_ypos = true;
829 * @throws org.exolab.castor.xml.MarshalException
830 * if object is null or if any SAXException is thrown during
832 * @throws org.exolab.castor.xml.ValidationException
833 * if this object is an invalid instance according to the schema
834 * @return the unmarshaled jalview.binding.Tree
836 public static jalview.binding.Tree unmarshal(final java.io.Reader reader)
837 throws org.exolab.castor.xml.MarshalException,
838 org.exolab.castor.xml.ValidationException
840 return (jalview.binding.Tree) Unmarshaller.unmarshal(
841 jalview.binding.Tree.class, reader);
847 * @throws org.exolab.castor.xml.ValidationException
848 * if this object is an invalid instance according to the schema
850 public void validate() throws org.exolab.castor.xml.ValidationException
852 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
853 validator.validate(this);