/*
* JAL-1855 dbfetch from ena_sequence, ena_coding
*/
- if (dbPath.equalsIgnoreCase(DBRefSource.EMBL))
+ String url;
+ if (dbPath.equalsIgnoreCase(DBRefSource.EMBL)
+ || dbPath.equalsIgnoreCase(DBRefSource.EMBLCDS))
{
- dbPath = "ena_sequence";
+ url = "http://www.ebi.ac.uk/ena/data/view/" + ids.toLowerCase()
+ + (format != null ? "&" + format : "");
}
- else if (dbPath.equalsIgnoreCase(DBRefSource.EMBLCDS))
+ else
{
- dbPath = "ena_coding";
+ url = "http://www.ebi.ac.uk/Tools/dbfetch/dbfetch/"
+ + dbPath.toLowerCase() + "/" + ids.toLowerCase()
+ + (format != null ? "/" + format : "");
}
try
{
- URL rcall = new URL("http://www.ebi.ac.uk/Tools/dbfetch/dbfetch/"
- + dbPath.toLowerCase() + "/" + ids.toLowerCase()
- + (format != null ? "/" + format : ""));
+ URL rcall = new URL(url);
InputStream is = new BufferedInputStream(rcall.openStream());
if (outFile != null)