* @author kjvanderheide
*
*/
-public class ArchaeopteryxTreeConverter
+public class ArchaeopteryxTreeBuilder
+ implements ExternalTreeBuilderI<Phylogeny, PhylogenyNode>
{
protected final SequenceI[] sequences;
private final Map<PhylogenyNode, SequenceI> nodesBoundAlignment;
- public ArchaeopteryxTreeConverter(final TreeBuilder calculatedTree)
+ public ArchaeopteryxTreeBuilder(final TreeBuilder calculatedTree)
{
jalviewTree = calculatedTree;
sequences = jalviewTree.getSequences();
}
- public Phylogeny buildAptxTree(final PhylogenyNode treeRoot)
+ @Override
+ public Phylogeny buildTree(final PhylogenyNode treeRoot)
{
if (treeRoot != null)
rootNode = treeRoot;
}
- buildAptxTree();
+ buildTree();
return aptxTree;
}
- public Phylogeny buildAptxTree()
+ @Override
+ public Phylogeny buildTree()
{
for (SequenceI sequence : sequences)
}
+ @Override
public Map<SequenceI, PhylogenyNode> getAlignmentBoundNodes()
{
return alignmentBoundNodes;
}
+ @Override
public Map<PhylogenyNode, SequenceI> getNodesBoundAlignment()
{
return nodesBoundAlignment;
*
* @return
*/
+ @Override
public String generateTreeName() // Move this and add selection region to the
// title when applicable
{
--- /dev/null
+package jalview.ext.archaeopteryx;
+
+import jalview.datamodel.SequenceI;
+
+import java.util.Map;
+
+interface ExternalTreeBuilderI<T, N>
+{
+ public T buildTree(N treeRoot);
+
+ public T buildTree();
+
+ public Map<SequenceI, N> getAlignmentBoundNodes();
+
+ public Map<N, SequenceI> getNodesBoundAlignment();
+
+ public String generateTreeName();
+
+}