1 /*******************************************************************************
2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3 * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
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 *******************************************************************************/
19 * This class was automatically generated with
20 * <a href="http://www.castor.org">Castor 1.1</a>, using an XML
25 package jalview.binding;
27 //---------------------------------/
28 //- Imported classes and packages -/
29 //---------------------------------/
31 import org.exolab.castor.xml.Marshaller;
32 import org.exolab.castor.xml.Unmarshaller;
37 * @version $Revision$ $Date$
39 public class Tree implements java.io.Serializable {
42 //--------------------------/
43 //- Class/Member Variables -/
44 //--------------------------/
52 * keeps track of state for field: _width
54 private boolean _has_width;
62 * keeps track of state for field: _height
64 private boolean _has_height;
72 * keeps track of state for field: _xpos
74 private boolean _has_xpos;
82 * keeps track of state for field: _ypos
84 private boolean _has_ypos;
89 private java.lang.String _fontName;
94 private int _fontSize;
97 * keeps track of state for field: _fontSize
99 private boolean _has_fontSize;
104 private int _fontStyle;
107 * keeps track of state for field: _fontStyle
109 private boolean _has_fontStyle;
114 private float _threshold;
117 * keeps track of state for field: _threshold
119 private boolean _has_threshold;
122 * Field _showBootstrap.
124 private boolean _showBootstrap;
127 * keeps track of state for field: _showBootstrap
129 private boolean _has_showBootstrap;
132 * Field _showDistances.
134 private boolean _showDistances;
137 * keeps track of state for field: _showDistances
139 private boolean _has_showDistances;
142 * Field _markUnlinked.
144 private boolean _markUnlinked;
147 * keeps track of state for field: _markUnlinked
149 private boolean _has_markUnlinked;
152 * Field _fitToWindow.
154 private boolean _fitToWindow;
157 * keeps track of state for field: _fitToWindow
159 private boolean _has_fitToWindow;
162 * Field _currentTree.
164 private boolean _currentTree;
167 * keeps track of state for field: _currentTree
169 private boolean _has_currentTree;
174 private java.lang.String _title;
179 private java.lang.String _newick;
197 public void deleteCurrentTree(
199 this._has_currentTree= false;
204 public void deleteFitToWindow(
206 this._has_fitToWindow= false;
211 public void deleteFontSize(
213 this._has_fontSize= false;
218 public void deleteFontStyle(
220 this._has_fontStyle= false;
225 public void deleteHeight(
227 this._has_height= false;
232 public void deleteMarkUnlinked(
234 this._has_markUnlinked= false;
239 public void deleteShowBootstrap(
241 this._has_showBootstrap= false;
246 public void deleteShowDistances(
248 this._has_showDistances= false;
253 public void deleteThreshold(
255 this._has_threshold= false;
260 public void deleteWidth(
262 this._has_width= false;
267 public void deleteXpos(
269 this._has_xpos= false;
274 public void deleteYpos(
276 this._has_ypos= false;
280 * Returns the value of field 'currentTree'.
282 * @return the value of field 'CurrentTree'.
284 public boolean getCurrentTree(
286 return this._currentTree;
290 * Returns the value of field 'fitToWindow'.
292 * @return the value of field 'FitToWindow'.
294 public boolean getFitToWindow(
296 return this._fitToWindow;
300 * Returns the value of field 'fontName'.
302 * @return the value of field 'FontName'.
304 public java.lang.String getFontName(
306 return this._fontName;
310 * Returns the value of field 'fontSize'.
312 * @return the value of field 'FontSize'.
314 public int getFontSize(
316 return this._fontSize;
320 * Returns the value of field 'fontStyle'.
322 * @return the value of field 'FontStyle'.
324 public int getFontStyle(
326 return this._fontStyle;
330 * Returns the value of field 'height'.
332 * @return the value of field 'Height'.
334 public int getHeight(
340 * Returns the value of field 'markUnlinked'.
342 * @return the value of field 'MarkUnlinked'.
344 public boolean getMarkUnlinked(
346 return this._markUnlinked;
350 * Returns the value of field 'newick'.
352 * @return the value of field 'Newick'.
354 public java.lang.String getNewick(
360 * Returns the value of field 'showBootstrap'.
362 * @return the value of field 'ShowBootstrap'.
364 public boolean getShowBootstrap(
366 return this._showBootstrap;
370 * Returns the value of field 'showDistances'.
372 * @return the value of field 'ShowDistances'.
374 public boolean getShowDistances(
376 return this._showDistances;
380 * Returns the value of field 'threshold'.
382 * @return the value of field 'Threshold'.
384 public float getThreshold(
386 return this._threshold;
390 * Returns the value of field 'title'.
392 * @return the value of field 'Title'.
394 public java.lang.String getTitle(
400 * Returns the value of field 'width'.
402 * @return the value of field 'Width'.
410 * Returns the value of field 'xpos'.
412 * @return the value of field 'Xpos'.
420 * Returns the value of field 'ypos'.
422 * @return the value of field 'Ypos'.
430 * Method hasCurrentTree.
432 * @return true if at least one CurrentTree has been added
434 public boolean hasCurrentTree(
436 return this._has_currentTree;
440 * Method hasFitToWindow.
442 * @return true if at least one FitToWindow has been added
444 public boolean hasFitToWindow(
446 return this._has_fitToWindow;
450 * Method hasFontSize.
452 * @return true if at least one FontSize has been added
454 public boolean hasFontSize(
456 return this._has_fontSize;
460 * Method hasFontStyle.
462 * @return true if at least one FontStyle has been added
464 public boolean hasFontStyle(
466 return this._has_fontStyle;
472 * @return true if at least one Height has been added
474 public boolean hasHeight(
476 return this._has_height;
480 * Method hasMarkUnlinked.
482 * @return true if at least one MarkUnlinked has been added
484 public boolean hasMarkUnlinked(
486 return this._has_markUnlinked;
490 * Method hasShowBootstrap.
492 * @return true if at least one ShowBootstrap has been added
494 public boolean hasShowBootstrap(
496 return this._has_showBootstrap;
500 * Method hasShowDistances.
502 * @return true if at least one ShowDistances has been added
504 public boolean hasShowDistances(
506 return this._has_showDistances;
510 * Method hasThreshold.
512 * @return true if at least one Threshold has been added
514 public boolean hasThreshold(
516 return this._has_threshold;
522 * @return true if at least one Width has been added
524 public boolean hasWidth(
526 return this._has_width;
532 * @return true if at least one Xpos has been added
534 public boolean hasXpos(
536 return this._has_xpos;
542 * @return true if at least one Ypos has been added
544 public boolean hasYpos(
546 return this._has_ypos;
550 * Returns the value of field 'currentTree'.
552 * @return the value of field 'CurrentTree'.
554 public boolean isCurrentTree(
556 return this._currentTree;
560 * Returns the value of field 'fitToWindow'.
562 * @return the value of field 'FitToWindow'.
564 public boolean isFitToWindow(
566 return this._fitToWindow;
570 * Returns the value of field 'markUnlinked'.
572 * @return the value of field 'MarkUnlinked'.
574 public boolean isMarkUnlinked(
576 return this._markUnlinked;
580 * Returns the value of field 'showBootstrap'.
582 * @return the value of field 'ShowBootstrap'.
584 public boolean isShowBootstrap(
586 return this._showBootstrap;
590 * Returns the value of field 'showDistances'.
592 * @return the value of field 'ShowDistances'.
594 public boolean isShowDistances(
596 return this._showDistances;
602 * @return true if this object is valid according to the schema
604 public boolean isValid(
608 } catch (org.exolab.castor.xml.ValidationException vex) {
618 * @throws org.exolab.castor.xml.MarshalException if object is
619 * null or if any SAXException is thrown during marshaling
620 * @throws org.exolab.castor.xml.ValidationException if this
621 * object is an invalid instance according to the schema
624 final java.io.Writer out)
625 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
626 Marshaller.marshal(this, out);
633 * @throws java.io.IOException if an IOException occurs during
635 * @throws org.exolab.castor.xml.ValidationException if this
636 * object is an invalid instance according to the schema
637 * @throws org.exolab.castor.xml.MarshalException if object is
638 * null or if any SAXException is thrown during marshaling
641 final org.xml.sax.ContentHandler handler)
642 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
643 Marshaller.marshal(this, handler);
647 * Sets the value of field 'currentTree'.
649 * @param currentTree the value of field 'currentTree'.
651 public void setCurrentTree(
652 final boolean currentTree) {
653 this._currentTree = currentTree;
654 this._has_currentTree = true;
658 * Sets the value of field 'fitToWindow'.
660 * @param fitToWindow the value of field 'fitToWindow'.
662 public void setFitToWindow(
663 final boolean fitToWindow) {
664 this._fitToWindow = fitToWindow;
665 this._has_fitToWindow = true;
669 * Sets the value of field 'fontName'.
671 * @param fontName the value of field 'fontName'.
673 public void setFontName(
674 final java.lang.String fontName) {
675 this._fontName = fontName;
679 * Sets the value of field 'fontSize'.
681 * @param fontSize the value of field 'fontSize'.
683 public void setFontSize(
684 final int fontSize) {
685 this._fontSize = fontSize;
686 this._has_fontSize = true;
690 * Sets the value of field 'fontStyle'.
692 * @param fontStyle the value of field 'fontStyle'.
694 public void setFontStyle(
695 final int fontStyle) {
696 this._fontStyle = fontStyle;
697 this._has_fontStyle = true;
701 * Sets the value of field 'height'.
703 * @param height the value of field 'height'.
705 public void setHeight(
707 this._height = height;
708 this._has_height = true;
712 * Sets the value of field 'markUnlinked'.
714 * @param markUnlinked the value of field 'markUnlinked'.
716 public void setMarkUnlinked(
717 final boolean markUnlinked) {
718 this._markUnlinked = markUnlinked;
719 this._has_markUnlinked = true;
723 * Sets the value of field 'newick'.
725 * @param newick the value of field 'newick'.
727 public void setNewick(
728 final java.lang.String newick) {
729 this._newick = newick;
733 * Sets the value of field 'showBootstrap'.
735 * @param showBootstrap the value of field 'showBootstrap'.
737 public void setShowBootstrap(
738 final boolean showBootstrap) {
739 this._showBootstrap = showBootstrap;
740 this._has_showBootstrap = true;
744 * Sets the value of field 'showDistances'.
746 * @param showDistances the value of field 'showDistances'.
748 public void setShowDistances(
749 final boolean showDistances) {
750 this._showDistances = showDistances;
751 this._has_showDistances = true;
755 * Sets the value of field 'threshold'.
757 * @param threshold the value of field 'threshold'.
759 public void setThreshold(
760 final float threshold) {
761 this._threshold = threshold;
762 this._has_threshold = true;
766 * Sets the value of field 'title'.
768 * @param title the value of field 'title'.
770 public void setTitle(
771 final java.lang.String title) {
776 * Sets the value of field 'width'.
778 * @param width the value of field 'width'.
780 public void setWidth(
783 this._has_width = true;
787 * Sets the value of field 'xpos'.
789 * @param xpos the value of field 'xpos'.
794 this._has_xpos = true;
798 * Sets the value of field 'ypos'.
800 * @param ypos the value of field 'ypos'.
805 this._has_ypos = true;
812 * @throws org.exolab.castor.xml.MarshalException if object is
813 * null or if any SAXException is thrown during marshaling
814 * @throws org.exolab.castor.xml.ValidationException if this
815 * object is an invalid instance according to the schema
816 * @return the unmarshaled jalview.binding.Tree
818 public static jalview.binding.Tree unmarshal(
819 final java.io.Reader reader)
820 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
821 return (jalview.binding.Tree) Unmarshaller.unmarshal(jalview.binding.Tree.class, reader);
827 * @throws org.exolab.castor.xml.ValidationException if this
828 * object is an invalid instance according to the schema
830 public void validate(
832 throws org.exolab.castor.xml.ValidationException {
833 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
834 validator.validate(this);