JAL-3878 Add conservation service discovery
authorMateusz Warowny <mmzwarowny@dundee.ac.uk>
Mon, 11 Apr 2022 17:49:08 +0000 (19:49 +0200)
committerMateusz Warowny <mmzwarowny@dundee.ac.uk>
Mon, 11 Apr 2022 17:49:08 +0000 (19:49 +0200)
src/jalview/ws2/client/slivka/SlivkaWSClient.java
src/jalview/ws2/client/slivka/SlivkaWSDiscoverer.java

index b32c188..d7841af 100644 (file)
@@ -200,7 +200,7 @@ public class SlivkaWSClient implements WebServiceClientI
   public void cancel(WebServiceJobHandle job)
       throws IOException, UnsupportedOperationException
   {
-    throw new UnsupportedOperationException(
+    Cache.log.warn(
         "slivka client does not support job cancellation");
   }
 }
index 4829b49..1f46fc3 100644 (file)
@@ -135,6 +135,28 @@ public class SlivkaWSDiscoverer extends AbstractWebServiceDiscoverer
         psaService.addAction(actionBuilder.build());
         allServices.add(psaService);
       }
+      else if (serviceClass == SERVICE_CLASS_CONSERVATION)
+      {
+        var wsb = WebService.<AnnotationAction> newBuilder();
+        initServiceBuilder(slivkaService, wsb);
+        wsb.category("Conservation");
+        wsb.interactive(true);
+        wsb.actionClass(AnnotationAction.class);
+        var conService = wsb.build();
+        var client = new SlivkaAnnotationWSClient(slivkaService);
+        var actionBuilder = AnnotationAction.newBuilder(client);
+        actionBuilder.webService(conService);
+        actionBuilder.name("");
+        actionBuilder.alignmentAnalysis(true);
+        actionBuilder.requireAlignedSequences(true);
+        actionBuilder.filterSymbols(true);
+        conService.addAction(actionBuilder.build());
+        allServices.add(conService);
+      }
+      else if (serviceClass == SERVICE_CLASS_RNA_SEC_STR_PRED)
+      {
+
+      }
       else
       {
         continue;