X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fext%2Fensembl%2FEnsemblSymbol.java;h=ef79d72df4b7a33f1c8863d4d1ca7b42e9e59118;hb=57738a1f3c19b1c3a00bd3ac5108f8cd0af32f99;hp=f731e9412129b31571d8afc5a72b199d93ee5c44;hpb=8e7cf85a7f61f425e808cac53ead7bc27e402242;p=jalview.git diff --git a/src/jalview/ext/ensembl/EnsemblSymbol.java b/src/jalview/ext/ensembl/EnsemblSymbol.java index f731e94..ef79d72 100644 --- a/src/jalview/ext/ensembl/EnsemblSymbol.java +++ b/src/jalview/ext/ensembl/EnsemblSymbol.java @@ -40,7 +40,9 @@ import org.json.simple.parser.ParseException; public class EnsemblSymbol extends EnsemblXref { private static final String GENE = "gene"; + private static final String TYPE = "type"; + /** * Constructor given the target domain to fetch data from * @@ -53,18 +55,18 @@ public class EnsemblSymbol extends EnsemblXref super(domain, dbName, dbVersion); } -// /** -// * Returns the first "id" value in gene identifier format from the JSON -// * response, or null if none found -// * -// * @param br -// * @return -// * @throws IOException -// */ -// @SuppressWarnings("unchecked") -//protected String parseSymbolResponse(BufferedReader br) throws IOException -// { -// } + // /** + // * Returns the first "id" value in gene identifier format from the JSON + // * response, or null if none found + // * + // * @param br + // * @return + // * @throws IOException + // */ + // @SuppressWarnings("unchecked") + // protected String parseSymbolResponse(BufferedReader br) throws IOException + // { + // } /** * Constructs the URL for the REST symbol endpoint @@ -119,12 +121,14 @@ public class EnsemblSymbol extends EnsemblXref { for (Species taxon : Species.getModelOrganisms()) { - String geneId = null;///parseSymbolResponse(br); + String geneId = null;/// parseSymbolResponse(br); try { - Iterator rvals = (Iterator) getJSON(getUrl(query, taxon, GENE), ids, -1, MODE_ITERATOR, null); + Iterator rvals = (Iterator) getJSON( + getUrl(query, taxon, GENE), ids, -1, MODE_ITERATOR, + null); if (rvals == null) - continue; + continue; while (rvals.hasNext()) { Map val = (Map) rvals.next(); @@ -140,7 +144,7 @@ public class EnsemblSymbol extends EnsemblXref { // ignore } - + if (geneId != null && !result.contains(geneId)) { result.add(geneId);