\r
public abstract class SkeletalExecutable<T> implements Executable<T> {\r
\r
- protected static final PropertyHelper ph = PropertyHelperManager\r
- .getPropertyHelper();\r
+ protected static final PropertyHelper ph = PropertyHelperManager.getPropertyHelper();\r
\r
private static Logger log = Logger.getLogger(SkeletalExecutable.class);\r
\r
}\r
\r
public SkeletalExecutable<T> setOutput(String outFile) {\r
- if (compbio.util.Util.isEmpty(outFile)\r
- || PathValidator.isAbsolutePath(outFile)) {\r
- throw new IllegalArgumentException(\r
- "Output file must not be NULL and Absolute path could not be used! Please provide the filename only. Value provided: "\r
- + outFile);\r
+ if (compbio.util.Util.isEmpty(outFile) || PathValidator.isAbsolutePath(outFile)) {\r
+ throw new IllegalArgumentException("Output file must not be NULL and Absolute path could not be used! Please provide the filename only. Value provided: " + outFile);\r
}\r
this.outputFile = outFile;\r
this.isOutputSet = true;\r
}\r
\r
public SkeletalExecutable<T> setError(String errFile) {\r
- if (compbio.util.Util.isEmpty(errFile)\r
- || PathValidator.isAbsolutePath(errFile)) {\r
- throw new IllegalArgumentException(\r
- "Error file must not be NULL and Absolute path could not be used! Please provide the filename only. Value provided: "\r
- + errFile);\r
+ if (compbio.util.Util.isEmpty(errFile) || PathValidator.isAbsolutePath(errFile)) {\r
+ throw new IllegalArgumentException("Error file must not be NULL and Absolute path could not be used! Please provide the filename only. Value provided: " + errFile);\r
}\r
this.errorFile = errFile;\r
this.isErrorSet = true;\r
// necessary\r
continue;\r
}\r
- String absMatrixPath = compbio.engine.client.Util\r
- .convertToAbsolute(propertyPath);\r
+ String absMatrixPath = compbio.engine.client.Util.convertToAbsolute(propertyPath);\r
command.value = absMatrixPath + File.separator + command.value;\r
cbuilder.setParam(command);\r
}\r
\r
@Override\r
public String getClusterJobSettings() {\r
- String settings = ph.getProperty(getType().getSimpleName()\r
- .toLowerCase() + ".cluster.settings");\r
+ String settings = ph.getProperty(getType().getSimpleName().toLowerCase() + ".cluster.settings");\r
return settings == null ? "" : settings;\r
}\r
\r
/**\r
- * \r
- * @return number of cpus to use on the cluster or 0 if the value is\r
- * undefined\r
+ * @return number of cpus to use on the cluster or 0 if the value is undefined\r
*/\r
public static int getClusterCpuNum(Class<? extends Executable<?>> type) {\r
int cpus = 0;\r
- String cpuNum = ph.getProperty(type.getSimpleName().toLowerCase()\r
- + ".cluster.cpunum");\r
+ String cpuNum = ph.getProperty(type.getSimpleName().toLowerCase() + ".cluster.cpunum");\r
if (compbio.util.Util.isEmpty(cpuNum)) {\r
return 0;\r
}\r
cpus = Integer.parseInt(cpuNum);\r
} catch (NumberFormatException e) {\r
// safe to ignore\r
- log.debug("Number of cpus to use for cluster execution is defined but could not be parsed as integer! Given value is: "\r
- + cpuNum);\r
+ log.debug("Number of cpus to use for cluster execution is defined but could not be parsed as integer! Given value is: " + cpuNum);\r
return 0;\r
}\r
if (cpus < 1 || cpus > 100) {\r
- throw new InvalidParameterException(\r
- "Number of cpu for cluster execution must be within 1 and 100! "\r
- + "Look at the value of 'tcoffee.cluster.cpunum' property. Given value is "\r
- + cpus);\r
+ throw new InvalidParameterException("Number of cpu for cluster execution must be within 1 and 100! "\r
+ + "Look at the value of 'tcoffee.cluster.cpunum' property. Given value is " + cpus);\r
}\r
return cpus;\r
}\r
}\r
\r
/**\r
- * \r
* @return subclasses must return their type\r
*/\r
public abstract Class<T> getType();\r
-\r
}\r