+
+ static
+ {
+ Platform.addJ2SDirectDatabaseCall("https://www.ebi.ac.uk/");
+ }
+
+ /**
+ * Constructs the URL to fetch from
+ *
+ * @param ids
+ * @param database
+ * @param format
+ * @return
+ */
+ static String buildUrl(String ids, String database, String format)
+ {
+ String url;
+ if (database.equalsIgnoreCase(DBRefSource.EMBL)
+ || database.equalsIgnoreCase(DBRefSource.EMBLCDS))
+ {
+ url = "https://www.ebi.ac.uk/ena/browser/api/embl/"
+ + ids.toLowerCase(Locale.ROOT) + "?download=true&gzip=true";
+ }
+ else
+ {
+ url = "https://www.ebi.ac.uk/Tools/dbfetch/dbfetch/"
+ + database.toLowerCase(Locale.ROOT) + "/"
+ + ids.toLowerCase(Locale.ROOT)
+ + (format != null ? "/" + format : "");
+ }
+ return url;
+ }