* @see https://github.com/Ensembl/ensembl-rest/wiki/Change-log
* @see http://rest.ensembl.org/info/rest?content-type=application/json
*/
- private static final String LATEST_ENSEMBLGENOMES_REST_VERSION = "10.0";
-
private static final String LATEST_ENSEMBL_REST_VERSION = "10.0";
private static final String REST_CHANGE_LOG = "https://github.com/Ensembl/ensembl-rest/wiki/Change-log";
domainData = new HashMap<>();
domainData.put(DEFAULT_ENSEMBL_BASEURL,
new EnsemblData(DEFAULT_ENSEMBL_BASEURL, LATEST_ENSEMBL_REST_VERSION));
- domainData.put(DEFAULT_ENSEMBL_GENOMES_BASEURL, new EnsemblData(
- DEFAULT_ENSEMBL_GENOMES_BASEURL, LATEST_ENSEMBLGENOMES_REST_VERSION));
}
protected volatile boolean inProgress = false;
/*
* initialise domain info lazily
*/
- if (!domainData.containsKey(ensemblDomain))
- {
- domainData.put(ensemblDomain,
- new EnsemblData(ensemblDomain, LATEST_ENSEMBL_REST_VERSION));
- }
- if (!domainData.containsKey(ensemblGenomesDomain))
+ String domain = getDomain();
+ if (!domainData.containsKey(domain))
{
- domainData.put(ensemblGenomesDomain, new EnsemblData(
- ensemblGenomesDomain, LATEST_ENSEMBLGENOMES_REST_VERSION));
+ domainData.put(domain,
+ new EnsemblData(domain, LATEST_ENSEMBL_REST_VERSION));
}
}
- /**
- * Constructor given the target domain to fetch data from
- *
- * @param d
- */
- public EnsemblRestClient(String d)
- {
- setDomain(d);
- }
-
@Override
public boolean queryInProgress()
{
String pingUrl = getDomain() + "/info/ping" + CONTENT_TYPE_JSON;
try
{
- // note this format works for both ensembl and ensemblgenomes
- // info/ping.json works for ensembl only (March 2016)
URL ping = new URL(pingUrl);
/*