JAL-4369 uniprotkb - try to avoid another redirect response
[jalview.git] / src / jalview / ws / dbsources / Uniprot.java
index b125ba5..299224d 100644 (file)
@@ -68,7 +68,7 @@ import jalview.xml.binding.uniprot.PropertyType;
  */
 public class Uniprot extends DbSourceProxyImpl
 {
-  private static final String DEFAULT_UNIPROT_DOMAIN = "https://www.uniprot.org";
+  private static final String DEFAULT_UNIPROT_DOMAIN = "https://rest.uniprot.org";
 
   private static final String BAR_DELIMITER = "|";
 
@@ -144,7 +144,7 @@ public class Uniprot extends DbSourceProxyImpl
               "(UNIPROT\\|?|UNIPROT_|UNIREF\\d+_|UNIREF\\d+\\|?)", "");
       AlignmentI al = null;
 
-      String downloadstring = getDomain() + "/uniprot/" + queries + ".xml";
+      String downloadstring = getDomain() + "/uniprotkb/" + queries + ".xml";
 
       URL url = new URL(downloadstring);
       HttpURLConnection urlconn = (HttpURLConnection) url.openConnection();
@@ -298,7 +298,7 @@ public class Uniprot extends DbSourceProxyImpl
         if (location.getPosition() != null)
         {
           if (location.getPosition().getPosition() == null
-                  || !"unknown".equals(location.getPosition().getStatus()))
+                  || "unknown".equals(location.getPosition().getStatus()))
           {
             Console.warn(
                     "Ignoring single position feature with uncertain location "