2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
3 * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, 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/>.
18 package jalview.schemabinding.version2;
20 //---------------------------------/
21 //- Imported classes and packages -/
22 //---------------------------------/
24 import org.exolab.castor.xml.Marshaller;
25 import org.exolab.castor.xml.Unmarshaller;
30 * @version $Revision$ $Date$
32 public class Tree implements java.io.Serializable
35 // --------------------------/
36 // - Class/Member Variables -/
37 // --------------------------/
42 private java.lang.String _fontName;
47 private int _fontSize;
50 * keeps track of state for field: _fontSize
52 private boolean _has_fontSize;
57 private int _fontStyle;
60 * keeps track of state for field: _fontStyle
62 private boolean _has_fontStyle;
67 private float _threshold;
70 * keeps track of state for field: _threshold
72 private boolean _has_threshold;
75 * Field _showBootstrap.
77 private boolean _showBootstrap;
80 * keeps track of state for field: _showBootstrap
82 private boolean _has_showBootstrap;
85 * Field _showDistances.
87 private boolean _showDistances;
90 * keeps track of state for field: _showDistances
92 private boolean _has_showDistances;
95 * Field _markUnlinked.
97 private boolean _markUnlinked;
100 * keeps track of state for field: _markUnlinked
102 private boolean _has_markUnlinked;
105 * Field _fitToWindow.
107 private boolean _fitToWindow;
110 * keeps track of state for field: _fitToWindow
112 private boolean _has_fitToWindow;
115 * Field _currentTree.
117 private boolean _currentTree;
120 * keeps track of state for field: _currentTree
122 private boolean _has_currentTree;
125 * Tree ID added for binding tree visualization settings to vamsas document
126 * trees in jalview 2.4.1
129 private java.lang.String _id;
137 * keeps track of state for field: _width
139 private boolean _has_width;
147 * keeps track of state for field: _height
149 private boolean _has_height;
157 * keeps track of state for field: _xpos
159 private boolean _has_xpos;
167 * keeps track of state for field: _ypos
169 private boolean _has_ypos;
174 private java.lang.String _title;
179 private java.lang.String _newick;
196 public void deleteCurrentTree()
198 this._has_currentTree = false;
203 public void deleteFitToWindow()
205 this._has_fitToWindow = false;
210 public void deleteFontSize()
212 this._has_fontSize = false;
217 public void deleteFontStyle()
219 this._has_fontStyle = false;
224 public void deleteHeight()
226 this._has_height = false;
231 public void deleteMarkUnlinked()
233 this._has_markUnlinked = false;
238 public void deleteShowBootstrap()
240 this._has_showBootstrap = false;
245 public void deleteShowDistances()
247 this._has_showDistances = false;
252 public void deleteThreshold()
254 this._has_threshold = false;
259 public void deleteWidth()
261 this._has_width = false;
266 public void deleteXpos()
268 this._has_xpos = false;
273 public void deleteYpos()
275 this._has_ypos = false;
279 * Returns the value of field 'currentTree'.
281 * @return the value of field 'CurrentTree'.
283 public boolean getCurrentTree()
285 return this._currentTree;
289 * Returns the value of field 'fitToWindow'.
291 * @return the value of field 'FitToWindow'.
293 public boolean getFitToWindow()
295 return this._fitToWindow;
299 * Returns the value of field 'fontName'.
301 * @return the value of field 'FontName'.
303 public java.lang.String getFontName()
305 return this._fontName;
309 * Returns the value of field 'fontSize'.
311 * @return the value of field 'FontSize'.
313 public int getFontSize()
315 return this._fontSize;
319 * Returns the value of field 'fontStyle'.
321 * @return the value of field 'FontStyle'.
323 public int getFontStyle()
325 return this._fontStyle;
329 * Returns the value of field 'height'.
331 * @return the value of field 'Height'.
333 public int getHeight()
339 * Returns the value of field 'id'. The field 'id' has the following
340 * description: Tree ID added for binding tree visualization settings to
341 * vamsas document trees in jalview 2.4.1
344 * @return the value of field 'Id'.
346 public java.lang.String getId()
352 * Returns the value of field 'markUnlinked'.
354 * @return the value of field 'MarkUnlinked'.
356 public boolean getMarkUnlinked()
358 return this._markUnlinked;
362 * Returns the value of field 'newick'.
364 * @return the value of field 'Newick'.
366 public java.lang.String getNewick()
372 * Returns the value of field 'showBootstrap'.
374 * @return the value of field 'ShowBootstrap'.
376 public boolean getShowBootstrap()
378 return this._showBootstrap;
382 * Returns the value of field 'showDistances'.
384 * @return the value of field 'ShowDistances'.
386 public boolean getShowDistances()
388 return this._showDistances;
392 * Returns the value of field 'threshold'.
394 * @return the value of field 'Threshold'.
396 public float getThreshold()
398 return this._threshold;
402 * Returns the value of field 'title'.
404 * @return the value of field 'Title'.
406 public java.lang.String getTitle()
412 * Returns the value of field 'width'.
414 * @return the value of field 'Width'.
416 public int getWidth()
422 * Returns the value of field 'xpos'.
424 * @return the value of field 'Xpos'.
432 * Returns the value of field 'ypos'.
434 * @return the value of field 'Ypos'.
442 * Method hasCurrentTree.
444 * @return true if at least one CurrentTree has been added
446 public boolean hasCurrentTree()
448 return this._has_currentTree;
452 * Method hasFitToWindow.
454 * @return true if at least one FitToWindow has been added
456 public boolean hasFitToWindow()
458 return this._has_fitToWindow;
462 * Method hasFontSize.
464 * @return true if at least one FontSize has been added
466 public boolean hasFontSize()
468 return this._has_fontSize;
472 * Method hasFontStyle.
474 * @return true if at least one FontStyle has been added
476 public boolean hasFontStyle()
478 return this._has_fontStyle;
484 * @return true if at least one Height has been added
486 public boolean hasHeight()
488 return this._has_height;
492 * Method hasMarkUnlinked.
494 * @return true if at least one MarkUnlinked has been added
496 public boolean hasMarkUnlinked()
498 return this._has_markUnlinked;
502 * Method hasShowBootstrap.
504 * @return true if at least one ShowBootstrap has been added
506 public boolean hasShowBootstrap()
508 return this._has_showBootstrap;
512 * Method hasShowDistances.
514 * @return true if at least one ShowDistances has been added
516 public boolean hasShowDistances()
518 return this._has_showDistances;
522 * Method hasThreshold.
524 * @return true if at least one Threshold has been added
526 public boolean hasThreshold()
528 return this._has_threshold;
534 * @return true if at least one Width has been added
536 public boolean hasWidth()
538 return this._has_width;
544 * @return true if at least one Xpos has been added
546 public boolean hasXpos()
548 return this._has_xpos;
554 * @return true if at least one Ypos has been added
556 public boolean hasYpos()
558 return this._has_ypos;
562 * Returns the value of field 'currentTree'.
564 * @return the value of field 'CurrentTree'.
566 public boolean isCurrentTree()
568 return this._currentTree;
572 * Returns the value of field 'fitToWindow'.
574 * @return the value of field 'FitToWindow'.
576 public boolean isFitToWindow()
578 return this._fitToWindow;
582 * Returns the value of field 'markUnlinked'.
584 * @return the value of field 'MarkUnlinked'.
586 public boolean isMarkUnlinked()
588 return this._markUnlinked;
592 * Returns the value of field 'showBootstrap'.
594 * @return the value of field 'ShowBootstrap'.
596 public boolean isShowBootstrap()
598 return this._showBootstrap;
602 * Returns the value of field 'showDistances'.
604 * @return the value of field 'ShowDistances'.
606 public boolean isShowDistances()
608 return this._showDistances;
614 * @return true if this object is valid according to the schema
616 public boolean isValid()
621 } catch (org.exolab.castor.xml.ValidationException vex)
632 * @throws org.exolab.castor.xml.MarshalException
633 * if object is null or if any SAXException is thrown during
635 * @throws org.exolab.castor.xml.ValidationException
636 * if this object is an invalid instance according to the schema
638 public void marshal(final java.io.Writer out)
639 throws org.exolab.castor.xml.MarshalException,
640 org.exolab.castor.xml.ValidationException
642 Marshaller.marshal(this, out);
649 * @throws java.io.IOException
650 * if an IOException occurs during marshaling
651 * @throws org.exolab.castor.xml.ValidationException
652 * if this object is an invalid instance according to the schema
653 * @throws org.exolab.castor.xml.MarshalException
654 * if object is null or if any SAXException is thrown during
657 public void marshal(final org.xml.sax.ContentHandler handler)
658 throws java.io.IOException,
659 org.exolab.castor.xml.MarshalException,
660 org.exolab.castor.xml.ValidationException
662 Marshaller.marshal(this, handler);
666 * Sets the value of field 'currentTree'.
669 * the value of field 'currentTree'.
671 public void setCurrentTree(final boolean currentTree)
673 this._currentTree = currentTree;
674 this._has_currentTree = true;
678 * Sets the value of field 'fitToWindow'.
681 * the value of field 'fitToWindow'.
683 public void setFitToWindow(final boolean fitToWindow)
685 this._fitToWindow = fitToWindow;
686 this._has_fitToWindow = true;
690 * Sets the value of field 'fontName'.
693 * the value of field 'fontName'.
695 public void setFontName(final java.lang.String fontName)
697 this._fontName = fontName;
701 * Sets the value of field 'fontSize'.
704 * the value of field 'fontSize'.
706 public void setFontSize(final int fontSize)
708 this._fontSize = fontSize;
709 this._has_fontSize = true;
713 * Sets the value of field 'fontStyle'.
716 * the value of field 'fontStyle'.
718 public void setFontStyle(final int fontStyle)
720 this._fontStyle = fontStyle;
721 this._has_fontStyle = true;
725 * Sets the value of field 'height'.
728 * the value of field 'height'.
730 public void setHeight(final int height)
732 this._height = height;
733 this._has_height = true;
737 * Sets the value of field 'id'. The field 'id' has the following description:
738 * Tree ID added for binding tree visualization settings to vamsas document
739 * trees in jalview 2.4.1
743 * the value of field 'id'.
745 public void setId(final java.lang.String id)
751 * Sets the value of field 'markUnlinked'.
753 * @param markUnlinked
754 * the value of field 'markUnlinked'.
756 public void setMarkUnlinked(final boolean markUnlinked)
758 this._markUnlinked = markUnlinked;
759 this._has_markUnlinked = true;
763 * Sets the value of field 'newick'.
766 * the value of field 'newick'.
768 public void setNewick(final java.lang.String newick)
770 this._newick = newick;
774 * Sets the value of field 'showBootstrap'.
776 * @param showBootstrap
777 * the value of field 'showBootstrap'.
779 public void setShowBootstrap(final boolean showBootstrap)
781 this._showBootstrap = showBootstrap;
782 this._has_showBootstrap = true;
786 * Sets the value of field 'showDistances'.
788 * @param showDistances
789 * the value of field 'showDistances'.
791 public void setShowDistances(final boolean showDistances)
793 this._showDistances = showDistances;
794 this._has_showDistances = true;
798 * Sets the value of field 'threshold'.
801 * the value of field 'threshold'.
803 public void setThreshold(final float threshold)
805 this._threshold = threshold;
806 this._has_threshold = true;
810 * Sets the value of field 'title'.
813 * the value of field 'title'.
815 public void setTitle(final java.lang.String title)
821 * Sets the value of field 'width'.
824 * the value of field 'width'.
826 public void setWidth(final int width)
829 this._has_width = true;
833 * Sets the value of field 'xpos'.
836 * the value of field 'xpos'.
838 public void setXpos(final int xpos)
841 this._has_xpos = true;
845 * Sets the value of field 'ypos'.
848 * the value of field 'ypos'.
850 public void setYpos(final int ypos)
853 this._has_ypos = true;
860 * @throws org.exolab.castor.xml.MarshalException
861 * if object is null or if any SAXException is thrown during
863 * @throws org.exolab.castor.xml.ValidationException
864 * if this object is an invalid instance according to the schema
865 * @return the unmarshaled jalview.schemabinding.version2.Tree
867 public static jalview.schemabinding.version2.Tree unmarshal(
868 final java.io.Reader reader)
869 throws org.exolab.castor.xml.MarshalException,
870 org.exolab.castor.xml.ValidationException
872 return (jalview.schemabinding.version2.Tree) Unmarshaller.unmarshal(
873 jalview.schemabinding.version2.Tree.class, reader);
879 * @throws org.exolab.castor.xml.ValidationException
880 * if this object is an invalid instance according to the schema
882 public void validate() throws org.exolab.castor.xml.ValidationException
884 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
885 validator.validate(this);