\r
import java.io.FileNotFoundException;\r
import java.io.IOException;\r
-import java.security.InvalidParameterException;\r
import java.util.Arrays;\r
import java.util.List;\r
\r
import compbio.engine.client.PipedExecutable;\r
import compbio.engine.client.SkeletalExecutable;\r
import compbio.engine.conf.PropertyHelperManager;\r
-import compbio.metadata.Limit;\r
-import compbio.metadata.LimitsManager;\r
import compbio.metadata.ResultNotAvailableException;\r
import compbio.runner.Util;\r
import compbio.util.PropertyHelper;\r
\r
-public class Tcoffee extends SkeletalExecutable<Tcoffee> implements\r
-PipedExecutable<Tcoffee>, ClusterNativeSpecExecutable<Tcoffee> {\r
+public class Tcoffee extends SkeletalExecutable<Tcoffee>\r
+ implements\r
+ PipedExecutable<Tcoffee>,\r
+ ClusterNativeSpecExecutable<Tcoffee> {\r
\r
private static Logger log = Logger.getLogger(Tcoffee.class);\r
\r
private static PropertyHelper ph = PropertyHelperManager\r
- .getPropertyHelper();\r
-\r
- // Cache for Limits information\r
- private static LimitsManager<Tcoffee> limits;\r
+ .getPropertyHelper();\r
\r
public static final String KEY_VALUE_SEPARATOR = "=";\r
\r
@SuppressWarnings("unchecked")\r
@Override\r
public Alignment getResults(String workDirectory)\r
- throws ResultNotAvailableException {\r
+ throws ResultNotAvailableException {\r
try {\r
return Util.readClustalFile(workDirectory, getOutput());\r
} catch (FileNotFoundException e) {\r
}\r
\r
@Override\r
- public Limit<Tcoffee> getLimit(String presetName) {\r
- if (limits == null) {\r
- limits = getLimits();\r
- }\r
-\r
- Limit<Tcoffee> limit = null;\r
- if (limits != null) {\r
- // this returns default limit if preset is undefined!\r
- limit = limits.getLimitByName(presetName);\r
- }\r
- // If limit is not defined for a particular preset, then return default\r
- // limit\r
- if (limit == null) {\r
- log.debug("Limit for the preset " + presetName\r
- + " is not found. Using default");\r
- limit = limits.getDefaultLimit();\r
- }\r
- return limit;\r
- }\r
-\r
- @Override\r
- public LimitsManager<Tcoffee> getLimits() {\r
- // synchronise on static field\r
- synchronized (log) {\r
- if (limits == null) {\r
- limits = Util.getLimits(this.getClass());\r
- }\r
- }\r
- return limits;\r
- }\r
-\r
- @Override\r
public String getNativeSpecs() {\r
return getClusterSettings();\r
}\r
\r
-\r
+ @SuppressWarnings("unchecked")\r
@Override\r
- public Class<? extends Executable<?>> getType() {\r
- return this.getClass();\r
+ public Class<Executable<Tcoffee>> getType() {\r
+ return (Class<Executable<Tcoffee>>) this.getClass();\r
}\r
}\r