X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FVamsasAppDatastore.java;h=4e224984d5f69e80de53d61c7b1271f50aad469e;hb=838e4f91d4a53dd315640dbc9ff6ef7a815ee576;hp=7df7cb2a614dd33639846c45f5db329c680aca7c;hpb=be32c14cd8e48fe0a207cd7030cb9cd46f894678;p=jalview.git diff --git a/src/jalview/io/VamsasAppDatastore.java b/src/jalview/io/VamsasAppDatastore.java index 7df7cb2..4e22498 100644 --- a/src/jalview/io/VamsasAppDatastore.java +++ b/src/jalview/io/VamsasAppDatastore.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) - * Copyright (C) $$Year-Rel$$ The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1) + * Copyright (C) 2015 The Jalview Authors * * This file is part of Jalview. * @@ -246,9 +246,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 +338,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 +1263,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 }; } /** @@ -1469,7 +1473,7 @@ public class VamsasAppDatastore { jalview.structure.StructureSelectionManager .getStructureSelectionManager(Desktop.instance) - .addMappings(mappings); + .registerMappings(mappings); } } } @@ -1500,7 +1504,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 +2035,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 +2170,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 +2449,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 +2474,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 +2508,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) { @@ -2757,7 +2763,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); } }