From 72c22d30800c0e568eeeb2d1e93b52e1b65c5b9f Mon Sep 17 00:00:00 2001 From: kjvdheide Date: Thu, 1 Feb 2018 16:58:14 +0000 Subject: [PATCH] JAL-2890 added constructor that includes tool name & simplified others --- src/jalview/ext/cipres/TreeJob.java | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) 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; + } + } /** -- 1.7.10.2