JAL-3878 Add RNAalifold service discovery. JAL-3878_web_services_overhaul
authorMateusz Warowny <mmzwarowny@dundee.ac.uk>
Wed, 17 Nov 2021 13:08:55 +0000 (14:08 +0100)
committerMateusz Warowny <mmzwarowny@dundee.ac.uk>
Wed, 17 Nov 2021 13:08:55 +0000 (14:08 +0100)
src/jalview/ws2/operations/AnnotationOperation.java
src/jalview/ws2/slivka/SlivkaWSDiscoverer.java

index 6518733..f927b2b 100644 (file)
@@ -48,6 +48,10 @@ public class AnnotationOperation implements Operation
 
   boolean interactive = false;
 
+  private boolean isProtOperation = true;
+
+  private boolean isNucOperation = true;
+
   /*
    * Is it fine to get rid of AlignAnalysisUIText?
    */
@@ -67,7 +71,7 @@ public class AnnotationOperation implements Operation
   {
     return service.getName();
   }
-  
+
   @Override
   public String getDescription()
   {
@@ -85,13 +89,13 @@ public class AnnotationOperation implements Operation
   {
     return service.getHostName();
   }
-  
+
   @Override
   public boolean hasParameters()
   {
     return service.hasParameters();
   }
-  
+
   @Override
   public ParamDatastoreI getParamStore()
   {
@@ -119,13 +123,23 @@ public class AnnotationOperation implements Operation
   @Override
   public boolean isProteinOperation()
   {
-    return true;
+    return isProtOperation;
+  }
+
+  public void setProteinOperation(boolean value)
+  {
+    isProtOperation = value;
   }
 
   @Override
   public boolean isNucleotideOperation()
   {
-    return true;
+    return isNucOperation;
+  }
+
+  public void setNucleotideOperation(boolean value)
+  {
+    isNucOperation = value;
   }
 
   @Override
index 8534f06..ee3ddf9 100644 (file)
@@ -169,10 +169,18 @@ public class SlivkaWSDiscoverer implements WebServiceDiscoverer
           {
             switch (path[path.length - 1].toLowerCase())
             {
-            case "sequence alignment analysis (conservation)":
+            case "rna secondary structure prediction":
               AnnotationOperation anop;
               op = anop = new AnnotationOperation(instance,
                   instance::getAnnotations, instance::getFeaturesFile,
+                  "Secondary Structure Prediction");
+              anop.setInteractive(true);
+              anop.setAlignmentAnalysis(true);
+              anop.setProteinOperation(false);
+              break;
+            case "sequence alignment analysis (conservation)":
+              op = anop = new AnnotationOperation(instance,
+                  instance::getAnnotations, instance::getFeaturesFile,
                   "Conservation");
               anop.setAlignmentAnalysis(true);
               anop.setInteractive(true);