From: Mateusz Warowny Date: Fri, 24 Sep 2021 15:19:07 +0000 (+0200) Subject: JAL-3878 Move operation type from WebService to Operation. X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=008c3b36b8941e13996e77692595da1401e6a57b;p=jalview.git JAL-3878 Move operation type from WebService to Operation. --- diff --git a/src/jalview/ws2/WebServiceI.java b/src/jalview/ws2/WebServiceI.java index 73e58ee..6781668 100755 --- a/src/jalview/ws2/WebServiceI.java +++ b/src/jalview/ws2/WebServiceI.java @@ -28,8 +28,6 @@ public interface WebServiceI public String getDescription(); - public String getOperationType(); - public List getOperations(); public boolean hasParameters(); diff --git a/src/jalview/ws2/operations/AlignmentOperation.java b/src/jalview/ws2/operations/AlignmentOperation.java index fc92f88..6a1baf2 100644 --- a/src/jalview/ws2/operations/AlignmentOperation.java +++ b/src/jalview/ws2/operations/AlignmentOperation.java @@ -69,6 +69,12 @@ public class AlignmentOperation implements Operation } @Override + public String getTypeName() + { + return "Multiple Sequence Alignment"; + } + + @Override public int getMinSequences() { return 2; @@ -595,9 +601,9 @@ public class AlignmentOperation implements Operation displayNewFrame(aln, alorders, hidden); } - /* + /* * conserves dataset references to sequence objects returned from web - * services. propagate codon frame data to alignment. + * services. propagate codon frame data to alignment. */ private void propagateDatasetMappings(Alignment aln) { diff --git a/src/jalview/ws2/operations/Operation.java b/src/jalview/ws2/operations/Operation.java index e4df008..ae6412b 100644 --- a/src/jalview/ws2/operations/Operation.java +++ b/src/jalview/ws2/operations/Operation.java @@ -4,6 +4,8 @@ import jalview.ws2.MenuEntryProviderI; public interface Operation { + public String getTypeName(); + public int getMinSequences(); public int getMaxSequences(); diff --git a/src/jalview/ws2/slivka/SlivkaWSDiscoverer.java b/src/jalview/ws2/slivka/SlivkaWSDiscoverer.java index 98ce079..7e4178c 100644 --- a/src/jalview/ws2/slivka/SlivkaWSDiscoverer.java +++ b/src/jalview/ws2/slivka/SlivkaWSDiscoverer.java @@ -155,8 +155,7 @@ public class SlivkaWSDiscoverer implements WebServiceDiscoverer } for (SlivkaService service : services) { - SlivkaWebService instance = new SlivkaWebService(client, service, - service.getName()); + SlivkaWebService instance = new SlivkaWebService(client, service); for (String classifier : service.classifiers) { String[] path = classifier.split("\\s*::\\s*"); diff --git a/src/jalview/ws2/slivka/SlivkaWebService.java b/src/jalview/ws2/slivka/SlivkaWebService.java index 2cd9385..c2ac7b3 100644 --- a/src/jalview/ws2/slivka/SlivkaWebService.java +++ b/src/jalview/ws2/slivka/SlivkaWebService.java @@ -43,8 +43,6 @@ public class SlivkaWebService implements WebServiceI protected SlivkaDatastore store = null; - protected final String operation; - protected final ArrayList operations = new ArrayList<>(); protected int typeFlags = 0; @@ -70,12 +68,10 @@ public class SlivkaWebService implements WebServiceI WsJob.JobState.FAILED, WsJob.JobState.SERVERERROR, WsJob.JobState.CANCELLED)); - public SlivkaWebService(SlivkaClient client, SlivkaService service, - String operation) + public SlivkaWebService(SlivkaClient client, SlivkaService service) { this.client = client; this.service = service; - this.operation = operation; } @Override @@ -103,12 +99,6 @@ public class SlivkaWebService implements WebServiceI } @Override - public String getOperationType() - { - return operation; - } - - @Override public List getOperations() { return operations;