JAL-2885 ENSEMBL-DOMAIN -> ENSEMBL-BASEURL
authorJim Procter <jprocter@issues.jalview.org>
Fri, 23 Feb 2018 11:33:41 +0000 (11:33 +0000)
committerJim Procter <jprocter@issues.jalview.org>
Fri, 23 Feb 2018 11:35:17 +0000 (11:35 +0000)
src/jalview/ext/ensembl/EnsemblGenomes.java
src/jalview/ext/ensembl/EnsemblRestClient.java
src/jalview/ext/ensembl/EnsemblSequenceFetcher.java

index 6af6d44..6dd69a8 100644 (file)
@@ -38,8 +38,8 @@ public class EnsemblGenomes extends EnsemblGene
   public EnsemblGenomes()
   {
     super();
-    setDomain(Cache.getDefault(ENSEMBL_GENOMES_DOMAIN,
-            DEFAULT_ENSEMBL_GENOMES_DOMAIN));
+    setDomain(Cache.getDefault(ENSEMBL_GENOMES_BASEURL,
+            DEFAULT_ENSEMBL_GENOMES_BASEURL));
   }
 
   @Override
index d457668..b19f557 100644 (file)
@@ -82,10 +82,11 @@ abstract class EnsemblRestClient extends EnsemblSequenceFetcher
 
   static
   {
-    domainData.put(DEFAULT_ENSEMBL_DOMAIN,
-            new EnsemblInfo(DEFAULT_ENSEMBL_DOMAIN, LATEST_ENSEMBL_REST_VERSION));
-    domainData.put(DEFAULT_ENSEMBL_GENOMES_DOMAIN, new EnsemblInfo(
-            DEFAULT_ENSEMBL_GENOMES_DOMAIN, LATEST_ENSEMBLGENOMES_REST_VERSION));
+    domainData.put(DEFAULT_ENSEMBL_BASEURL,
+            new EnsemblInfo(DEFAULT_ENSEMBL_BASEURL, LATEST_ENSEMBL_REST_VERSION));
+    domainData.put(DEFAULT_ENSEMBL_GENOMES_BASEURL,
+            new EnsemblInfo(
+            DEFAULT_ENSEMBL_GENOMES_BASEURL, LATEST_ENSEMBLGENOMES_REST_VERSION));
   }
 
   protected volatile boolean inProgress = false;
index 2f642b5..f16dda6 100644 (file)
@@ -34,12 +34,14 @@ import com.stevesoft.pat.Regex;
 abstract class EnsemblSequenceFetcher extends DbSourceProxyImpl
 {
   // domain properties lookup keys:
-  protected static final String ENSEMBL_DOMAIN = "ENSEMBL_DOMAIN";
-  protected static final String ENSEMBL_GENOMES_DOMAIN = "ENSEMBL_GENOMES_DOMAIN";
+  protected static final String ENSEMBL_BASEURL = "ENSEMBL_BASEURL";
+
+  protected static final String ENSEMBL_GENOMES_BASEURL = "ENSEMBL_GENOMES_BASEURL";
 
   // domain properties default values:
-  protected static final String DEFAULT_ENSEMBL_DOMAIN = "http://rest.ensembl.org";
-  protected static final String DEFAULT_ENSEMBL_GENOMES_DOMAIN = "http://rest.ensemblgenomes.org";
+  protected static final String DEFAULT_ENSEMBL_BASEURL = "http://rest.ensembl.org";
+
+  protected static final String DEFAULT_ENSEMBL_GENOMES_BASEURL = "http://rest.ensemblgenomes.org";
 
   /*
    * accepts ENSG/T/E/P with 11 digits
@@ -76,9 +78,10 @@ abstract class EnsemblSequenceFetcher extends DbSourceProxyImpl
      * the default domain names may be overridden in .jalview_properties;
      * this allows an easy change from http to https in future if needed
      */
-    ensemblDomain = Cache.getDefault(ENSEMBL_DOMAIN, DEFAULT_ENSEMBL_DOMAIN);
-    ensemblGenomesDomain = Cache.getDefault(ENSEMBL_GENOMES_DOMAIN,
-            DEFAULT_ENSEMBL_GENOMES_DOMAIN);
+    ensemblDomain = Cache.getDefault(ENSEMBL_BASEURL,
+            DEFAULT_ENSEMBL_BASEURL);
+    ensemblGenomesDomain = Cache.getDefault(ENSEMBL_GENOMES_BASEURL,
+            DEFAULT_ENSEMBL_GENOMES_BASEURL);
     domain = ensemblDomain;
   }