2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
\r
3 * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
5 * This program is free software; you can redistribute it and/or
\r
6 * modify it under the terms of the GNU General Public License
\r
7 * as published by the Free Software Foundation; either version 2
\r
8 * of the License, or (at your option) any later version.
\r
10 * This program is distributed in the hope that it will be useful,
\r
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 * GNU General Public License for more details.
\r
15 * You should have received a copy of the GNU General Public License
\r
16 * along with this program; if not, write to the Free Software
\r
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
\r
19 package jalview.schemabinding.version2;
\r
21 // ---------------------------------/
\r
22 // - Imported classes and packages -/
\r
23 // ---------------------------------/
\r
25 import org.exolab.castor.xml.Marshaller;
\r
26 import org.exolab.castor.xml.Unmarshaller;
\r
31 * @version $Revision$ $Date$
\r
33 public class Tree implements java.io.Serializable
\r
36 // --------------------------/
\r
37 // - Class/Member Variables -/
\r
38 // --------------------------/
\r
46 * keeps track of state for field: _width
\r
48 private boolean _has_width;
\r
53 private int _height;
\r
56 * keeps track of state for field: _height
\r
58 private boolean _has_height;
\r
66 * keeps track of state for field: _xpos
\r
68 private boolean _has_xpos;
\r
76 * keeps track of state for field: _ypos
\r
78 private boolean _has_ypos;
\r
83 private java.lang.String _fontName;
\r
88 private int _fontSize;
\r
91 * keeps track of state for field: _fontSize
\r
93 private boolean _has_fontSize;
\r
98 private int _fontStyle;
\r
101 * keeps track of state for field: _fontStyle
\r
103 private boolean _has_fontStyle;
\r
106 * Field _threshold.
\r
108 private float _threshold;
\r
111 * keeps track of state for field: _threshold
\r
113 private boolean _has_threshold;
\r
116 * Field _showBootstrap.
\r
118 private boolean _showBootstrap;
\r
121 * keeps track of state for field: _showBootstrap
\r
123 private boolean _has_showBootstrap;
\r
126 * Field _showDistances.
\r
128 private boolean _showDistances;
\r
131 * keeps track of state for field: _showDistances
\r
133 private boolean _has_showDistances;
\r
136 * Field _markUnlinked.
\r
138 private boolean _markUnlinked;
\r
141 * keeps track of state for field: _markUnlinked
\r
143 private boolean _has_markUnlinked;
\r
146 * Field _fitToWindow.
\r
148 private boolean _fitToWindow;
\r
151 * keeps track of state for field: _fitToWindow
\r
153 private boolean _has_fitToWindow;
\r
156 * Field _currentTree.
\r
158 private boolean _currentTree;
\r
161 * keeps track of state for field: _currentTree
\r
163 private boolean _has_currentTree;
\r
168 private java.lang.String _title;
\r
173 private java.lang.String _newick;
\r
175 // ----------------/
\r
176 // - Constructors -/
\r
177 // ----------------/
\r
190 public void deleteCurrentTree()
\r
192 this._has_currentTree = false;
\r
197 public void deleteFitToWindow()
\r
199 this._has_fitToWindow = false;
\r
204 public void deleteFontSize()
\r
206 this._has_fontSize = false;
\r
211 public void deleteFontStyle()
\r
213 this._has_fontStyle = false;
\r
218 public void deleteHeight()
\r
220 this._has_height = false;
\r
225 public void deleteMarkUnlinked()
\r
227 this._has_markUnlinked = false;
\r
232 public void deleteShowBootstrap()
\r
234 this._has_showBootstrap = false;
\r
239 public void deleteShowDistances()
\r
241 this._has_showDistances = false;
\r
246 public void deleteThreshold()
\r
248 this._has_threshold = false;
\r
253 public void deleteWidth()
\r
255 this._has_width = false;
\r
260 public void deleteXpos()
\r
262 this._has_xpos = false;
\r
267 public void deleteYpos()
\r
269 this._has_ypos = false;
\r
273 * Returns the value of field 'currentTree'.
\r
275 * @return the value of field 'CurrentTree'.
\r
277 public boolean getCurrentTree()
\r
279 return this._currentTree;
\r
283 * Returns the value of field 'fitToWindow'.
\r
285 * @return the value of field 'FitToWindow'.
\r
287 public boolean getFitToWindow()
\r
289 return this._fitToWindow;
\r
293 * Returns the value of field 'fontName'.
\r
295 * @return the value of field 'FontName'.
\r
297 public java.lang.String getFontName()
\r
299 return this._fontName;
\r
303 * Returns the value of field 'fontSize'.
\r
305 * @return the value of field 'FontSize'.
\r
307 public int getFontSize()
\r
309 return this._fontSize;
\r
313 * Returns the value of field 'fontStyle'.
\r
315 * @return the value of field 'FontStyle'.
\r
317 public int getFontStyle()
\r
319 return this._fontStyle;
\r
323 * Returns the value of field 'height'.
\r
325 * @return the value of field 'Height'.
\r
327 public int getHeight()
\r
329 return this._height;
\r
333 * Returns the value of field 'markUnlinked'.
\r
335 * @return the value of field 'MarkUnlinked'.
\r
337 public boolean getMarkUnlinked()
\r
339 return this._markUnlinked;
\r
343 * Returns the value of field 'newick'.
\r
345 * @return the value of field 'Newick'.
\r
347 public java.lang.String getNewick()
\r
349 return this._newick;
\r
353 * Returns the value of field 'showBootstrap'.
\r
355 * @return the value of field 'ShowBootstrap'.
\r
357 public boolean getShowBootstrap()
\r
359 return this._showBootstrap;
\r
363 * Returns the value of field 'showDistances'.
\r
365 * @return the value of field 'ShowDistances'.
\r
367 public boolean getShowDistances()
\r
369 return this._showDistances;
\r
373 * Returns the value of field 'threshold'.
\r
375 * @return the value of field 'Threshold'.
\r
377 public float getThreshold()
\r
379 return this._threshold;
\r
383 * Returns the value of field 'title'.
\r
385 * @return the value of field 'Title'.
\r
387 public java.lang.String getTitle()
\r
389 return this._title;
\r
393 * Returns the value of field 'width'.
\r
395 * @return the value of field 'Width'.
\r
397 public int getWidth()
\r
399 return this._width;
\r
403 * Returns the value of field 'xpos'.
\r
405 * @return the value of field 'Xpos'.
\r
407 public int getXpos()
\r
413 * Returns the value of field 'ypos'.
\r
415 * @return the value of field 'Ypos'.
\r
417 public int getYpos()
\r
423 * Method hasCurrentTree.
\r
425 * @return true if at least one CurrentTree has been added
\r
427 public boolean hasCurrentTree()
\r
429 return this._has_currentTree;
\r
433 * Method hasFitToWindow.
\r
435 * @return true if at least one FitToWindow has been added
\r
437 public boolean hasFitToWindow()
\r
439 return this._has_fitToWindow;
\r
443 * Method hasFontSize.
\r
445 * @return true if at least one FontSize has been added
\r
447 public boolean hasFontSize()
\r
449 return this._has_fontSize;
\r
453 * Method hasFontStyle.
\r
455 * @return true if at least one FontStyle has been added
\r
457 public boolean hasFontStyle()
\r
459 return this._has_fontStyle;
\r
463 * Method hasHeight.
\r
465 * @return true if at least one Height has been added
\r
467 public boolean hasHeight()
\r
469 return this._has_height;
\r
473 * Method hasMarkUnlinked.
\r
475 * @return true if at least one MarkUnlinked has been added
\r
477 public boolean hasMarkUnlinked()
\r
479 return this._has_markUnlinked;
\r
483 * Method hasShowBootstrap.
\r
485 * @return true if at least one ShowBootstrap has been added
\r
487 public boolean hasShowBootstrap()
\r
489 return this._has_showBootstrap;
\r
493 * Method hasShowDistances.
\r
495 * @return true if at least one ShowDistances has been added
\r
497 public boolean hasShowDistances()
\r
499 return this._has_showDistances;
\r
503 * Method hasThreshold.
\r
505 * @return true if at least one Threshold has been added
\r
507 public boolean hasThreshold()
\r
509 return this._has_threshold;
\r
515 * @return true if at least one Width has been added
\r
517 public boolean hasWidth()
\r
519 return this._has_width;
\r
525 * @return true if at least one Xpos has been added
\r
527 public boolean hasXpos()
\r
529 return this._has_xpos;
\r
535 * @return true if at least one Ypos has been added
\r
537 public boolean hasYpos()
\r
539 return this._has_ypos;
\r
543 * Returns the value of field 'currentTree'.
\r
545 * @return the value of field 'CurrentTree'.
\r
547 public boolean isCurrentTree()
\r
549 return this._currentTree;
\r
553 * Returns the value of field 'fitToWindow'.
\r
555 * @return the value of field 'FitToWindow'.
\r
557 public boolean isFitToWindow()
\r
559 return this._fitToWindow;
\r
563 * Returns the value of field 'markUnlinked'.
\r
565 * @return the value of field 'MarkUnlinked'.
\r
567 public boolean isMarkUnlinked()
\r
569 return this._markUnlinked;
\r
573 * Returns the value of field 'showBootstrap'.
\r
575 * @return the value of field 'ShowBootstrap'.
\r
577 public boolean isShowBootstrap()
\r
579 return this._showBootstrap;
\r
583 * Returns the value of field 'showDistances'.
\r
585 * @return the value of field 'ShowDistances'.
\r
587 public boolean isShowDistances()
\r
589 return this._showDistances;
\r
595 * @return true if this object is valid according to the schema
\r
597 public boolean isValid()
\r
602 } catch (org.exolab.castor.xml.ValidationException vex)
\r
613 * @throws org.exolab.castor.xml.MarshalException
\r
614 * if object is null or if any SAXException is thrown during
\r
616 * @throws org.exolab.castor.xml.ValidationException
\r
617 * if this object is an invalid instance according to the
\r
620 public void marshal(final java.io.Writer out)
\r
621 throws org.exolab.castor.xml.MarshalException,
\r
622 org.exolab.castor.xml.ValidationException
\r
624 Marshaller.marshal(this, out);
\r
631 * @throws java.io.IOException
\r
632 * if an IOException occurs during marshaling
\r
633 * @throws org.exolab.castor.xml.ValidationException
\r
634 * if this object is an invalid instance according to the
\r
636 * @throws org.exolab.castor.xml.MarshalException
\r
637 * if object is null or if any SAXException is thrown during
\r
640 public void marshal(final org.xml.sax.ContentHandler handler)
\r
641 throws java.io.IOException,
\r
642 org.exolab.castor.xml.MarshalException,
\r
643 org.exolab.castor.xml.ValidationException
\r
645 Marshaller.marshal(this, handler);
\r
649 * Sets the value of field 'currentTree'.
\r
651 * @param currentTree
\r
652 * the value of field 'currentTree'.
\r
654 public void setCurrentTree(final boolean currentTree)
\r
656 this._currentTree = currentTree;
\r
657 this._has_currentTree = true;
\r
661 * Sets the value of field 'fitToWindow'.
\r
663 * @param fitToWindow
\r
664 * the value of field 'fitToWindow'.
\r
666 public void setFitToWindow(final boolean fitToWindow)
\r
668 this._fitToWindow = fitToWindow;
\r
669 this._has_fitToWindow = true;
\r
673 * Sets the value of field 'fontName'.
\r
676 * the value of field 'fontName'.
\r
678 public void setFontName(final java.lang.String fontName)
\r
680 this._fontName = fontName;
\r
684 * Sets the value of field 'fontSize'.
\r
687 * the value of field 'fontSize'.
\r
689 public void setFontSize(final int fontSize)
\r
691 this._fontSize = fontSize;
\r
692 this._has_fontSize = true;
\r
696 * Sets the value of field 'fontStyle'.
\r
699 * the value of field 'fontStyle'.
\r
701 public void setFontStyle(final int fontStyle)
\r
703 this._fontStyle = fontStyle;
\r
704 this._has_fontStyle = true;
\r
708 * Sets the value of field 'height'.
\r
711 * the value of field 'height'.
\r
713 public void setHeight(final int height)
\r
715 this._height = height;
\r
716 this._has_height = true;
\r
720 * Sets the value of field 'markUnlinked'.
\r
722 * @param markUnlinked
\r
723 * the value of field 'markUnlinked'.
\r
725 public void setMarkUnlinked(final boolean markUnlinked)
\r
727 this._markUnlinked = markUnlinked;
\r
728 this._has_markUnlinked = true;
\r
732 * Sets the value of field 'newick'.
\r
735 * the value of field 'newick'.
\r
737 public void setNewick(final java.lang.String newick)
\r
739 this._newick = newick;
\r
743 * Sets the value of field 'showBootstrap'.
\r
745 * @param showBootstrap
\r
746 * the value of field 'showBootstrap'.
\r
748 public void setShowBootstrap(final boolean showBootstrap)
\r
750 this._showBootstrap = showBootstrap;
\r
751 this._has_showBootstrap = true;
\r
755 * Sets the value of field 'showDistances'.
\r
757 * @param showDistances
\r
758 * the value of field 'showDistances'.
\r
760 public void setShowDistances(final boolean showDistances)
\r
762 this._showDistances = showDistances;
\r
763 this._has_showDistances = true;
\r
767 * Sets the value of field 'threshold'.
\r
770 * the value of field 'threshold'.
\r
772 public void setThreshold(final float threshold)
\r
774 this._threshold = threshold;
\r
775 this._has_threshold = true;
\r
779 * Sets the value of field 'title'.
\r
782 * the value of field 'title'.
\r
784 public void setTitle(final java.lang.String title)
\r
786 this._title = title;
\r
790 * Sets the value of field 'width'.
\r
793 * the value of field 'width'.
\r
795 public void setWidth(final int width)
\r
797 this._width = width;
\r
798 this._has_width = true;
\r
802 * Sets the value of field 'xpos'.
\r
805 * the value of field 'xpos'.
\r
807 public void setXpos(final int xpos)
\r
810 this._has_xpos = true;
\r
814 * Sets the value of field 'ypos'.
\r
817 * the value of field 'ypos'.
\r
819 public void setYpos(final int ypos)
\r
822 this._has_ypos = true;
\r
826 * Method unmarshal.
\r
829 * @throws org.exolab.castor.xml.MarshalException
\r
830 * if object is null or if any SAXException is thrown during
\r
832 * @throws org.exolab.castor.xml.ValidationException
\r
833 * if this object is an invalid instance according to the
\r
835 * @return the unmarshaled jalview.schemabinding.version2.Tree
\r
837 public static jalview.schemabinding.version2.Tree unmarshal(
\r
838 final java.io.Reader reader)
\r
839 throws org.exolab.castor.xml.MarshalException,
\r
840 org.exolab.castor.xml.ValidationException
\r
842 return (jalview.schemabinding.version2.Tree) Unmarshaller.unmarshal(
\r
843 jalview.schemabinding.version2.Tree.class, reader);
\r
849 * @throws org.exolab.castor.xml.ValidationException
\r
850 * if this object is an invalid instance according to the
\r
853 public void validate() throws org.exolab.castor.xml.ValidationException
\r
855 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
856 validator.validate(this);
\r