X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2Fpacked%2FJalviewDataset.java;h=9f84c16235cf5d79116a61501dc6c2e3c50406aa;hb=f47ded5b8b48d6372cd1ef8f49e1a630dcadfbdb;hp=e0ebd9f60319a6e0fb5fd85cac9a5683ac39c3bb;hpb=59d682209891099d46b960509907c79e3fb276fe;p=jalview.git
diff --git a/src/jalview/io/packed/JalviewDataset.java b/src/jalview/io/packed/JalviewDataset.java
index e0ebd9f..9f84c16 100644
--- a/src/jalview/io/packed/JalviewDataset.java
+++ b/src/jalview/io/packed/JalviewDataset.java
@@ -1,30 +1,36 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
- * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
* Jalview is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
*
* Jalview is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along with Jalview. If not, see .
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see .
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
*/
-
package jalview.io.packed;
+import jalview.analysis.TreeModel;
+import jalview.api.FeatureColourI;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceI;
import jalview.io.NewickFile;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;
+import java.util.Map;
public class JalviewDataset
{
@@ -53,7 +59,7 @@ public class JalviewDataset
/**
* @return the featureColours
*/
- public Hashtable getFeatureColours()
+ public Map getFeatureColours()
{
return featureColours;
}
@@ -62,7 +68,7 @@ public class JalviewDataset
* @param featureColours
* the featureColours to set
*/
- public void setFeatureColours(Hashtable featureColours)
+ public void setFeatureColours(Map featureColours)
{
this.featureColours = featureColours;
}
@@ -146,8 +152,7 @@ public class JalviewDataset
{
// the following works because all trees are already had node/SequenceI
// associations created.
- jalview.analysis.NJTree njt = new jalview.analysis.NJTree(
- al.getSequencesArray(), nf);
+ TreeModel njt = new TreeModel(al.getSequencesArray(), null, nf);
// this just updates the displayed leaf name on the tree according to
// the SequenceIs.
njt.renameAssociatedNodes();
@@ -183,7 +188,7 @@ public class JalviewDataset
/**
* current set of feature colours
*/
- Hashtable featureColours;
+ Map featureColours;
/**
* original identity of each sequence in results
@@ -197,7 +202,7 @@ public class JalviewDataset
seqDetails = new Hashtable();
al = new ArrayList();
parentDataset = null;
- featureColours = new Hashtable();
+ featureColours = new HashMap();
}
/**
@@ -205,9 +210,10 @@ public class JalviewDataset
*
* @param parentAlignment
*/
- public JalviewDataset(AlignmentI aldataset, Hashtable fc,
- Hashtable seqDets)
+ public JalviewDataset(AlignmentI aldataset,
+ Map fc, Hashtable seqDets)
{
+ // TODO not used - remove?
this(aldataset, fc, seqDets, null);
}
@@ -226,8 +232,9 @@ public class JalviewDataset
* (may be null) alignment to associate new annotation and trees
* with.
*/
- public JalviewDataset(AlignmentI aldataset, Hashtable fc,
- Hashtable seqDets, AlignmentI parentAlignment)
+ public JalviewDataset(AlignmentI aldataset,
+ Map fc, Hashtable seqDets,
+ AlignmentI parentAlignment)
{
this();
parentDataset = aldataset;