adds static declaration of AJAX-readable domains
authorhansonr <hansonr@STO24954W.ad.stolaf.edu>
Sun, 11 Nov 2018 00:35:59 +0000 (18:35 -0600)
committerhansonr <hansonr@STO24954W.ad.stolaf.edu>
Sun, 11 Nov 2018 00:36:28 +0000 (18:36 -0600)
src/jalview/bin/Cache.java
src/jalview/fts/service/uniprot/UniProtFTSRestClient.java

index b6315f3..6d23bd0 100755 (executable)
@@ -1052,4 +1052,19 @@ public class Cache
       }
     }
   }
+
+       /**
+        * Add a known domain that implements access-control-allow-origin:* bh 2018
+        * 
+        * @param defaultUniprotDomain
+        */
+       public static void addJ2SDirectDatabaseCall(String domain) 
+       {
+
+               /**
+                * @j2sNative
+                * 
+                *                      J2S.addDirectDatabaseCall(domain);
+                */
+       }
 }
index b4100cb..c3ca893 100644 (file)
@@ -47,6 +47,10 @@ public class UniProtFTSRestClient extends FTSRestClient
 {
   private static final String DEFAULT_UNIPROT_DOMAIN = "https://www.uniprot.org";
 
+  static {
+         Cache.addJ2SDirectDatabaseCall(DEFAULT_UNIPROT_DOMAIN);
+  }
+  
   private static FTSRestClientI instance = null;
 
   public final String uniprotSearchEndpoint;
@@ -55,7 +59,7 @@ public class UniProtFTSRestClient extends FTSRestClient
   {
     super();
     uniprotSearchEndpoint = Cache.getDefault("UNIPROT_DOMAIN",
-            DEFAULT_UNIPROT_DOMAIN) + "/uniprot/";
+            DEFAULT_UNIPROT_DOMAIN) + "/uniprot/";    
   }
 
   @Override