1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $(date) 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.
20 *******************************************************************************/
22 * This class was automatically generated with
23 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
28 package jalview.binding;
30 //---------------------------------/
31 //- Imported classes and packages -/
32 //---------------------------------/
34 import org.exolab.castor.xml.Marshaller;
35 import org.exolab.castor.xml.Unmarshaller;
40 * @version $Revision$ $Date$
42 public class Tree implements java.io.Serializable
45 // --------------------------/
46 // - Class/Member Variables -/
47 // --------------------------/
55 * keeps track of state for field: _width
57 private boolean _has_width;
65 * keeps track of state for field: _height
67 private boolean _has_height;
75 * keeps track of state for field: _xpos
77 private boolean _has_xpos;
85 * keeps track of state for field: _ypos
87 private boolean _has_ypos;
92 private java.lang.String _fontName;
97 private int _fontSize;
100 * keeps track of state for field: _fontSize
102 private boolean _has_fontSize;
107 private int _fontStyle;
110 * keeps track of state for field: _fontStyle
112 private boolean _has_fontStyle;
117 private float _threshold;
120 * keeps track of state for field: _threshold
122 private boolean _has_threshold;
125 * Field _showBootstrap.
127 private boolean _showBootstrap;
130 * keeps track of state for field: _showBootstrap
132 private boolean _has_showBootstrap;
135 * Field _showDistances.
137 private boolean _showDistances;
140 * keeps track of state for field: _showDistances
142 private boolean _has_showDistances;
145 * Field _markUnlinked.
147 private boolean _markUnlinked;
150 * keeps track of state for field: _markUnlinked
152 private boolean _has_markUnlinked;
155 * Field _fitToWindow.
157 private boolean _fitToWindow;
160 * keeps track of state for field: _fitToWindow
162 private boolean _has_fitToWindow;
165 * Field _currentTree.
167 private boolean _currentTree;
170 * keeps track of state for field: _currentTree
172 private boolean _has_currentTree;
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 'markUnlinked'.
344 * @return the value of field 'MarkUnlinked'.
346 public boolean getMarkUnlinked()
348 return this._markUnlinked;
352 * Returns the value of field 'newick'.
354 * @return the value of field 'Newick'.
356 public java.lang.String getNewick()
362 * Returns the value of field 'showBootstrap'.
364 * @return the value of field 'ShowBootstrap'.
366 public boolean getShowBootstrap()
368 return this._showBootstrap;
372 * Returns the value of field 'showDistances'.
374 * @return the value of field 'ShowDistances'.
376 public boolean getShowDistances()
378 return this._showDistances;
382 * Returns the value of field 'threshold'.
384 * @return the value of field 'Threshold'.
386 public float getThreshold()
388 return this._threshold;
392 * Returns the value of field 'title'.
394 * @return the value of field 'Title'.
396 public java.lang.String getTitle()
402 * Returns the value of field 'width'.
404 * @return the value of field 'Width'.
406 public int getWidth()
412 * Returns the value of field 'xpos'.
414 * @return the value of field 'Xpos'.
422 * Returns the value of field 'ypos'.
424 * @return the value of field 'Ypos'.
432 * Method hasCurrentTree.
434 * @return true if at least one CurrentTree has been added
436 public boolean hasCurrentTree()
438 return this._has_currentTree;
442 * Method hasFitToWindow.
444 * @return true if at least one FitToWindow has been added
446 public boolean hasFitToWindow()
448 return this._has_fitToWindow;
452 * Method hasFontSize.
454 * @return true if at least one FontSize has been added
456 public boolean hasFontSize()
458 return this._has_fontSize;
462 * Method hasFontStyle.
464 * @return true if at least one FontStyle has been added
466 public boolean hasFontStyle()
468 return this._has_fontStyle;
474 * @return true if at least one Height has been added
476 public boolean hasHeight()
478 return this._has_height;
482 * Method hasMarkUnlinked.
484 * @return true if at least one MarkUnlinked has been added
486 public boolean hasMarkUnlinked()
488 return this._has_markUnlinked;
492 * Method hasShowBootstrap.
494 * @return true if at least one ShowBootstrap has been added
496 public boolean hasShowBootstrap()
498 return this._has_showBootstrap;
502 * Method hasShowDistances.
504 * @return true if at least one ShowDistances has been added
506 public boolean hasShowDistances()
508 return this._has_showDistances;
512 * Method hasThreshold.
514 * @return true if at least one Threshold has been added
516 public boolean hasThreshold()
518 return this._has_threshold;
524 * @return true if at least one Width has been added
526 public boolean hasWidth()
528 return this._has_width;
534 * @return true if at least one Xpos has been added
536 public boolean hasXpos()
538 return this._has_xpos;
544 * @return true if at least one Ypos has been added
546 public boolean hasYpos()
548 return this._has_ypos;
552 * Returns the value of field 'currentTree'.
554 * @return the value of field 'CurrentTree'.
556 public boolean isCurrentTree()
558 return this._currentTree;
562 * Returns the value of field 'fitToWindow'.
564 * @return the value of field 'FitToWindow'.
566 public boolean isFitToWindow()
568 return this._fitToWindow;
572 * Returns the value of field 'markUnlinked'.
574 * @return the value of field 'MarkUnlinked'.
576 public boolean isMarkUnlinked()
578 return this._markUnlinked;
582 * Returns the value of field 'showBootstrap'.
584 * @return the value of field 'ShowBootstrap'.
586 public boolean isShowBootstrap()
588 return this._showBootstrap;
592 * Returns the value of field 'showDistances'.
594 * @return the value of field 'ShowDistances'.
596 public boolean isShowDistances()
598 return this._showDistances;
604 * @return true if this object is valid according to the schema
606 public boolean isValid()
611 } catch (org.exolab.castor.xml.ValidationException vex)
622 * @throws org.exolab.castor.xml.MarshalException
623 * if object is null or if any SAXException is thrown during
625 * @throws org.exolab.castor.xml.ValidationException
626 * if this object is an invalid instance according to the schema
628 public void marshal(final java.io.Writer out)
629 throws org.exolab.castor.xml.MarshalException,
630 org.exolab.castor.xml.ValidationException
632 Marshaller.marshal(this, out);
639 * @throws java.io.IOException
640 * if an IOException occurs during marshaling
641 * @throws org.exolab.castor.xml.ValidationException
642 * if this object is an invalid instance according to the schema
643 * @throws org.exolab.castor.xml.MarshalException
644 * if object is null or if any SAXException is thrown during
647 public void marshal(final org.xml.sax.ContentHandler handler)
648 throws java.io.IOException,
649 org.exolab.castor.xml.MarshalException,
650 org.exolab.castor.xml.ValidationException
652 Marshaller.marshal(this, handler);
656 * Sets the value of field 'currentTree'.
659 * the value of field 'currentTree'.
661 public void setCurrentTree(final boolean currentTree)
663 this._currentTree = currentTree;
664 this._has_currentTree = true;
668 * Sets the value of field 'fitToWindow'.
671 * the value of field 'fitToWindow'.
673 public void setFitToWindow(final boolean fitToWindow)
675 this._fitToWindow = fitToWindow;
676 this._has_fitToWindow = true;
680 * Sets the value of field 'fontName'.
683 * the value of field 'fontName'.
685 public void setFontName(final java.lang.String fontName)
687 this._fontName = fontName;
691 * Sets the value of field 'fontSize'.
694 * the value of field 'fontSize'.
696 public void setFontSize(final int fontSize)
698 this._fontSize = fontSize;
699 this._has_fontSize = true;
703 * Sets the value of field 'fontStyle'.
706 * the value of field 'fontStyle'.
708 public void setFontStyle(final int fontStyle)
710 this._fontStyle = fontStyle;
711 this._has_fontStyle = true;
715 * Sets the value of field 'height'.
718 * the value of field 'height'.
720 public void setHeight(final int height)
722 this._height = height;
723 this._has_height = true;
727 * Sets the value of field 'markUnlinked'.
729 * @param markUnlinked
730 * the value of field 'markUnlinked'.
732 public void setMarkUnlinked(final boolean markUnlinked)
734 this._markUnlinked = markUnlinked;
735 this._has_markUnlinked = true;
739 * Sets the value of field 'newick'.
742 * the value of field 'newick'.
744 public void setNewick(final java.lang.String newick)
746 this._newick = newick;
750 * Sets the value of field 'showBootstrap'.
752 * @param showBootstrap
753 * the value of field 'showBootstrap'.
755 public void setShowBootstrap(final boolean showBootstrap)
757 this._showBootstrap = showBootstrap;
758 this._has_showBootstrap = true;
762 * Sets the value of field 'showDistances'.
764 * @param showDistances
765 * the value of field 'showDistances'.
767 public void setShowDistances(final boolean showDistances)
769 this._showDistances = showDistances;
770 this._has_showDistances = true;
774 * Sets the value of field 'threshold'.
777 * the value of field 'threshold'.
779 public void setThreshold(final float threshold)
781 this._threshold = threshold;
782 this._has_threshold = true;
786 * Sets the value of field 'title'.
789 * the value of field 'title'.
791 public void setTitle(final java.lang.String title)
797 * Sets the value of field 'width'.
800 * the value of field 'width'.
802 public void setWidth(final int width)
805 this._has_width = true;
809 * Sets the value of field 'xpos'.
812 * the value of field 'xpos'.
814 public void setXpos(final int xpos)
817 this._has_xpos = true;
821 * Sets the value of field 'ypos'.
824 * the value of field 'ypos'.
826 public void setYpos(final int ypos)
829 this._has_ypos = true;
836 * @throws org.exolab.castor.xml.MarshalException
837 * if object is null or if any SAXException is thrown during
839 * @throws org.exolab.castor.xml.ValidationException
840 * if this object is an invalid instance according to the schema
841 * @return the unmarshaled jalview.binding.Tree
843 public static jalview.binding.Tree unmarshal(final java.io.Reader reader)
844 throws org.exolab.castor.xml.MarshalException,
845 org.exolab.castor.xml.ValidationException
847 return (jalview.binding.Tree) Unmarshaller
848 .unmarshal(jalview.binding.Tree.class, reader);
854 * @throws org.exolab.castor.xml.ValidationException
855 * if this object is an invalid instance according to the schema
857 public void validate() throws org.exolab.castor.xml.ValidationException
859 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
860 validator.validate(this);