1 /*******************************************************************************
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.
17 * If not, see <http://www.gnu.org/licenses/>.
18 * The Jalview Authors are detailed in the 'AUTHORS' file.
19 ******************************************************************************/
21 * This class was automatically generated with
22 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
27 package jalview.schemabinding.version2;
29 //---------------------------------/
30 //- Imported classes and packages -/
31 //---------------------------------/
33 import org.exolab.castor.xml.Marshaller;
34 import org.exolab.castor.xml.Unmarshaller;
39 * @version $Revision$ $Date$
41 public class Tree implements java.io.Serializable
44 // --------------------------/
45 // - Class/Member Variables -/
46 // --------------------------/
51 private java.lang.String _fontName;
56 private int _fontSize;
59 * keeps track of state for field: _fontSize
61 private boolean _has_fontSize;
66 private int _fontStyle;
69 * keeps track of state for field: _fontStyle
71 private boolean _has_fontStyle;
76 private float _threshold;
79 * keeps track of state for field: _threshold
81 private boolean _has_threshold;
84 * Field _showBootstrap.
86 private boolean _showBootstrap;
89 * keeps track of state for field: _showBootstrap
91 private boolean _has_showBootstrap;
94 * Field _showDistances.
96 private boolean _showDistances;
99 * keeps track of state for field: _showDistances
101 private boolean _has_showDistances;
104 * Field _markUnlinked.
106 private boolean _markUnlinked;
109 * keeps track of state for field: _markUnlinked
111 private boolean _has_markUnlinked;
114 * Field _fitToWindow.
116 private boolean _fitToWindow;
119 * keeps track of state for field: _fitToWindow
121 private boolean _has_fitToWindow;
124 * Field _currentTree.
126 private boolean _currentTree;
129 * keeps track of state for field: _currentTree
131 private boolean _has_currentTree;
134 * Tree ID added for binding tree visualization settings to vamsas document
135 * trees in jalview 2.4.1
138 private java.lang.String _id;
146 * keeps track of state for field: _width
148 private boolean _has_width;
156 * keeps track of state for field: _height
158 private boolean _has_height;
166 * keeps track of state for field: _xpos
168 private boolean _has_xpos;
176 * keeps track of state for field: _ypos
178 private boolean _has_ypos;
183 private java.lang.String _title;
188 private java.lang.String _newick;
205 public void deleteCurrentTree()
207 this._has_currentTree = false;
212 public void deleteFitToWindow()
214 this._has_fitToWindow = false;
219 public void deleteFontSize()
221 this._has_fontSize = false;
226 public void deleteFontStyle()
228 this._has_fontStyle = false;
233 public void deleteHeight()
235 this._has_height = false;
240 public void deleteMarkUnlinked()
242 this._has_markUnlinked = false;
247 public void deleteShowBootstrap()
249 this._has_showBootstrap = false;
254 public void deleteShowDistances()
256 this._has_showDistances = false;
261 public void deleteThreshold()
263 this._has_threshold = false;
268 public void deleteWidth()
270 this._has_width = false;
275 public void deleteXpos()
277 this._has_xpos = false;
282 public void deleteYpos()
284 this._has_ypos = false;
288 * Returns the value of field 'currentTree'.
290 * @return the value of field 'CurrentTree'.
292 public boolean getCurrentTree()
294 return this._currentTree;
298 * Returns the value of field 'fitToWindow'.
300 * @return the value of field 'FitToWindow'.
302 public boolean getFitToWindow()
304 return this._fitToWindow;
308 * Returns the value of field 'fontName'.
310 * @return the value of field 'FontName'.
312 public java.lang.String getFontName()
314 return this._fontName;
318 * Returns the value of field 'fontSize'.
320 * @return the value of field 'FontSize'.
322 public int getFontSize()
324 return this._fontSize;
328 * Returns the value of field 'fontStyle'.
330 * @return the value of field 'FontStyle'.
332 public int getFontStyle()
334 return this._fontStyle;
338 * Returns the value of field 'height'.
340 * @return the value of field 'Height'.
342 public int getHeight()
348 * Returns the value of field 'id'. The field 'id' has the following
349 * description: Tree ID added for binding tree visualization settings to
350 * vamsas document trees in jalview 2.4.1
353 * @return the value of field 'Id'.
355 public java.lang.String getId()
361 * Returns the value of field 'markUnlinked'.
363 * @return the value of field 'MarkUnlinked'.
365 public boolean getMarkUnlinked()
367 return this._markUnlinked;
371 * Returns the value of field 'newick'.
373 * @return the value of field 'Newick'.
375 public java.lang.String getNewick()
381 * Returns the value of field 'showBootstrap'.
383 * @return the value of field 'ShowBootstrap'.
385 public boolean getShowBootstrap()
387 return this._showBootstrap;
391 * Returns the value of field 'showDistances'.
393 * @return the value of field 'ShowDistances'.
395 public boolean getShowDistances()
397 return this._showDistances;
401 * Returns the value of field 'threshold'.
403 * @return the value of field 'Threshold'.
405 public float getThreshold()
407 return this._threshold;
411 * Returns the value of field 'title'.
413 * @return the value of field 'Title'.
415 public java.lang.String getTitle()
421 * Returns the value of field 'width'.
423 * @return the value of field 'Width'.
425 public int getWidth()
431 * Returns the value of field 'xpos'.
433 * @return the value of field 'Xpos'.
441 * Returns the value of field 'ypos'.
443 * @return the value of field 'Ypos'.
451 * Method hasCurrentTree.
453 * @return true if at least one CurrentTree has been added
455 public boolean hasCurrentTree()
457 return this._has_currentTree;
461 * Method hasFitToWindow.
463 * @return true if at least one FitToWindow has been added
465 public boolean hasFitToWindow()
467 return this._has_fitToWindow;
471 * Method hasFontSize.
473 * @return true if at least one FontSize has been added
475 public boolean hasFontSize()
477 return this._has_fontSize;
481 * Method hasFontStyle.
483 * @return true if at least one FontStyle has been added
485 public boolean hasFontStyle()
487 return this._has_fontStyle;
493 * @return true if at least one Height has been added
495 public boolean hasHeight()
497 return this._has_height;
501 * Method hasMarkUnlinked.
503 * @return true if at least one MarkUnlinked has been added
505 public boolean hasMarkUnlinked()
507 return this._has_markUnlinked;
511 * Method hasShowBootstrap.
513 * @return true if at least one ShowBootstrap has been added
515 public boolean hasShowBootstrap()
517 return this._has_showBootstrap;
521 * Method hasShowDistances.
523 * @return true if at least one ShowDistances has been added
525 public boolean hasShowDistances()
527 return this._has_showDistances;
531 * Method hasThreshold.
533 * @return true if at least one Threshold has been added
535 public boolean hasThreshold()
537 return this._has_threshold;
543 * @return true if at least one Width has been added
545 public boolean hasWidth()
547 return this._has_width;
553 * @return true if at least one Xpos has been added
555 public boolean hasXpos()
557 return this._has_xpos;
563 * @return true if at least one Ypos has been added
565 public boolean hasYpos()
567 return this._has_ypos;
571 * Returns the value of field 'currentTree'.
573 * @return the value of field 'CurrentTree'.
575 public boolean isCurrentTree()
577 return this._currentTree;
581 * Returns the value of field 'fitToWindow'.
583 * @return the value of field 'FitToWindow'.
585 public boolean isFitToWindow()
587 return this._fitToWindow;
591 * Returns the value of field 'markUnlinked'.
593 * @return the value of field 'MarkUnlinked'.
595 public boolean isMarkUnlinked()
597 return this._markUnlinked;
601 * Returns the value of field 'showBootstrap'.
603 * @return the value of field 'ShowBootstrap'.
605 public boolean isShowBootstrap()
607 return this._showBootstrap;
611 * Returns the value of field 'showDistances'.
613 * @return the value of field 'ShowDistances'.
615 public boolean isShowDistances()
617 return this._showDistances;
623 * @return true if this object is valid according to the schema
625 public boolean isValid()
630 } catch (org.exolab.castor.xml.ValidationException vex)
641 * @throws org.exolab.castor.xml.MarshalException
642 * if object is null or if any SAXException is thrown during
644 * @throws org.exolab.castor.xml.ValidationException
645 * if this object is an invalid instance according to the schema
647 public void marshal(final java.io.Writer out)
648 throws org.exolab.castor.xml.MarshalException,
649 org.exolab.castor.xml.ValidationException
651 Marshaller.marshal(this, out);
658 * @throws java.io.IOException
659 * if an IOException occurs during marshaling
660 * @throws org.exolab.castor.xml.ValidationException
661 * if this object is an invalid instance according to the schema
662 * @throws org.exolab.castor.xml.MarshalException
663 * if object is null or if any SAXException is thrown during
666 public void marshal(final org.xml.sax.ContentHandler handler)
667 throws java.io.IOException,
668 org.exolab.castor.xml.MarshalException,
669 org.exolab.castor.xml.ValidationException
671 Marshaller.marshal(this, handler);
675 * Sets the value of field 'currentTree'.
678 * the value of field 'currentTree'.
680 public void setCurrentTree(final boolean currentTree)
682 this._currentTree = currentTree;
683 this._has_currentTree = true;
687 * Sets the value of field 'fitToWindow'.
690 * the value of field 'fitToWindow'.
692 public void setFitToWindow(final boolean fitToWindow)
694 this._fitToWindow = fitToWindow;
695 this._has_fitToWindow = true;
699 * Sets the value of field 'fontName'.
702 * the value of field 'fontName'.
704 public void setFontName(final java.lang.String fontName)
706 this._fontName = fontName;
710 * Sets the value of field 'fontSize'.
713 * the value of field 'fontSize'.
715 public void setFontSize(final int fontSize)
717 this._fontSize = fontSize;
718 this._has_fontSize = true;
722 * Sets the value of field 'fontStyle'.
725 * the value of field 'fontStyle'.
727 public void setFontStyle(final int fontStyle)
729 this._fontStyle = fontStyle;
730 this._has_fontStyle = true;
734 * Sets the value of field 'height'.
737 * the value of field 'height'.
739 public void setHeight(final int height)
741 this._height = height;
742 this._has_height = true;
746 * Sets the value of field 'id'. The field 'id' has the following description:
747 * Tree ID added for binding tree visualization settings to vamsas document
748 * trees in jalview 2.4.1
752 * the value of field 'id'.
754 public void setId(final java.lang.String id)
760 * Sets the value of field 'markUnlinked'.
762 * @param markUnlinked
763 * the value of field 'markUnlinked'.
765 public void setMarkUnlinked(final boolean markUnlinked)
767 this._markUnlinked = markUnlinked;
768 this._has_markUnlinked = true;
772 * Sets the value of field 'newick'.
775 * the value of field 'newick'.
777 public void setNewick(final java.lang.String newick)
779 this._newick = newick;
783 * Sets the value of field 'showBootstrap'.
785 * @param showBootstrap
786 * the value of field 'showBootstrap'.
788 public void setShowBootstrap(final boolean showBootstrap)
790 this._showBootstrap = showBootstrap;
791 this._has_showBootstrap = true;
795 * Sets the value of field 'showDistances'.
797 * @param showDistances
798 * the value of field 'showDistances'.
800 public void setShowDistances(final boolean showDistances)
802 this._showDistances = showDistances;
803 this._has_showDistances = true;
807 * Sets the value of field 'threshold'.
810 * the value of field 'threshold'.
812 public void setThreshold(final float threshold)
814 this._threshold = threshold;
815 this._has_threshold = true;
819 * Sets the value of field 'title'.
822 * the value of field 'title'.
824 public void setTitle(final java.lang.String title)
830 * Sets the value of field 'width'.
833 * the value of field 'width'.
835 public void setWidth(final int width)
838 this._has_width = true;
842 * Sets the value of field 'xpos'.
845 * the value of field 'xpos'.
847 public void setXpos(final int xpos)
850 this._has_xpos = true;
854 * Sets the value of field 'ypos'.
857 * the value of field 'ypos'.
859 public void setYpos(final int ypos)
862 this._has_ypos = true;
869 * @throws org.exolab.castor.xml.MarshalException
870 * if object is null or if any SAXException is thrown during
872 * @throws org.exolab.castor.xml.ValidationException
873 * if this object is an invalid instance according to the schema
874 * @return the unmarshaled jalview.schemabinding.version2.Tree
876 public static jalview.schemabinding.version2.Tree unmarshal(
877 final java.io.Reader reader)
878 throws org.exolab.castor.xml.MarshalException,
879 org.exolab.castor.xml.ValidationException
881 return (jalview.schemabinding.version2.Tree) Unmarshaller.unmarshal(
882 jalview.schemabinding.version2.Tree.class, reader);
888 * @throws org.exolab.castor.xml.ValidationException
889 * if this object is an invalid instance according to the schema
891 public void validate() throws org.exolab.castor.xml.ValidationException
893 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
894 validator.validate(this);