From: kjvdheide Date: Thu, 1 Feb 2018 16:58:14 +0000 (+0000) Subject: JAL-2890 added constructor that includes tool name & simplified others X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=72c22d30800c0e568eeeb2d1e93b52e1b65c5b9f;p=jalview.git JAL-2890 added constructor that includes tool name & simplified others --- diff --git a/src/jalview/ext/cipres/TreeJob.java b/src/jalview/ext/cipres/TreeJob.java index 5955c36..6ad8033 100644 --- a/src/jalview/ext/cipres/TreeJob.java +++ b/src/jalview/ext/cipres/TreeJob.java @@ -18,7 +18,7 @@ public class TreeJob private final CiApplication app = CiApplication.getInstance(); - private String toolName; + private String tool; private Map> vParams = new HashMap<>(); @@ -39,13 +39,18 @@ public class TreeJob public TreeJob(String alignmentFilePath) { - cipresClient = new CiClient( - app.getAppKey(), app.getUsername(), app.getPassword(), - app.getRestUrl() - ); + this(); inputParams.put("infile_", alignmentFilePath); } + public TreeJob(String alignmentFilePath, String toolName) + { + this(alignmentFilePath); + tool = toolName; + } + + + /** @@ -115,12 +120,18 @@ public class TreeJob public String getTool() { - return toolName; + return tool; } public void setTool(String toolName) { - this.toolName = toolName; + + if (!(this.tool.equals(toolName))) + { + this.tool = toolName; + paramsValidated = false; + } + } /**