From ba2c0286e9a47af8ffd46057f91a22df0d4850ea Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 23 Sep 2019 10:36:19 +0100 Subject: [PATCH] JAL-3070 rename AbstractJabaCalcWorker to SeqAnnotationServiceCalcWorker --- src/jalview/ws/api/SequenceAnnotationServiceI.java | 4 ++-- src/jalview/ws/jws2/Jws2ClientFactory.java | 6 +++--- ...baCalcWorker.java => SeqAnnotationServiceCalcWorker.java} | 6 +++--- src/jalview/ws/jws2/SequenceAnnotationWSClient.java | 10 +++++----- src/jalview/ws/jws2/jabaws2/JabawsAnnotationInstance.java | 4 ++-- .../ws/jws2/jabaws2/JabawsMsaInterfaceAlignCalcWorker.java | 4 ++-- test/jalview/ws/jabaws/DisorderAnnotExportImport.java | 6 +++--- test/jalview/ws/jabaws/RNAStructExportImport.java | 10 +++++----- 8 files changed, 25 insertions(+), 25 deletions(-) rename src/jalview/ws/jws2/{AbstractJabaCalcWorker.java => SeqAnnotationServiceCalcWorker.java} (98%) diff --git a/src/jalview/ws/api/SequenceAnnotationServiceI.java b/src/jalview/ws/api/SequenceAnnotationServiceI.java index d0965e5..a224bac 100644 --- a/src/jalview/ws/api/SequenceAnnotationServiceI.java +++ b/src/jalview/ws/api/SequenceAnnotationServiceI.java @@ -3,7 +3,7 @@ package jalview.ws.api; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.SequenceI; import jalview.ws.gui.AnnotationWsJob; -import jalview.ws.jws2.AbstractJabaCalcWorker; +import jalview.ws.jws2.SeqAnnotationServiceCalcWorker; import jalview.ws.params.ArgumentI; import jalview.ws.params.WsParamSetI; @@ -34,7 +34,7 @@ public interface SequenceAnnotationServiceI extends JalviewWebServiceI * @return */ List getAlignmentAnnotation(AnnotationWsJob running, - AbstractJabaCalcWorker abstractJabaCalcWorker) throws Throwable; + SeqAnnotationServiceCalcWorker abstractJabaCalcWorker) throws Throwable; } diff --git a/src/jalview/ws/jws2/Jws2ClientFactory.java b/src/jalview/ws/jws2/Jws2ClientFactory.java index 2a3b4a5..99edbec 100644 --- a/src/jalview/ws/jws2/Jws2ClientFactory.java +++ b/src/jalview/ws/jws2/Jws2ClientFactory.java @@ -55,7 +55,7 @@ public class Jws2ClientFactory .getRegisteredWorkersOfClass(aaui.getClient()); if (aaconClient != null && aaconClient.size() > 0) { - AbstractJabaCalcWorker worker = (AbstractJabaCalcWorker) aaconClient + SeqAnnotationServiceCalcWorker worker = (SeqAnnotationServiceCalcWorker) aaconClient .get(0); if (!worker.service.getHostURL().equals(service.getHostURL())) { @@ -138,14 +138,14 @@ public class Jws2ClientFactory } List aaconClient = alignFrame.getViewport() .getCalcManager().getRegisteredWorkersOfClass( - AbstractJabaCalcWorker.class); + SeqAnnotationServiceCalcWorker.class); boolean serviceEnabled = false; if (aaconClient != null) { for (AlignCalcWorkerI _worker : aaconClient) { - AbstractJabaCalcWorker worker = (AbstractJabaCalcWorker) _worker; + SeqAnnotationServiceCalcWorker worker = (SeqAnnotationServiceCalcWorker) _worker; // this could be cleaner ? if (worker.hasService() && aaui.getClient() diff --git a/src/jalview/ws/jws2/AbstractJabaCalcWorker.java b/src/jalview/ws/jws2/SeqAnnotationServiceCalcWorker.java similarity index 98% rename from src/jalview/ws/jws2/AbstractJabaCalcWorker.java rename to src/jalview/ws/jws2/SeqAnnotationServiceCalcWorker.java index fae8089..6793f1e 100644 --- a/src/jalview/ws/jws2/AbstractJabaCalcWorker.java +++ b/src/jalview/ws/jws2/SeqAnnotationServiceCalcWorker.java @@ -52,7 +52,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -public class AbstractJabaCalcWorker extends AlignCalcWorker +public class SeqAnnotationServiceCalcWorker extends AlignCalcWorker implements WSAnnotationCalcManagerI { @@ -151,13 +151,13 @@ public class AbstractJabaCalcWorker extends AlignCalcWorker return gapMap; } - public AbstractJabaCalcWorker(AlignViewportI alignViewport, + public SeqAnnotationServiceCalcWorker(AlignViewportI alignViewport, AlignmentViewPanel alignPanel) { super(alignViewport, alignPanel); } - public AbstractJabaCalcWorker(Jws2Instance service, AlignFrame alignFrame, + public SeqAnnotationServiceCalcWorker(Jws2Instance service, AlignFrame alignFrame, WsParamSetI preset, List paramset) { this(alignFrame.getCurrentView(), alignFrame.alignPanel); diff --git a/src/jalview/ws/jws2/SequenceAnnotationWSClient.java b/src/jalview/ws/jws2/SequenceAnnotationWSClient.java index 58478d6..bf5dc23 100644 --- a/src/jalview/ws/jws2/SequenceAnnotationWSClient.java +++ b/src/jalview/ws/jws2/SequenceAnnotationWSClient.java @@ -84,14 +84,14 @@ public class SequenceAnnotationWSClient extends Jws2Client List clnts = alignFrame.getViewport() .getCalcManager() - .getRegisteredWorkersOfClass(AbstractJabaCalcWorker.class); + .getRegisteredWorkersOfClass(SeqAnnotationServiceCalcWorker.class); - AbstractJabaCalcWorker worker = null; + SeqAnnotationServiceCalcWorker worker = null; if (clnts != null) { for (AlignCalcWorkerI _worker : clnts) { - worker = (AbstractJabaCalcWorker) _worker; + worker = (SeqAnnotationServiceCalcWorker) _worker; if (worker.hasService() && worker.getService().getClass().equals(clientClass)) { @@ -108,7 +108,7 @@ public class SequenceAnnotationWSClient extends Jws2Client } try { - worker = new AbstractJabaCalcWorker(sh, alignFrame, this.preset, + worker = new SeqAnnotationServiceCalcWorker(sh, alignFrame, this.preset, paramset); } catch (Exception x) { @@ -149,7 +149,7 @@ public class SequenceAnnotationWSClient extends Jws2Client } alignFrame.getViewport().getCalcManager().startWorker( - new AbstractJabaCalcWorker(sh, alignFrame, preset, paramset)); + new SeqAnnotationServiceCalcWorker(sh, alignFrame, preset, paramset)); } } diff --git a/src/jalview/ws/jws2/jabaws2/JabawsAnnotationInstance.java b/src/jalview/ws/jws2/jabaws2/JabawsAnnotationInstance.java index 3c269c4..8acf64f 100644 --- a/src/jalview/ws/jws2/jabaws2/JabawsAnnotationInstance.java +++ b/src/jalview/ws/jws2/jabaws2/JabawsAnnotationInstance.java @@ -8,7 +8,7 @@ import jalview.util.MessageManager; import jalview.ws.api.JobId; import jalview.ws.api.SequenceAnnotationServiceI; import jalview.ws.gui.AnnotationWsJob; -import jalview.ws.jws2.AbstractJabaCalcWorker; +import jalview.ws.jws2.SeqAnnotationServiceCalcWorker; import jalview.ws.jws2.JabaParamStore; import jalview.ws.jws2.JabaPreset; import jalview.ws.params.ArgumentI; @@ -108,7 +108,7 @@ public abstract class JabawsAnnotationInstance @Override public List getAlignmentAnnotation( AnnotationWsJob running, - AbstractJabaCalcWorker abstractJabaCalcWorker) throws Throwable + SeqAnnotationServiceCalcWorker abstractJabaCalcWorker) throws Throwable { if (scoremanager == null) { diff --git a/src/jalview/ws/jws2/jabaws2/JabawsMsaInterfaceAlignCalcWorker.java b/src/jalview/ws/jws2/jabaws2/JabawsMsaInterfaceAlignCalcWorker.java index aff7ad6..edcc05c 100644 --- a/src/jalview/ws/jws2/jabaws2/JabawsMsaInterfaceAlignCalcWorker.java +++ b/src/jalview/ws/jws2/jabaws2/JabawsMsaInterfaceAlignCalcWorker.java @@ -21,14 +21,14 @@ package jalview.ws.jws2.jabaws2; import jalview.gui.AlignFrame; -import jalview.ws.jws2.AbstractJabaCalcWorker; +import jalview.ws.jws2.SeqAnnotationServiceCalcWorker; import jalview.ws.params.ArgumentI; import jalview.ws.params.WsParamSetI; import java.util.List; public abstract class JabawsMsaInterfaceAlignCalcWorker - extends AbstractJabaCalcWorker + extends SeqAnnotationServiceCalcWorker { public JabawsMsaInterfaceAlignCalcWorker(Jws2Instance service, diff --git a/test/jalview/ws/jabaws/DisorderAnnotExportImport.java b/test/jalview/ws/jabaws/DisorderAnnotExportImport.java index 3e3a06d..de72020 100644 --- a/test/jalview/ws/jabaws/DisorderAnnotExportImport.java +++ b/test/jalview/ws/jabaws/DisorderAnnotExportImport.java @@ -32,7 +32,7 @@ import jalview.io.DataSourceType; import jalview.io.FileFormat; import jalview.io.FormatAdapter; import jalview.io.StockholmFileTest; -import jalview.ws.jws2.AbstractJabaCalcWorker; +import jalview.ws.jws2.SeqAnnotationServiceCalcWorker; import jalview.ws.jws2.Jws2Discoverer; import jalview.ws.jws2.jabaws2.Jws2Instance; @@ -65,7 +65,7 @@ public class DisorderAnnotExportImport public static List iupreds; - jalview.ws.jws2.AbstractJabaCalcWorker disorderClient; + jalview.ws.jws2.SeqAnnotationServiceCalcWorker disorderClient; public static jalview.gui.AlignFrame af = null; @@ -114,7 +114,7 @@ public class DisorderAnnotExportImport @Test(groups = { "External", "Network" }) public void testDisorderAnnotExport() { - disorderClient = new AbstractJabaCalcWorker(iupreds.get(0), af, null, + disorderClient = new SeqAnnotationServiceCalcWorker(iupreds.get(0), af, null, null); af.getViewport().getCalcManager().startWorker(disorderClient); do diff --git a/test/jalview/ws/jabaws/RNAStructExportImport.java b/test/jalview/ws/jabaws/RNAStructExportImport.java index 4af8086..25d015a 100644 --- a/test/jalview/ws/jabaws/RNAStructExportImport.java +++ b/test/jalview/ws/jabaws/RNAStructExportImport.java @@ -33,7 +33,7 @@ import jalview.io.FileFormat; import jalview.io.FormatAdapter; import jalview.io.StockholmFileTest; import jalview.project.Jalview2XML; -import jalview.ws.jws2.AbstractJabaCalcWorker; +import jalview.ws.jws2.SeqAnnotationServiceCalcWorker; import jalview.ws.jws2.JabaParamStore; import jalview.ws.jws2.Jws2Discoverer; import jalview.ws.jws2.SequenceAnnotationWSClient; @@ -79,7 +79,7 @@ public class RNAStructExportImport public static Jws2Instance rnaalifoldws; - AbstractJabaCalcWorker alifoldClient; + SeqAnnotationServiceCalcWorker alifoldClient; public static jalview.gui.AlignFrame af = null; @@ -155,7 +155,7 @@ public class RNAStructExportImport public void testRNAAliFoldValidStructure() { - alifoldClient = new AbstractJabaCalcWorker(rnaalifoldws, af, null, + alifoldClient = new SeqAnnotationServiceCalcWorker(rnaalifoldws, af, null, null); af.getViewport().getCalcManager().startWorker(alifoldClient); @@ -189,7 +189,7 @@ public class RNAStructExportImport public void testRNAStructExport() { - alifoldClient = new AbstractJabaCalcWorker(rnaalifoldws, af, null, + alifoldClient = new SeqAnnotationServiceCalcWorker(rnaalifoldws, af, null, null); af.getViewport().getCalcManager().startWorker(alifoldClient); @@ -283,7 +283,7 @@ public class RNAStructExportImport opts.add(rg); } } - alifoldClient = new AbstractJabaCalcWorker(rnaalifoldws, af, null, + alifoldClient = new SeqAnnotationServiceCalcWorker(rnaalifoldws, af, null, JabaParamStore.getJwsArgsfromJaba(opts)); af.getViewport().getCalcManager().startWorker(alifoldClient); -- 1.7.10.2