2 * This file is part of the Vamsas Client version 0.2.
\r
3 * Copyright 2010 by Jim Procter, Iain Milne, Pierre Marguerite,
\r
4 * Andrew Waterhouse and Dominik Lindner.
\r
6 * Earlier versions have also been incorporated into Jalview version 2.4
\r
7 * since 2008, and TOPALi version 2 since 2007.
\r
9 * The Vamsas Client is free software: you can redistribute it and/or modify
\r
10 * it under the terms of the GNU Lesser General Public License as published by
\r
11 * the Free Software Foundation, either version 3 of the License, or
\r
12 * (at your option) any later version.
\r
14 * The Vamsas Client is distributed in the hope that it will be useful,
\r
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
17 * GNU Lesser General Public License for more details.
\r
19 * You should have received a copy of the GNU Lesser General Public License
\r
20 * along with the Vamsas Client. If not, see <http://www.gnu.org/licenses/>.
\r
22 package uk.ac.vamsas.objects.utils.trees;
\r
24 import uk.ac.vamsas.client.Vobject;
\r
25 import uk.ac.vamsas.client.VorbaId;
\r
27 public class SequenceNode extends BinaryNode {
\r
28 /** DOCUMENT ME!! */
\r
31 /** DOCUMENT ME!! */
\r
32 public boolean dummy = false;
\r
34 private boolean placeholder = false;
\r
37 * Creates a new SequenceNode object.
\r
39 public SequenceNode() {
\r
44 * Creates a new SequenceNode object.
\r
55 public SequenceNode(Vobject val, SequenceNode parent, float dist, String name) {
\r
56 super(val, parent, name);
\r
61 * Creates a new SequenceNode object.
\r
76 public SequenceNode(Vobject val, SequenceNode parent, String name,
\r
77 float dist, int bootstrap, boolean dummy) {
\r
78 super(val, parent, name);
\r
80 this.bootstrap = bootstrap;
\r
86 * true if node is created for the representation of polytomous trees
\r
88 public boolean isDummy() {
\r
93 * @param placeholder is true if the sequence referred to in the element node
\r
94 * is not actually present in the associated alignment
\r
96 public boolean isPlaceholder() {
\r
106 * @return DOCUMENT ME!
\r
108 public boolean setDummy(boolean newstate) {
\r
109 boolean oldstate = dummy;
\r
118 * @param Placeholder
\r
121 public void setPlaceholder(boolean Placeholder) {
\r
122 this.placeholder = Placeholder;
\r
126 * ascends the tree but doesn't stop until a non-dummy node is discovered.
\r
127 * This will probably break if the tree is a mixture of BinaryNodes and
\r
130 public SequenceNode AscendTree() {
\r
131 SequenceNode c = this;
\r
134 c = (SequenceNode) c.parent();
\r
135 } while ((c != null) && c.dummy);
\r