\r
import org.apache.log4j.Logger;\r
\r
-import compbio.engine.client.ConfExecutable;\r
import compbio.engine.client.Executable;\r
import compbio.metadata.JobStatus;\r
-import compbio.runner.msa.ClustalW;\r
import compbio.util.FileUtil;\r
import compbio.ws.client.Services;\r
\r
return ftime;\r
}\r
\r
- @SuppressWarnings("unchecked")\r
- Class<Executable<?>> getWSRunnerName() {\r
- String name = jobdir.getName().split("#")[0];\r
- try {\r
- if (name.startsWith(ConfExecutable.CLUSTER_TASK_ID_PREFIX)) {\r
- assert ConfExecutable.CLUSTER_TASK_ID_PREFIX.length() == 1;\r
- name = name.substring(1);\r
- }\r
- name = ClustalW.class.getPackage().getName() + "." + name;\r
- return (Class<Executable<?>>) Class.forName(name);\r
- } catch (ClassNotFoundException e) {\r
- e.printStackTrace();\r
- throw new RuntimeException(\r
- "Cannot match the directory name to the executable! Executable name is "\r
- + name);\r
- }\r
- }\r
-\r
private Services getService() {\r
- return Services.getService(getWSRunnerName());\r
+ return Services.getServiceByJobDirectory(jobdir);\r
}\r
\r
// Mafft, Muscle, Tcoffee, Clustal task:fasta.in result:fasta.out\r
* TODO replace with Universal names for WS!\r
*/\r
long getResultSize() {\r
- Class<Executable<?>> name = getWSRunnerName();\r
+ Class<? extends Executable<?>> name = Services\r
+ .getRunnerByJobDirectory(jobdir);\r
+\r
File f = null;\r
if (name.getSimpleName().equalsIgnoreCase("Probcons")) {\r
f = files.get("alignment.out");\r