"rio" work
[jalview.git] / forester / java / src / org / forester / analysis / TaxonomyDataManager.java
index 99c1de1..2bc654f 100644 (file)
@@ -47,8 +47,8 @@ import org.forester.phylogeny.data.Identifier;
 import org.forester.phylogeny.data.Taxonomy;
 import org.forester.phylogeny.iterators.PhylogenyNodeIterator;
 import org.forester.util.ForesterUtil;
-import org.forester.ws.uniprot.UniProtTaxonomy;
-import org.forester.ws.uniprot.SequenceDbWsTools;
+import org.forester.ws.seqdb.SequenceDbWsTools;
+import org.forester.ws.seqdb.UniProtTaxonomy;
 
 public final class TaxonomyDataManager extends RunnableProcess {
 
@@ -252,7 +252,7 @@ public final class TaxonomyDataManager extends RunnableProcess {
                         not_found.add( tax.toString() );
                     }
                     else {
-                        not_found.add(node.getName() );
+                        not_found.add( node.getName() );
                     }
                     if ( delete && node.isExternal() ) {
                         not_found_external_nodes.add( node );
@@ -265,7 +265,7 @@ public final class TaxonomyDataManager extends RunnableProcess {
                 phy.deleteSubtree( node, true );
             }
             phy.externalNodesHaveChanged();
-            phy.hashIDs();
+            phy.clearHashIdToNodeMap();
             phy.recalculateNumberOfExternalDescendants( true );
         }
         return not_found;
@@ -344,6 +344,7 @@ public final class TaxonomyDataManager extends RunnableProcess {
                     }
                     if ( match ) {
                         if ( up_tax != null ) {
+                            //TODO this is dead code?!
                             throw new AncestralTaxonomyInferenceException( "lineage \""
                                     + ForesterUtil.stringListToString( lineage, " > " ) + "\" is not unique" );
                         }
@@ -375,7 +376,8 @@ public final class TaxonomyDataManager extends RunnableProcess {
     synchronized final private static void updateTaxonomy( final QUERY_TYPE qt,
                                                            final PhylogenyNode node,
                                                            final Taxonomy tax,
-                                                           final UniProtTaxonomy up_tax ) {
+                                                           final UniProtTaxonomy up_tax )
+            throws PhyloXmlDataFormatException {
         if ( ( qt != QUERY_TYPE.SN ) && !ForesterUtil.isEmpty( up_tax.getScientificName() )
                 && ForesterUtil.isEmpty( tax.getScientificName() ) ) {
             tax.setScientificName( up_tax.getScientificName() );