JAL-6386 update slivka client for j2s compatibility
authorMateusz Warowny <mmzwarowny@dundee.ac.uk>
Wed, 8 Jul 2020 11:59:38 +0000 (12:59 +0100)
committerMateusz Warowny <mmzwarowny@dundee.ac.uk>
Wed, 8 Jul 2020 13:22:37 +0000 (14:22 +0100)
j11lib/slivka-client.jar
src/jalview/ws/slivkaws/SlivkaWSDiscoverer.java
src/jalview/ws/slivkaws/SlivkaWSInstance.java

index ca673d6..34d2de9 100644 (file)
Binary files a/j11lib/slivka-client.jar and b/j11lib/slivka-client.jar differ
index 925cd55..7a41431 100644 (file)
@@ -10,7 +10,6 @@ import java.beans.PropertyChangeListener;
 import java.beans.PropertyChangeSupport;
 import java.io.IOException;
 import java.net.MalformedURLException;
-import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.List;
@@ -24,7 +23,7 @@ public class SlivkaWSDiscoverer implements WSDiscovererI
 {
   private static final String SLIVKA_HOST_URLS = "SLIVKAHOSTURLS";
 
-  private static final String COMPBIO_SLIVKA = "https://www.compbio.dundee.ac.uk/slivka";
+  private static final String COMPBIO_SLIVKA = "https://www.compbio.dundee.ac.uk/slivka/";
 
   private static SlivkaWSDiscoverer instance = null;
 
@@ -121,14 +120,7 @@ public class SlivkaWSDiscoverer implements WSDiscovererI
     {
       Cache.log.info(url);
       SlivkaClient client;
-      try
-      {
-        client = new SlivkaClient(url);
-      } catch (URISyntaxException e)
-      {
-        e.printStackTrace();
-        continue;
-      }
+      client = new SlivkaClient(url);
       try
       {
         for (SlivkaService service : client.getServices())
@@ -241,8 +233,9 @@ public class SlivkaWSDiscoverer implements WSDiscovererI
     {
       List<?> services = new SlivkaClient(url).getServices();
       return services.isEmpty() ? STATUS_NO_SERVICES : STATUS_OK;
-    } catch (IOException | URISyntaxException e)
+    } catch (IOException e)
     {
+      Cache.log.error("Slivka could not retrieve services list", e);
       return STATUS_INVALID;
     }
   }
index 952aab6..a21354e 100644 (file)
@@ -106,7 +106,7 @@ public abstract class SlivkaWSInstance extends ServiceWithParameters
         }
         else
         {
-          form.insert(fieldName, field.valueOf(arg.getValue()));
+          form.insert(fieldName, arg.getValue());
         }
       }
     }