2 * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
\r
3 * Copyright (C) 2009 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
166 * Tree ID added for binding tree visualization settings to
\r
167 * vamsas document trees in jalview 2.4.1
\r
169 private java.lang.String _id;
\r
174 private java.lang.String _title;
\r
179 private java.lang.String _newick;
\r
182 //----------------/
\r
183 //- Constructors -/
\r
184 //----------------/
\r
197 public void deleteCurrentTree(
\r
199 this._has_currentTree= false;
\r
204 public void deleteFitToWindow(
\r
206 this._has_fitToWindow= false;
\r
211 public void deleteFontSize(
\r
213 this._has_fontSize= false;
\r
218 public void deleteFontStyle(
\r
220 this._has_fontStyle= false;
\r
225 public void deleteHeight(
\r
227 this._has_height= false;
\r
232 public void deleteMarkUnlinked(
\r
234 this._has_markUnlinked= false;
\r
239 public void deleteShowBootstrap(
\r
241 this._has_showBootstrap= false;
\r
246 public void deleteShowDistances(
\r
248 this._has_showDistances= false;
\r
253 public void deleteThreshold(
\r
255 this._has_threshold= false;
\r
260 public void deleteWidth(
\r
262 this._has_width= false;
\r
267 public void deleteXpos(
\r
269 this._has_xpos= false;
\r
274 public void deleteYpos(
\r
276 this._has_ypos= false;
\r
280 * Returns the value of field 'currentTree'.
\r
282 * @return the value of field 'CurrentTree'.
\r
284 public boolean getCurrentTree(
\r
286 return this._currentTree;
\r
290 * Returns the value of field 'fitToWindow'.
\r
292 * @return the value of field 'FitToWindow'.
\r
294 public boolean getFitToWindow(
\r
296 return this._fitToWindow;
\r
300 * Returns the value of field 'fontName'.
\r
302 * @return the value of field 'FontName'.
\r
304 public java.lang.String getFontName(
\r
306 return this._fontName;
\r
310 * Returns the value of field 'fontSize'.
\r
312 * @return the value of field 'FontSize'.
\r
314 public int getFontSize(
\r
316 return this._fontSize;
\r
320 * Returns the value of field 'fontStyle'.
\r
322 * @return the value of field 'FontStyle'.
\r
324 public int getFontStyle(
\r
326 return this._fontStyle;
\r
330 * Returns the value of field 'height'.
\r
332 * @return the value of field 'Height'.
\r
334 public int getHeight(
\r
336 return this._height;
\r
340 * Returns the value of field 'id'. The field 'id' has the
\r
341 * following description: Tree ID added for binding tree
\r
342 * visualization settings to vamsas document trees in jalview
\r
345 * @return the value of field 'Id'.
\r
347 public java.lang.String getId(
\r
353 * Returns the value of field 'markUnlinked'.
\r
355 * @return the value of field 'MarkUnlinked'.
\r
357 public boolean getMarkUnlinked(
\r
359 return this._markUnlinked;
\r
363 * Returns the value of field 'newick'.
\r
365 * @return the value of field 'Newick'.
\r
367 public java.lang.String getNewick(
\r
369 return this._newick;
\r
373 * Returns the value of field 'showBootstrap'.
\r
375 * @return the value of field 'ShowBootstrap'.
\r
377 public boolean getShowBootstrap(
\r
379 return this._showBootstrap;
\r
383 * Returns the value of field 'showDistances'.
\r
385 * @return the value of field 'ShowDistances'.
\r
387 public boolean getShowDistances(
\r
389 return this._showDistances;
\r
393 * Returns the value of field 'threshold'.
\r
395 * @return the value of field 'Threshold'.
\r
397 public float getThreshold(
\r
399 return this._threshold;
\r
403 * Returns the value of field 'title'.
\r
405 * @return the value of field 'Title'.
\r
407 public java.lang.String getTitle(
\r
409 return this._title;
\r
413 * Returns the value of field 'width'.
\r
415 * @return the value of field 'Width'.
\r
417 public int getWidth(
\r
419 return this._width;
\r
423 * Returns the value of field 'xpos'.
\r
425 * @return the value of field 'Xpos'.
\r
427 public int getXpos(
\r
433 * Returns the value of field 'ypos'.
\r
435 * @return the value of field 'Ypos'.
\r
437 public int getYpos(
\r
443 * Method hasCurrentTree.
\r
445 * @return true if at least one CurrentTree has been added
\r
447 public boolean hasCurrentTree(
\r
449 return this._has_currentTree;
\r
453 * Method hasFitToWindow.
\r
455 * @return true if at least one FitToWindow has been added
\r
457 public boolean hasFitToWindow(
\r
459 return this._has_fitToWindow;
\r
463 * Method hasFontSize.
\r
465 * @return true if at least one FontSize has been added
\r
467 public boolean hasFontSize(
\r
469 return this._has_fontSize;
\r
473 * Method hasFontStyle.
\r
475 * @return true if at least one FontStyle has been added
\r
477 public boolean hasFontStyle(
\r
479 return this._has_fontStyle;
\r
483 * Method hasHeight.
\r
485 * @return true if at least one Height has been added
\r
487 public boolean hasHeight(
\r
489 return this._has_height;
\r
493 * Method hasMarkUnlinked.
\r
495 * @return true if at least one MarkUnlinked has been added
\r
497 public boolean hasMarkUnlinked(
\r
499 return this._has_markUnlinked;
\r
503 * Method hasShowBootstrap.
\r
505 * @return true if at least one ShowBootstrap has been added
\r
507 public boolean hasShowBootstrap(
\r
509 return this._has_showBootstrap;
\r
513 * Method hasShowDistances.
\r
515 * @return true if at least one ShowDistances has been added
\r
517 public boolean hasShowDistances(
\r
519 return this._has_showDistances;
\r
523 * Method hasThreshold.
\r
525 * @return true if at least one Threshold has been added
\r
527 public boolean hasThreshold(
\r
529 return this._has_threshold;
\r
535 * @return true if at least one Width has been added
\r
537 public boolean hasWidth(
\r
539 return this._has_width;
\r
545 * @return true if at least one Xpos has been added
\r
547 public boolean hasXpos(
\r
549 return this._has_xpos;
\r
555 * @return true if at least one Ypos has been added
\r
557 public boolean hasYpos(
\r
559 return this._has_ypos;
\r
563 * Returns the value of field 'currentTree'.
\r
565 * @return the value of field 'CurrentTree'.
\r
567 public boolean isCurrentTree(
\r
569 return this._currentTree;
\r
573 * Returns the value of field 'fitToWindow'.
\r
575 * @return the value of field 'FitToWindow'.
\r
577 public boolean isFitToWindow(
\r
579 return this._fitToWindow;
\r
583 * Returns the value of field 'markUnlinked'.
\r
585 * @return the value of field 'MarkUnlinked'.
\r
587 public boolean isMarkUnlinked(
\r
589 return this._markUnlinked;
\r
593 * Returns the value of field 'showBootstrap'.
\r
595 * @return the value of field 'ShowBootstrap'.
\r
597 public boolean isShowBootstrap(
\r
599 return this._showBootstrap;
\r
603 * Returns the value of field 'showDistances'.
\r
605 * @return the value of field 'ShowDistances'.
\r
607 public boolean isShowDistances(
\r
609 return this._showDistances;
\r
615 * @return true if this object is valid according to the schema
\r
617 public boolean isValid(
\r
621 } catch (org.exolab.castor.xml.ValidationException vex) {
\r
631 * @throws org.exolab.castor.xml.MarshalException if object is
\r
632 * null or if any SAXException is thrown during marshaling
\r
633 * @throws org.exolab.castor.xml.ValidationException if this
\r
634 * object is an invalid instance according to the schema
\r
636 public void marshal(
\r
637 final java.io.Writer out)
\r
638 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
639 Marshaller.marshal(this, out);
\r
646 * @throws java.io.IOException if an IOException occurs during
\r
648 * @throws org.exolab.castor.xml.ValidationException if this
\r
649 * object is an invalid instance according to the schema
\r
650 * @throws org.exolab.castor.xml.MarshalException if object is
\r
651 * null or if any SAXException is thrown during marshaling
\r
653 public void marshal(
\r
654 final org.xml.sax.ContentHandler handler)
\r
655 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
656 Marshaller.marshal(this, handler);
\r
660 * Sets the value of field 'currentTree'.
\r
662 * @param currentTree the value of field 'currentTree'.
\r
664 public void setCurrentTree(
\r
665 final boolean currentTree) {
\r
666 this._currentTree = currentTree;
\r
667 this._has_currentTree = true;
\r
671 * Sets the value of field 'fitToWindow'.
\r
673 * @param fitToWindow the value of field 'fitToWindow'.
\r
675 public void setFitToWindow(
\r
676 final boolean fitToWindow) {
\r
677 this._fitToWindow = fitToWindow;
\r
678 this._has_fitToWindow = true;
\r
682 * Sets the value of field 'fontName'.
\r
684 * @param fontName the value of field 'fontName'.
\r
686 public void setFontName(
\r
687 final java.lang.String fontName) {
\r
688 this._fontName = fontName;
\r
692 * Sets the value of field 'fontSize'.
\r
694 * @param fontSize the value of field 'fontSize'.
\r
696 public void setFontSize(
\r
697 final int fontSize) {
\r
698 this._fontSize = fontSize;
\r
699 this._has_fontSize = true;
\r
703 * Sets the value of field 'fontStyle'.
\r
705 * @param fontStyle the value of field 'fontStyle'.
\r
707 public void setFontStyle(
\r
708 final int fontStyle) {
\r
709 this._fontStyle = fontStyle;
\r
710 this._has_fontStyle = true;
\r
714 * Sets the value of field 'height'.
\r
716 * @param height the value of field 'height'.
\r
718 public void setHeight(
\r
719 final int height) {
\r
720 this._height = height;
\r
721 this._has_height = true;
\r
725 * Sets the value of field 'id'. The field 'id' has the
\r
726 * following description: Tree ID added for binding tree
\r
727 * visualization settings to vamsas document trees in jalview
\r
730 * @param id the value of field 'id'.
\r
733 final java.lang.String id) {
\r
738 * Sets the value of field 'markUnlinked'.
\r
740 * @param markUnlinked the value of field 'markUnlinked'.
\r
742 public void setMarkUnlinked(
\r
743 final boolean markUnlinked) {
\r
744 this._markUnlinked = markUnlinked;
\r
745 this._has_markUnlinked = true;
\r
749 * Sets the value of field 'newick'.
\r
751 * @param newick the value of field 'newick'.
\r
753 public void setNewick(
\r
754 final java.lang.String newick) {
\r
755 this._newick = newick;
\r
759 * Sets the value of field 'showBootstrap'.
\r
761 * @param showBootstrap the value of field 'showBootstrap'.
\r
763 public void setShowBootstrap(
\r
764 final boolean showBootstrap) {
\r
765 this._showBootstrap = showBootstrap;
\r
766 this._has_showBootstrap = true;
\r
770 * Sets the value of field 'showDistances'.
\r
772 * @param showDistances the value of field 'showDistances'.
\r
774 public void setShowDistances(
\r
775 final boolean showDistances) {
\r
776 this._showDistances = showDistances;
\r
777 this._has_showDistances = true;
\r
781 * Sets the value of field 'threshold'.
\r
783 * @param threshold the value of field 'threshold'.
\r
785 public void setThreshold(
\r
786 final float threshold) {
\r
787 this._threshold = threshold;
\r
788 this._has_threshold = true;
\r
792 * Sets the value of field 'title'.
\r
794 * @param title the value of field 'title'.
\r
796 public void setTitle(
\r
797 final java.lang.String title) {
\r
798 this._title = title;
\r
802 * Sets the value of field 'width'.
\r
804 * @param width the value of field 'width'.
\r
806 public void setWidth(
\r
808 this._width = width;
\r
809 this._has_width = true;
\r
813 * Sets the value of field 'xpos'.
\r
815 * @param xpos the value of field 'xpos'.
\r
817 public void setXpos(
\r
820 this._has_xpos = true;
\r
824 * Sets the value of field 'ypos'.
\r
826 * @param ypos the value of field 'ypos'.
\r
828 public void setYpos(
\r
831 this._has_ypos = true;
\r
835 * Method unmarshal.
\r
838 * @throws org.exolab.castor.xml.MarshalException if object is
\r
839 * null or if any SAXException is thrown during marshaling
\r
840 * @throws org.exolab.castor.xml.ValidationException if this
\r
841 * object is an invalid instance according to the schema
\r
842 * @return the unmarshaled jalview.schemabinding.version2.Tree
\r
844 public static jalview.schemabinding.version2.Tree unmarshal(
\r
845 final java.io.Reader reader)
\r
846 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
\r
847 return (jalview.schemabinding.version2.Tree) Unmarshaller.unmarshal(jalview.schemabinding.version2.Tree.class, reader);
\r
853 * @throws org.exolab.castor.xml.ValidationException if this
\r
854 * object is an invalid instance according to the schema
\r
856 public void validate(
\r
858 throws org.exolab.castor.xml.ValidationException {
\r
859 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
\r
860 validator.validate(this);
\r