JAL-1632 similarity options on TreeChooser panel affect tree by PID
[jalview.git] / src / jalview / io / VamsasAppDatastore.java
index d67293a..1cab8ca 100644 (file)
@@ -43,7 +43,6 @@ import java.util.Hashtable;
 import java.util.IdentityHashMap;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Set;
 import java.util.Vector;
 import java.util.jar.JarInputStream;
 import java.util.jar.JarOutputStream;
@@ -246,9 +245,12 @@ public class VamsasAppDatastore
     if (vobj2jv.containsKey(vobj.getVorbaId())
             && !((VorbaId) vobj2jv.get(vobj.getVorbaId())).equals(jvobj))
     {
-      Cache.log.debug(
-              "Warning? Overwriting existing vamsas id binding for "
-                      + vobj.getVorbaId(), new Exception(MessageManager.getString("exception.overwriting_vamsas_id_binding")));
+      Cache.log
+              .debug("Warning? Overwriting existing vamsas id binding for "
+                      + vobj.getVorbaId(),
+                      new Exception(
+                              MessageManager
+                                      .getString("exception.overwriting_vamsas_id_binding")));
     }
     else if (jv2vobj.containsKey(jvobj)
             && !((VorbaId) jv2vobj.get(jvobj)).equals(vobj.getVorbaId()))
@@ -335,7 +337,9 @@ public class VamsasAppDatastore
                 if (vbound.getV_parent() != null
                         && dataset != vbound.getV_parent())
                 {
-                  throw new Error(MessageManager.getString("error.implementation_error_cannot_map_alignment_sequences"));
+                  throw new Error(
+                          MessageManager
+                                  .getString("error.implementation_error_cannot_map_alignment_sequences"));
                   // This occurs because the dataset for the alignment we are
                   // trying to
                 }
@@ -1258,8 +1262,7 @@ public class VamsasAppDatastore
       end = start;
       start = t;
     }
-    return new int[]
-    { start, end, pol < 0 ? 1 : 0 };
+    return new int[] { start, end, pol < 0 ? 1 : 0 };
   }
 
   /**
@@ -1429,7 +1432,7 @@ public class VamsasAppDatastore
         // to the align frames.
         boolean gathered = false;
         String newviewid = null;
-        Set<AlignedCodonFrame> mappings = av.getAlignment()
+        List<AlignedCodonFrame> mappings = av.getAlignment()
                 .getCodonFrames();
         for (int i = 0; i < views.length; i++)
         {
@@ -1500,7 +1503,9 @@ public class VamsasAppDatastore
     {
       // NOTE: this happens if user deletes object in one session then updates
       // from another client
-      throw new Error(MessageManager.formatMessage("error.implementation_error_old_jalview_object_not_bound", new String[]{oldjvobject.toString()}));
+      throw new Error(MessageManager.formatMessage(
+              "error.implementation_error_old_jalview_object_not_bound",
+              new String[] { oldjvobject.toString() }));
     }
     if (newjvobject != null)
     {
@@ -1937,7 +1942,7 @@ public class VamsasAppDatastore
                 TreePanel tp = null;
                 if (vstree.isValidTree())
                 {
-                  tp = alignFrame.ShowNewickTree(vstree.getNewickTree(),
+                  tp = alignFrame.showNewickTree(vstree.getNewickTree(),
                           vstree.getTitle(), vstree.getInputData(), 600,
                           500, t * 20 + 50, t * 20 + 50);
 
@@ -2029,8 +2034,7 @@ public class VamsasAppDatastore
     // may not quite cope with this (without binding an array of annotations to
     // a vamsas alignment annotation)
     // summary flags saying what we found over the set of annotation rows.
-    boolean[] AeContent = new boolean[]
-    { false, false, false, false, false };
+    boolean[] AeContent = new boolean[] { false, false, false, false, false };
     int[] rangeMap = getMapping(annotation);
     jalview.datamodel.Annotation[][] anot = new jalview.datamodel.Annotation[][]
     { new jalview.datamodel.Annotation[rangeMap.length],
@@ -2165,15 +2169,13 @@ public class VamsasAppDatastore
           anot[1][i].description = anot[1][i].description + " (after)";
         }
       }
-      return new Object[]
-      { AeContent, rangeMap, anot[0], anot[1] };
+      return new Object[] { AeContent, rangeMap, anot[0], anot[1] };
     }
     else
     {
       // no annotations to parse. Just return an empty annotationElement[]
       // array.
-      return new Object[]
-      { AeContent, rangeMap, anot[0], anot[1] };
+      return new Object[] { AeContent, rangeMap, anot[0], anot[1] };
     }
     // return null;
   }
@@ -2446,7 +2448,9 @@ public class VamsasAppDatastore
       int[] se = null;
       if (dseta.getSegCount() > 0 && dseta.getPosCount() > 0)
       {
-        throw new Error(MessageManager.getString("error.invalid_vamsas_rangetype_cannot_resolve_lists"));
+        throw new Error(
+                MessageManager
+                        .getString("error.invalid_vamsas_rangetype_cannot_resolve_lists"));
       }
       if (dseta.getSegCount() > 0)
       {
@@ -2469,8 +2473,7 @@ public class VamsasAppDatastore
         // could do a polarity for pos range too. and pass back indication of
         // discontinuities.
         int pos = dseta.getPos(0).getI();
-        se = new int[]
-        { pos, pos };
+        se = new int[] { pos, pos };
         for (int p = 0, pSize = dseta.getPosCount(); p < pSize; p++)
         {
           pos = dseta.getPos(p).getI();
@@ -2504,7 +2507,9 @@ public class VamsasAppDatastore
       int[] se = null;
       if (dseta.getSegCount() > 0 && dseta.getPosCount() > 0)
       {
-          throw new Error(MessageManager.getString("error.invalid_vamsas_rangetype_cannot_resolve_lists"));
+        throw new Error(
+                MessageManager
+                        .getString("error.invalid_vamsas_rangetype_cannot_resolve_lists"));
       }
       if (dseta.getSegCount() > 0)
       {
@@ -2726,7 +2731,7 @@ public class VamsasAppDatastore
 
       }
       // Store any sequence mappings.
-      Set<AlignedCodonFrame> cframes = av.getAlignment().getCodonFrames();
+      List<AlignedCodonFrame> cframes = av.getAlignment().getCodonFrames();
       if (cframes != null)
       {
         for (AlignedCodonFrame acf : cframes)
@@ -2757,7 +2762,9 @@ public class VamsasAppDatastore
       }
     } catch (Exception e)
     {
-      throw new Exception(MessageManager.formatMessage("exception.couldnt_store_sequence_mappings", new String[]{title}),e);
+      throw new Exception(MessageManager.formatMessage(
+              "exception.couldnt_store_sequence_mappings",
+              new String[] { title }), e);
     }
   }