static
{
-- domainData = new HashMap<String, EnsemblInfo>();
++ domainData = new HashMap<>();
domainData.put(ENSEMBL_REST,
new EnsemblInfo(ENSEMBL_REST, LATEST_ENSEMBL_REST_VERSION));
domainData.put(ENSEMBL_GENOMES_REST, new EnsemblInfo(
{
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);
{
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);
}
}
}