From: Jim Procter Date: Fri, 27 Jul 2018 11:08:13 +0000 (+0100) Subject: JAL-3070 pull up sequence anonymisation hash, presets and params list. X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8590d9e6944ed8d8d624d04eac5e56d0ca97c0ed;p=jalview.git JAL-3070 pull up sequence anonymisation hash, presets and params list. --- diff --git a/src/jalview/ws/AWsJob.java b/src/jalview/ws/AWsJob.java index f5f9377..bb203fc 100644 --- a/src/jalview/ws/AWsJob.java +++ b/src/jalview/ws/AWsJob.java @@ -20,6 +20,13 @@ */ package jalview.ws; +import jalview.ws.params.ArgumentI; +import jalview.ws.params.WsParamSetI; + +import java.util.Hashtable; +import java.util.List; +import java.util.Map; + /** * Generic properties for an individual job within a Web Service Client thread. * Derived from jalview web services version 1 statuses, and revised for Jws2. @@ -145,6 +152,12 @@ public abstract class AWsJob */ protected boolean subjobComplete = false; + protected WsParamSetI preset = null; + + protected List arguments = null; + + protected Hashtable SeqNames = new Hashtable(); + public AWsJob() { } @@ -227,4 +240,15 @@ public abstract class AWsJob String state = ""; return state; } + + public void setPreset(WsParamSetI jobpreset) + { + preset = jobpreset; + } + + public void setArguments(List paramset) + { + arguments = paramset; + + } } diff --git a/src/jalview/ws/jws1/MsaWSThread.java b/src/jalview/ws/jws1/MsaWSThread.java index 006f014..7b3df82 100644 --- a/src/jalview/ws/jws1/MsaWSThread.java +++ b/src/jalview/ws/jws1/MsaWSThread.java @@ -36,7 +36,6 @@ import jalview.ws.AWsJob; import jalview.ws.JobStateSummary; import jalview.ws.WSClientI; -import java.util.Hashtable; import java.util.Vector; import vamsas.objects.simple.MsaResult; @@ -78,8 +77,6 @@ class MsaWSThread extends JWS1Thread implements WSClientI } - Hashtable SeqNames = new Hashtable(); - Vector emptySeqs = new Vector(); /** diff --git a/src/jalview/ws/jws1/SeqSearchWSThread.java b/src/jalview/ws/jws1/SeqSearchWSThread.java index 761b758..2f2bf2c 100644 --- a/src/jalview/ws/jws1/SeqSearchWSThread.java +++ b/src/jalview/ws/jws1/SeqSearchWSThread.java @@ -37,7 +37,6 @@ import jalview.ws.JobStateSummary; import jalview.ws.WSClientI; import java.util.HashMap; -import java.util.Hashtable; import java.util.Map; import java.util.Vector; @@ -77,8 +76,6 @@ class SeqSearchWSThread extends JWS1Thread implements WSClientI } - Hashtable SeqNames = new Hashtable(); - Vector emptySeqs = new Vector(); /** diff --git a/src/jalview/ws/jws2/MsaWSThread.java b/src/jalview/ws/jws2/MsaWSThread.java index a0cd0f4..b1d6452 100644 --- a/src/jalview/ws/jws2/MsaWSThread.java +++ b/src/jalview/ws/jws2/MsaWSThread.java @@ -42,9 +42,7 @@ import jalview.ws.params.ArgumentI; import jalview.ws.params.WsParamSetI; import java.util.ArrayList; -import java.util.Hashtable; import java.util.List; -import java.util.Map; import java.util.Vector; import javax.swing.JInternalFrame; @@ -69,10 +67,6 @@ class MsaWSThread extends AWS2Thread implements WSClientI { long lastChunk = 0; - WsParamSetI preset = null; - - List arguments = null; - /** * input */ @@ -107,8 +101,6 @@ class MsaWSThread extends AWS2Thread implements WSClientI } - Hashtable SeqNames = new Hashtable(); - Vector emptySeqs = new Vector(); /** @@ -490,7 +482,7 @@ class MsaWSThread extends AWS2Thread implements WSClientI if (conmsa != null) { int nvalid = 0, njobs = conmsa.length; - jobs = new MsaWSJob[njobs]; + jobs = new AWsJob[njobs]; for (int j = 0; j < njobs; j++) { if (j != 0) @@ -501,12 +493,12 @@ class MsaWSThread extends AWS2Thread implements WSClientI { jobs[j] = new MsaWSJob(0, conmsa[j]); } - if (((MsaWSJob) jobs[j]).hasValidInput()) + if (jobs[j].hasValidInput()) { nvalid++; } - ((MsaWSJob) jobs[j]).preset = preset; - ((MsaWSJob) jobs[j]).arguments = paramset; + jobs[j].setPreset(preset); + jobs[j].setArguments(paramset); ((MsaWSJob) jobs[j]).alignmentProgram = wsname; if (njobs > 0) {