X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fext%2Fensembl%2FEnsemblLookup.java;fp=src%2Fjalview%2Fext%2Fensembl%2FEnsemblLookup.java;h=0813ba88ba37041533070729ff491b1aa4d88016;hb=3459a8a691cb22508d7067f240b7254e588e77d3;hp=3dca1b72267af2a857a67cf928d723c40205cc10;hpb=5b27f1062b2203c4c31702e205f4c78e1992063e;p=jalview.git diff --git a/src/jalview/ext/ensembl/EnsemblLookup.java b/src/jalview/ext/ensembl/EnsemblLookup.java index 3dca1b7..0813ba8 100644 --- a/src/jalview/ext/ensembl/EnsemblLookup.java +++ b/src/jalview/ext/ensembl/EnsemblLookup.java @@ -202,8 +202,8 @@ public class EnsemblLookup extends EnsemblRestClient } /** - * Calls the /lookup/id rest service and returns the response as a Map, - * or null if any error + * Calls the /lookup/id rest service and returns the response as a Map, or null if any error * * @param identifier * @param objectType @@ -211,15 +211,16 @@ public class EnsemblLookup extends EnsemblRestClient * @return */ @SuppressWarnings("unchecked") - protected Map getResult(String identifier, String objectType) + protected Map getResult(String identifier, + String objectType) { List ids = Arrays.asList(new String[] { identifier }); try { - return (Map) getJSON(getUrl(identifier, objectType), ids, -1, MODE_MAP, null); - } - catch (IOException | ParseException e) + return (Map) getJSON(getUrl(identifier, objectType), + ids, -1, MODE_MAP, null); + } catch (IOException | ParseException e) { System.err.println("Error parsing " + identifier + " lookup response " + e.getMessage()); @@ -266,10 +267,12 @@ public class EnsemblLookup extends EnsemblRestClient boolean reverseStrand = "-1".equals(strand); int toStart = reverseStrand ? end : start; int toEnd = reverseStrand ? start : end; - List fromRange = Collections.singletonList(new int[] { 1, - fromEnd }); - List toRange = Collections.singletonList(new int[] { toStart, - toEnd }); + List fromRange = Collections + .singletonList(new int[] + { 1, fromEnd }); + List toRange = Collections + .singletonList(new int[] + { toStart, toEnd }); final Mapping map = new Mapping( new MapList(fromRange, toRange, 1, 1)); return new GeneLocus(species == null ? "" : species, assembly,