JAL-3691 automatic insertion of Locale.ROOT to toUpperCase() and toLowerCase() and...
[jalview.git] / src / jalview / ws / dbsources / TDBeacons.java
index 12fefea..345e217 100644 (file)
@@ -20,6 +20,8 @@
  */
 package jalview.ws.dbsources;
 
+import java.util.Locale;
+
 import jalview.bin.Cache;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
@@ -70,6 +72,8 @@ public class TDBeacons extends DbSourceProxyImpl
   private static final String DEFAULT_UNIPROT_DOMAIN = "https://www.uniprot.org";
 
   private static final String BAR_DELIMITER = "|";
+  
+  private static final String DEFAULT_THREEDBEACONS_DOMAIN = "https://wwwdev.ebi.ac.uk/pdbe/pdbe-kb/3dbeacons-hub-api/uniprot/summary/";
 
   /**
    * Constructor
@@ -82,6 +86,7 @@ public class TDBeacons extends DbSourceProxyImpl
   private String getDomain()
   {
     return Cache.getDefault("UNIPROT_DOMAIN", DEFAULT_UNIPROT_DOMAIN);
+    //return Cache.getDefault("3DB_DOMAIN", DEFAULT_THREEDBEACONS_DOMAIN );
   }
 
   /*
@@ -139,12 +144,13 @@ public class TDBeacons extends DbSourceProxyImpl
     startQuery();
     try
     {
-      queries = queries.toUpperCase().replaceAll(
+      queries = queries.toUpperCase(Locale.ROOT).replaceAll(
               "(UNIPROT\\|?|UNIPROT_|UNIREF\\d+_|UNIREF\\d+\\|?)", "");
       AlignmentI al = null;
 
       String downloadstring = getDomain() + "/uniprot/" + queries
               + ".xml";
+//      String downloadstring = getDomain() + queries + ".json";
 
       URL url = new URL(downloadstring);
       URLConnection urlconn = url.openConnection();