package jalview.ext.archaeopteryx;
-import jalview.ext.treeviewer.ExternalTree;
-import jalview.ext.treeviewer.ExternalTreeNode;
+import jalview.ext.treeviewer.ExternalTreeI;
+import jalview.ext.treeviewer.ExternalTreeNodeI;
import org.forester.phylogeny.Phylogeny;
-public class Tree implements ExternalTree
+public class Tree implements ExternalTreeI
{
private final Phylogeny tree;
public Phylogeny getOriginalTree()
{
return tree;
+
}
@Override
- public ExternalTreeNode getRoot()
+ public ExternalTreeNodeI getRoot()
{
- ExternalTreeNode root = new TreeNode(tree.getRoot());
+ ExternalTreeNodeI root = new TreeNode(tree.getRoot());
return root;
}
tree.setName(name);
}
+
+ @Override
+ public ExternalTreeNodeI getNodeWithName(String name)
+ {
+ return new TreeNode(tree.getNode(name));
+
+ }
+
+ @Override
+ public String[] getAllLeafNames()
+ {
+ return tree.getAllExternalNodeNames();
+ }
}
package jalview.ext.archaeopteryx;
-import jalview.ext.treeviewer.ExternalTreeNode;
+import jalview.ext.treeviewer.ExternalTreeNodeI;
import java.util.List;
import org.forester.phylogeny.PhylogenyNode;
-public class TreeNode implements ExternalTreeNode
+public class TreeNode implements ExternalTreeNodeI
{
private final PhylogenyNode node;
}
@Override
+ public PhylogenyNode getOriginalNode()
+ {
+ return node;
+ }
+
+ @Override
public String getNodeName()
{
return node.getName();
}
@Override
- public List<ExternalTreeNode> getChildren()
+ public List<ExternalTreeNodeI> getChildren()
{
// return node.getDescendants();
return null;
}
+
}
+++ /dev/null
-package jalview.ext.treeviewer;
-
-public interface ExternalTree
-{
- public void setTreeName(String name);
-
- public <T> T getOriginalTree();
-
- public ExternalTreeNode getRoot();
-
-}
--- /dev/null
+package jalview.ext.treeviewer;
+
+public interface ExternalTreeI
+{
+ public void setTreeName(String name);
+
+ public <T> T getOriginalTree();
+
+ public ExternalTreeNodeI getRoot();
+
+ public ExternalTreeNodeI getNodeWithName(String name);
+
+ public String[] getAllLeafNames();
+
+}
+++ /dev/null
-package jalview.ext.treeviewer;
-
-import java.util.List;
-
-public interface ExternalTreeNode
-{
- public String getNodeName();
-
- public List<ExternalTreeNode> getChildren();
-}
--- /dev/null
+package jalview.ext.treeviewer;
+
+import java.util.List;
+
+public interface ExternalTreeNodeI
+{
+ public <N> N getOriginalNode();
+
+ public String getNodeName();
+
+ public List<ExternalTreeNodeI> getChildren();
+}
package jalview.ext.treeviewer;
-public interface ExternalTreePanel
+public interface ExternalTreePanelI
{
}