From: Jim Procter Date: Mon, 23 Oct 2017 14:00:38 +0000 (+0100) Subject: Merge branch 'bug/JAL-2253' into develop X-Git-Tag: Release_2_10_3b1~98 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f10bde358291159a1d3c7d5b093a6cad907f5221;p=jalview.git Merge branch 'bug/JAL-2253' into develop JAL-2253 resolve diffrences between patches post-code review and diverging develop --- f10bde358291159a1d3c7d5b093a6cad907f5221 diff --cc src/jalview/ext/ensembl/EnsemblRestClient.java index c06d13e,6384120..b1bc8e5 --- a/src/jalview/ext/ensembl/EnsemblRestClient.java +++ b/src/jalview/ext/ensembl/EnsemblRestClient.java @@@ -94,7 -78,7 +85,7 @@@ abstract class EnsemblRestClient extend static { -- domainData = new HashMap(); ++ domainData = new HashMap<>(); domainData.put(ENSEMBL_REST, new EnsemblInfo(ENSEMBL_REST, LATEST_ENSEMBL_REST_VERSION)); domainData.put(ENSEMBL_GENOMES_REST, new EnsemblInfo( @@@ -567,13 -520,10 +525,12 @@@ { JSONParser jp = new JSONParser(); URL url = null; + BufferedReader br = null; + try { - url = new URL( - getDomain() + "/info/data?content-type=application/json"); + url = new URL(getDomain() + "/info/data" + CONTENT_TYPE_JSON); - BufferedReader br = getHttpResponse(url, null); + br = getHttpResponse(url, null); if (br != null) { JSONObject val = (JSONObject) jp.parse(br); diff --cc src/jalview/ext/ensembl/EnsemblSymbol.java index e2e38b5,7862fce..75598a0 --- a/src/jalview/ext/ensembl/EnsemblSymbol.java +++ b/src/jalview/ext/ensembl/EnsemblSymbol.java @@@ -119,18 -143,22 +143,19 @@@ public class EnsemblSymbol extends Ense { for (String query : queries) { - for (Species taxon : Species.values()) + for (Species taxon : Species.getModelOrganisms()) { - URL url = getUrl(query, taxon); - if (taxon.isModelOrganism()) ++ URL url = getUrl(query, taxon, GENE); + if (url != null) { - URL url = getUrl(query, taxon, GENE); - if (url != null) + br = getHttpResponse(url, ids); + if (br != null) { - br = getHttpResponse(url, ids); - if (br != null) + String geneId = parseSymbolResponse(br); - if (geneId != null) ++ System.out.println(url + " returned " + geneId); ++ if (geneId != null && !result.contains(geneId)) { - String geneId = parseSymbolResponse(br); - System.out.println(url + " returned " + geneId); - if (geneId != null && !result.contains(geneId)) - { - result.add(geneId); - } + result.add(geneId); } } }