X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FVamsasAppDatastore.java;h=2c35547a69358651052cc9f4253172463d285c21;hb=refs%2Fheads%2Freleases%2FRelease_2_10_0_Branch;hp=d67293aafdb34dedee4c9f4c953ac75faf91b8bb;hpb=bd817b546aad8c7456fd5682a890eb79faeb5deb;p=jalview.git diff --git a/src/jalview/io/VamsasAppDatastore.java b/src/jalview/io/VamsasAppDatastore.java index d67293a..2c35547 100644 --- a/src/jalview/io/VamsasAppDatastore.java +++ b/src/jalview/io/VamsasAppDatastore.java @@ -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 mappings = av.getAlignment() + List 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) { @@ -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 cframes = av.getAlignment().getCodonFrames(); + List 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); } }