X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=runner%2Fcompbio%2Frunner%2Fconservation%2FAACon.java;h=0f96077ee97280ae8c0e5c4a6fb4f87ab6f804fa;hb=c9680e9b3771037dcb4c92e821a628c8dc6b1684;hp=fd76e5534200182cfd3a6fc7cf58a7b9c5b92fe5;hpb=9ba9d7fd62b1f98b09ed4097c4b38ae94e25a72a;p=jabaws.git diff --git a/runner/compbio/runner/conservation/AACon.java b/runner/compbio/runner/conservation/AACon.java index fd76e55..0f96077 100644 --- a/runner/compbio/runner/conservation/AACon.java +++ b/runner/compbio/runner/conservation/AACon.java @@ -1,15 +1,19 @@ -/* - * Copyright (c) 2009 Peter Troshin JAva Bioinformatics Analysis Web Services - * (JABAWS) @version: 1.0 This library is free software; you can redistribute it - * and/or modify it under the terms of the Apache License version 2 as published - * by the Apache Software Foundation This library is distributed in the hope - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * Apache License for more details. A copy of the license is in - * apache_license.txt. It is also available here: - * @see: http://www.apache.org/licenses/LICENSE-2.0.txt Any republication or - * derived work distributed in source code form must include this copyright and - * license notice. +/* Copyright (c) 2011 Peter Troshin + * + * JAva Bioinformatics Analysis Web Services (JABAWS) @version: 2.0 + * + * This library is free software; you can redistribute it and/or modify it under the terms of the + * Apache License version 2 as published by the Apache Software Foundation + * + * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache + * License for more details. + * + * A copy of the license is in apache_license.txt. It is also available here: + * @see: http://www.apache.org/licenses/LICENSE-2.0.txt + * + * Any republication or derived work distributed in source code form + * must include this copyright and license notice. */ package compbio.runner.conservation; @@ -30,10 +34,7 @@ import compbio.data.sequence.SequenceUtil; import compbio.engine.client.CommandBuilder; import compbio.engine.client.Executable; import compbio.engine.client.SkeletalExecutable; -import compbio.metadata.Limit; -import compbio.metadata.LimitsManager; import compbio.metadata.ResultNotAvailableException; -import compbio.runner.Util; /** * Command line @@ -55,9 +56,6 @@ public class AACon extends SkeletalExecutable { private final String ncorePrm = "-t="; - // Cache for Limits information - private static LimitsManager limits; - public static final String KEY_VALUE_SEPARATOR = "="; public static final String STAT_FILE = "stat.txt"; @@ -128,40 +126,10 @@ public class AACon extends SkeletalExecutable { return this; } + @SuppressWarnings("unchecked") @Override - public Limit getLimit(String presetName) { - if (limits == null) { - limits = getLimits(); - } - Limit limit = null; - if (limits != null) { - // this returns default limit if preset is undefined! - limit = limits.getLimitByName(presetName); - } - // If limit is not defined for a particular preset, then return default - // limit - if (limit == null) { - log.debug("Limit for the preset " + presetName - + " is not found. Using default"); - limit = limits.getDefaultLimit(); - } - return limit; - } - - @Override - public LimitsManager getLimits() { - // synchronise on static field - synchronized (log) { - if (limits == null) { - limits = Util.getLimits(this.getClass()); - } - } - return limits; - } - - @Override - public Class> getType() { - return this.getClass(); + public Class getType() { + return (Class) this.getClass(); } public static String getStatFile() {