Javadoc fixes
authorpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Fri, 12 Aug 2011 13:35:18 +0000 (13:35 +0000)
committerpvtroshin <pvtroshin@e3abac25-378b-4346-85de-24260fe3988d>
Fri, 12 Aug 2011 13:35:18 +0000 (13:35 +0000)
git-svn-id: link to svn.lifesci.dundee.ac.uk/svn/barton/ptroshin/JABA2@4508 e3abac25-378b-4346-85de-24260fe3988d

32 files changed:
datamodel/compbio/data/sequence/ClustalAlignmentUtil.java
datamodel/compbio/data/sequence/FastaReader.java
datamodel/compbio/data/sequence/Score.java
datamodel/compbio/data/sequence/SequenceUtil.java
engine/compbio/engine/Cleaner.java
engine/compbio/engine/FilePuller.java
engine/compbio/engine/PulledFileCache.java
engine/compbio/engine/client/CommandBuilder.java
engine/compbio/engine/client/ConfExecutable.java
engine/compbio/engine/client/PathValidator.java
engine/compbio/engine/client/PipedExecutable.java
engine/compbio/engine/client/Util.java
engine/compbio/engine/cluster/drmaa/AsyncJobRunner.java
engine/compbio/engine/cluster/drmaa/ClusterSession.java
engine/compbio/engine/cluster/drmaa/_DrmaaExample.java
engine/compbio/engine/cluster/drmaa/_JobStatus.java
engine/compbio/engine/cluster/dundee/_Queue.java
engine/compbio/engine/cluster/dundee/_QueueConstraints.java
engine/compbio/engine/conf/PropertyHelperManager.java
engine/compbio/engine/conf/RunnerConfigMarshaller.java
engine/compbio/engine/conf/_Key.java
engine/compbio/engine/local/AsyncLocalRunner.java
engine/compbio/engine/local/LocalExecutorService.java
engine/compbio/engine/local/_TrackingExecutor.java
runner/compbio/runner/_NativeSpecHelper.java
runner/compbio/runner/_SkeletalCommandBuilder.java
runner/compbio/runner/msa/Muscle.java
runner/compbio/runner/msa/Probcons.java
runner/compbio/runner/msa/Tcoffee.java
webservices/compbio/data/msa/RegistryWS.java
webservices/compbio/ws/server/GenericMetadataService.java
webservices/compbio/ws/server/SimpleWSPublisher.java

index 2656046..fc44c44 100644 (file)
@@ -200,7 +200,7 @@ public final class ClustalAlignmentUtil {
         * consensus. Potential bug - records 60 chars length alignment where\r
         * Clustal would have recorded 50 chars.\r
         * \r
-        * @param outStream\r
+        * @param out\r
         * \r
         * @param alignment\r
         * @throws IOException\r
index 38f1ccb..1641d34 100644 (file)
@@ -71,7 +71,7 @@ public class FastaReader implements Iterator<FastaSequence> {
        /**\r
         * Header data can contain non-ASCII symbols and read in UTF8\r
         * \r
-        * @param input\r
+        * @param inputFile\r
         *            the file containing the list of FASTA formatted sequences to\r
         *            read from\r
         * @throws FileNotFoundException\r
index c8cbfb4..ec4cadc 100644 (file)
@@ -128,7 +128,7 @@ public class Score implements Comparable<Score> {
        /**\r
         * Return Ranges if any Collections.EMPTY_SET otherwise\r
         * \r
-        * @return\r
+        * @return ordered set of Range\r
         */\r
        public TreeSet<Range> getRanges() {\r
                return ranges;\r
@@ -200,8 +200,7 @@ public class Score implements Comparable<Score> {
         * \r
         * @param scores\r
         *            the list of scores to output\r
-        * @param output\r
-        *            the stream to output the data to\r
+        * @param writer\r
         * @throws IOException\r
         *             if the OutputStream cannot be written into\r
         * @throws NullPointerException\r
index 16b65f2..6e20988 100644 (file)
@@ -290,7 +290,7 @@ public final class SequenceUtil {
         * Read IUPred output\r
         * \r
         * @param result\r
-        * @return\r
+        * @return Map key->sequence name, value->Score\r
         * @throws IOException\r
         * @throws UnknownFileFormatException\r
         */\r
@@ -427,7 +427,7 @@ public final class SequenceUtil {
         * \r
         * @param inStream\r
         *            the InputStream connected to the JRonn output file\r
-        * @return List of {@link AnnotatedSequence} objects\r
+        * @return Map key=sequence name value=Score\r
         * @throws IOException\r
         *             is thrown if the inStream has problems accessing the data\r
         * @throws UnknownFileFormatException\r
@@ -533,7 +533,8 @@ public final class SequenceUtil {
         * \r
         * \r
         * @param input\r
-        * @return\r
+        *            the InputStream\r
+        * @return Map key=sequence name, value=set of score\r
         * @throws IOException\r
         * @throws UnknownFileFormatException\r
         */\r
@@ -655,7 +656,7 @@ public final class SequenceUtil {
         * \r
         * \r
         * @param input\r
-        * @return\r
+        * @return Map key=sequence name, value=set of score\r
         * @throws IOException\r
         * @throws UnknownFileFormatException\r
         */\r
index e4e2923..4813388 100644 (file)
@@ -26,6 +26,7 @@ import compbio.engine.client.ConfiguredExecutable;
 import compbio.engine.client.PathValidator;\r
 import compbio.engine.local.ExecutableWrapper;\r
 \r
+@Deprecated\r
 public class Cleaner {\r
 \r
        private static final Logger log = Logger.getLogger(Cleaner.class);\r
@@ -37,7 +38,8 @@ public class Cleaner {
         * \r
         * @param workDirectory\r
         * @param files\r
-        * @return\r
+        * @return This method returns true if all files specified by List files\r
+        *         were successfully removed, false otherwise\r
         */\r
        public static boolean deleteFiles(ConfiguredExecutable<?> exec) {\r
 \r
@@ -71,12 +73,11 @@ public class Cleaner {
                        if (success) {\r
                                log.trace(type + filename + " was successfully removed");\r
                        } else {\r
-                               log\r
-                                               .debug("Could not remove "\r
-                                                               + type\r
-                                                               + ": "\r
-                                                               + filename\r
-                                                               + " reportedly created by executable. Insufficient access right?");\r
+                               log.debug("Could not remove "\r
+                                               + type\r
+                                               + ": "\r
+                                               + filename\r
+                                               + " reportedly created by executable. Insufficient access right?");\r
                        }\r
                } else {\r
                        log.debug("File: " + filename\r
index d040838..98a44bc 100644 (file)
@@ -32,284 +32,285 @@ import compbio.util.FileWatcher;
 \r
 public class FilePuller implements Delayed {\r
 \r
-    private static final Logger log = Logger.getLogger(FilePuller.class);\r
-\r
-    // 5 minutes in nanosec\r
-    private static long defaultDelay = 1000 * 1000 * 1000L * 5 * 60;\r
-    private final File file;\r
-    private long lastAccessTime;\r
-    private FileWatcher watcher;\r
-    final int chunkSize;\r
-\r
-    // used for testing only\r
-    long delay = 0;\r
-\r
-    private FilePuller(String file, int size) {\r
-       FileWatcher.validateInput(file, size);\r
-       if (compbio.util.Util.isEmpty(file)) {\r
-           throw new NullPointerException("File name must be provided!");\r
+       private static final Logger log = Logger.getLogger(FilePuller.class);\r
+\r
+       // 5 minutes in nanosec\r
+       private static long defaultDelay = 1000 * 1000 * 1000L * 5 * 60;\r
+       private final File file;\r
+       private long lastAccessTime;\r
+       private FileWatcher watcher;\r
+       final int chunkSize;\r
+\r
+       // used for testing only\r
+       long delay = 0;\r
+\r
+       private FilePuller(String file, int size) {\r
+               FileWatcher.validateInput(file, size);\r
+               if (compbio.util.Util.isEmpty(file)) {\r
+                       throw new NullPointerException("File name must be provided!");\r
+               }\r
+               // The fact that the file may not exist at a time does not matter here\r
+               if (!PathValidator.isAbsolutePath(file)) {\r
+                       throw new IllegalArgumentException("Absolute path to the File "\r
+                                       + file + " is expected but not provided!");\r
+               }\r
+               this.file = new File(file);\r
+               this.chunkSize = size;\r
+               this.lastAccessTime = System.nanoTime();\r
        }\r
-       // The fact that the file may not exist at a time does not matter here\r
-       if (!PathValidator.isAbsolutePath(file)) {\r
-           throw new IllegalArgumentException("Absolute path to the File "\r
-                   + file + " is expected but not provided!");\r
+\r
+       private FilePuller(String file) {\r
+               if (compbio.util.Util.isEmpty(file)) {\r
+                       throw new NullPointerException("File name must be provided!");\r
+               }\r
+               // The fact that the file may not exist at a time does not matter here\r
+               if (!PathValidator.isAbsolutePath(file)) {\r
+                       throw new IllegalArgumentException("Absolute path to the File "\r
+                                       + file + " is expected but not provided!");\r
+               }\r
+               this.file = new File(file);\r
+               this.chunkSize = 3;\r
+               this.lastAccessTime = System.nanoTime();\r
        }\r
-       this.file = new File(file);\r
-       this.chunkSize = size;\r
-       this.lastAccessTime = System.nanoTime();\r
-    }\r
-\r
-    private FilePuller(String file) {\r
-       if (compbio.util.Util.isEmpty(file)) {\r
-           throw new NullPointerException("File name must be provided!");\r
+\r
+       public static FilePuller newFilePuller(String file, int chunkSize) {\r
+               return new FilePuller(file, chunkSize);\r
        }\r
-       // The fact that the file may not exist at a time does not matter here\r
-       if (!PathValidator.isAbsolutePath(file)) {\r
-           throw new IllegalArgumentException("Absolute path to the File "\r
-                   + file + " is expected but not provided!");\r
+\r
+       /**\r
+        * Progress Puller is designed to read 3 characters from the beginning of\r
+        * the file, nothing more. Intended to be used in conjunction with a tool\r
+        * which output progress as a percent value from 0 to 100. In any cases\r
+        * progress could not be more than the largest byte value 255.\r
+        * \r
+        * @param file\r
+        * @return instance\r
+        */\r
+       public static FilePuller newProgressPuller(String file) {\r
+               return new FilePuller(file);\r
        }\r
-       this.file = new File(file);\r
-       this.chunkSize = 3;\r
-       this.lastAccessTime = System.nanoTime();\r
-    }\r
-\r
-    public static FilePuller newFilePuller(String file, int chunkSize) {\r
-       return new FilePuller(file, chunkSize);\r
-    }\r
-\r
-    /**\r
-     * Progress Puller is designed to read 3 characters from the beginning of\r
-     * the file, nothing more. Intended to be used in conjunction with a tool\r
-     * which output progress as a percent value from 0 to 100. In any cases\r
-     * progress could not be more than the largest byte value 255.\r
-     * \r
-     * @param file\r
-     * @return\r
-     */\r
-    public static FilePuller newProgressPuller(String file) {\r
-       return new FilePuller(file);\r
-    }\r
-\r
-    public ChunkHolder pull(long position) throws IOException {\r
-       initPull();\r
-       String valueUTF16 = watcher.pull(position);\r
-       String value = null;\r
-       if (valueUTF16 != null) {\r
-           value = removeInvalidXMLCharacters(valueUTF16);\r
+\r
+       public ChunkHolder pull(long position) throws IOException {\r
+               initPull();\r
+               String valueUTF16 = watcher.pull(position);\r
+               String value = null;\r
+               if (valueUTF16 != null) {\r
+                       value = removeInvalidXMLCharacters(valueUTF16);\r
+               }\r
+               return new ChunkHolder(value, watcher.getCursorPosition());\r
        }\r
-       return new ChunkHolder(value, watcher.getCursorPosition());\r
-    }\r
-\r
-    /**\r
-     * This method ensures that the output String has only valid XML unicode\r
-     * characters as specified by the XML 1.0 standard. For reference, please\r
-     * see the standard.\r
-     * \r
-     * @param The\r
-     *            String whose non-valid characters we want to remove.\r
-     * \r
-     * @return The in String, stripped of non-valid characters.\r
-     */\r
-    static String removeInvalidXMLCharacters(String str) {\r
-       assert str != null;\r
-\r
-       StringBuilder out = new StringBuilder(); // Used to hold the output.\r
-       int codePoint; // Used to reference the current character.\r
-\r
-       // For test\r
-       // String ss = "\ud801\udc00"; // This is actualy one unicode character,\r
-       // represented by two code units!!!.\r
-       // System.out.println(ss.codePointCount(0, ss.length()));// See: 1\r
-       int i = 0;\r
-       String value = null;\r
-       try {\r
-           // make sure the string contain only UTF-8 characters\r
-           value = new String(str.getBytes("UTF-8"), "UTF-8");\r
-       } catch (UnsupportedEncodingException e) {\r
-           // will not happen\r
-           throw new AssertionError("UTF-8 charset is not supported!!!");\r
+\r
+       /**\r
+        * This method ensures that the output String has only valid XML unicode\r
+        * characters as specified by the XML 1.0 standard. For reference, please\r
+        * see the standard.\r
+        * \r
+        * @param The\r
+        *            String whose non-valid characters we want to remove.\r
+        * \r
+        * @return The in String, stripped of non-valid characters.\r
+        */\r
+       static String removeInvalidXMLCharacters(String str) {\r
+               assert str != null;\r
+\r
+               StringBuilder out = new StringBuilder(); // Used to hold the output.\r
+               int codePoint; // Used to reference the current character.\r
+\r
+               // For test\r
+               // String ss = "\ud801\udc00"; // This is actualy one unicode character,\r
+               // represented by two code units!!!.\r
+               // System.out.println(ss.codePointCount(0, ss.length()));// See: 1\r
+               int i = 0;\r
+               String value = null;\r
+               try {\r
+                       // make sure the string contain only UTF-8 characters\r
+                       value = new String(str.getBytes("UTF-8"), "UTF-8");\r
+               } catch (UnsupportedEncodingException e) {\r
+                       // will not happen\r
+                       throw new AssertionError("UTF-8 charset is not supported!!!");\r
+               }\r
+               while (i < value.length()) {\r
+                       codePoint = value.codePointAt(i); // This is the unicode code of the\r
+                       // character.\r
+                       if ((codePoint == 0x9)\r
+                                       || // Consider testing larger ranges first to\r
+                                               // improve speed.\r
+                                       (codePoint == 0xA) || (codePoint == 0xD)\r
+                                       || ((codePoint >= 0x20) && (codePoint <= 0xD7FF))\r
+                                       || ((codePoint >= 0xE000) && (codePoint <= 0xFFFD))\r
+                                       || ((codePoint >= 0x10000) && (codePoint <= 0x10FFFF))) {\r
+\r
+                               out.append(Character.toChars(codePoint));\r
+                       }\r
+\r
+                       i += Character.charCount(codePoint);\r
+                       /*\r
+                        * Increment with the number of code units(java chars) needed to\r
+                        * represent a Unicode char.\r
+                        */\r
+               }\r
+               return out.toString();\r
        }\r
-       while (i < value.length()) {\r
-           codePoint = value.codePointAt(i); // This is the unicode code of the\r
-           // character.\r
-           if ((codePoint == 0x9)\r
-                   || // Consider testing larger ranges first to\r
-                   // improve speed.\r
-                   (codePoint == 0xA) || (codePoint == 0xD)\r
-                   || ((codePoint >= 0x20) && (codePoint <= 0xD7FF))\r
-                   || ((codePoint >= 0xE000) && (codePoint <= 0xFFFD))\r
-                   || ((codePoint >= 0x10000) && (codePoint <= 0x10FFFF))) {\r
-\r
-               out.append(Character.toChars(codePoint));\r
-           }\r
-\r
-           i += Character.charCount(codePoint);\r
-           /*\r
-            * Increment with the number of code units(java chars) needed to\r
-            * represent a Unicode char.\r
-            */\r
+\r
+       public void initPull() {\r
+               this.lastAccessTime = System.nanoTime();\r
+               if (!isFileCreated()) {\r
+                       throw new IllegalStateException("File " + file.getAbsolutePath()\r
+                                       + " has not been created yet! Cannot pull.");\r
+               }\r
+               if (watcher == null) {\r
+                       init();\r
+               }\r
        }\r
-       return out.toString();\r
-    }\r
-\r
-    public void initPull() {\r
-       this.lastAccessTime = System.nanoTime();\r
-       if (!isFileCreated()) {\r
-           throw new IllegalStateException("File " + file.getAbsolutePath()\r
-                   + " has not been created yet! Cannot pull.");\r
+\r
+       public String getFile() {\r
+               return file.getAbsolutePath();\r
        }\r
-       if (watcher == null) {\r
-           init();\r
+\r
+       public boolean isFileCreated() {\r
+               this.lastAccessTime = System.nanoTime();\r
+               return file.exists();\r
        }\r
-    }\r
-\r
-    public String getFile() {\r
-       return file.getAbsolutePath();\r
-    }\r
-\r
-    public boolean isFileCreated() {\r
-       this.lastAccessTime = System.nanoTime();\r
-       return file.exists();\r
-    }\r
-\r
-    public void waitForFile(long maxWaitSeconds) {\r
-       long waited = 0;\r
-       int step = 500;\r
-       while (true) {\r
-           if (isFileCreated()) {\r
-               break;\r
-           }\r
-           try {\r
-               Thread.sleep(step);\r
-               // TODO is this needed? this.lastAccessTime = System.nanoTime();\r
-           } catch (InterruptedException e) {\r
-               // Propagate interruption up the stack trace for anyone\r
-               // interested\r
-               Thread.currentThread().interrupt();\r
-               log.debug("Thread interruped during waiting for file "\r
-                       + file.getAbsolutePath() + " to be created. Message: "\r
-                       + e.getMessage());\r
-               break;\r
-           }\r
-           waited += step;\r
-           if (waited / 1000 >= maxWaitSeconds) {\r
-               break;\r
-           }\r
+\r
+       public void waitForFile(long maxWaitSeconds) {\r
+               long waited = 0;\r
+               int step = 500;\r
+               while (true) {\r
+                       if (isFileCreated()) {\r
+                               break;\r
+                       }\r
+                       try {\r
+                               Thread.sleep(step);\r
+                               // TODO is this needed? this.lastAccessTime = System.nanoTime();\r
+                       } catch (InterruptedException e) {\r
+                               // Propagate interruption up the stack trace for anyone\r
+                               // interested\r
+                               Thread.currentThread().interrupt();\r
+                               log.debug("Thread interruped during waiting for file "\r
+                                               + file.getAbsolutePath() + " to be created. Message: "\r
+                                               + e.getMessage());\r
+                               break;\r
+                       }\r
+                       waited += step;\r
+                       if (waited / 1000 >= maxWaitSeconds) {\r
+                               break;\r
+                       }\r
+               }\r
        }\r
-    }\r
 \r
-    public boolean hasMoreData() throws IOException {\r
-       this.lastAccessTime = System.nanoTime();\r
-       if (!isFileCreated()) {\r
-           throw new IllegalStateException("File " + file.getAbsolutePath()\r
-                   + " has not been created yet! Cannot pull.");\r
+       public boolean hasMoreData() throws IOException {\r
+               this.lastAccessTime = System.nanoTime();\r
+               if (!isFileCreated()) {\r
+                       throw new IllegalStateException("File " + file.getAbsolutePath()\r
+                                       + " has not been created yet! Cannot pull.");\r
+               }\r
+               if (watcher == null) {\r
+                       init();\r
+               }\r
+               return watcher.hasMore();\r
        }\r
-       if (watcher == null) {\r
-           init();\r
+\r
+       private synchronized void init() {\r
+               // Check watcher==null is duplicated to avoid adding synchronization to\r
+               // access methods\r
+               if (watcher == null) {\r
+                       if (chunkSize < FileWatcher.MIN_CHUNK_SIZE_BYTES) {\r
+                               watcher = FileWatcher\r
+                                               .newProgressWatcher(file.getAbsolutePath());\r
+                               log.debug("Init Progress watcher with file: "\r
+                                               + file.getAbsolutePath());\r
+                       } else {\r
+                               watcher = FileWatcher.newFileWatcher(file.getAbsolutePath(),\r
+                                               chunkSize);\r
+                               log.debug("Init File watcher with file: "\r
+                                               + file.getAbsolutePath());\r
+                       }\r
+\r
+               }\r
        }\r
-       return watcher.hasMore();\r
-    }\r
-\r
-    private synchronized void init() {\r
-       // Check watcher==null is duplicated to avoid adding synchronization to\r
-       // access methods\r
-       if (watcher == null) {\r
-           if (chunkSize < FileWatcher.MIN_CHUNK_SIZE_BYTES) {\r
-               watcher = FileWatcher\r
-                       .newProgressWatcher(file.getAbsolutePath());\r
-               log.debug("Init Progress watcher with file: "\r
-                       + file.getAbsolutePath());\r
-           } else {\r
-               watcher = FileWatcher.newFileWatcher(file.getAbsolutePath(),\r
-                       chunkSize);\r
-               log.debug("Init File watcher with file: "\r
-                       + file.getAbsolutePath());\r
-           }\r
 \r
+       @Override\r
+       public int compareTo(Delayed o) {\r
+               return new Long(this.getDelay(TimeUnit.NANOSECONDS)).compareTo(o\r
+                               .getDelay(TimeUnit.NANOSECONDS));\r
        }\r
-    }\r
-\r
-    @Override\r
-    public int compareTo(Delayed o) {\r
-       return new Long(this.getDelay(TimeUnit.NANOSECONDS)).compareTo(o\r
-               .getDelay(TimeUnit.NANOSECONDS));\r
-    }\r
-\r
-    /*\r
-     * This must return remaining delay associated with the object!\r
-     * (non-Javadoc)\r
-     * \r
-     * @see java.util.concurrent.Delayed#getDelay(java.util.concurrent.TimeUnit)\r
-     */\r
-    @Override\r
-    public long getDelay(final TimeUnit unit) {\r
-       long idleTime = System.nanoTime() - lastAccessTime;\r
-       long delayVal = (delay == 0 ? defaultDelay : delay);\r
-       return unit.convert(delayVal - idleTime, TimeUnit.NANOSECONDS);\r
-    }\r
-\r
-    void setDelay(long delay, TimeUnit unit) {\r
-       assert delay > 0;\r
-       this.delay = TimeUnit.NANOSECONDS.convert(delay, unit);\r
-       assert delay < defaultDelay;\r
-    }\r
-\r
-    long getDelayValue(TimeUnit unit) {\r
-       return (delay == 0 ? unit.convert(defaultDelay, TimeUnit.NANOSECONDS)\r
-               : unit.convert(delay, TimeUnit.NANOSECONDS));\r
-    }\r
-\r
-    public void disconnect() {\r
-       synchronized (this) {\r
-           if (watcher != null) {\r
-               watcher.disconnect();\r
-               watcher = null;\r
-           }\r
+\r
+       /*\r
+        * This must return remaining delay associated with the object!\r
+        * (non-Javadoc)\r
+        * \r
+        * @see java.util.concurrent.Delayed#getDelay(java.util.concurrent.TimeUnit)\r
+        */\r
+       @Override\r
+       public long getDelay(final TimeUnit unit) {\r
+               long idleTime = System.nanoTime() - lastAccessTime;\r
+               long delayVal = (delay == 0 ? defaultDelay : delay);\r
+               return unit.convert(delayVal - idleTime, TimeUnit.NANOSECONDS);\r
        }\r
-    }\r
-\r
-    boolean disconnected() {\r
-       return watcher == null;\r
-    }\r
-\r
-    @Override\r
-    public String toString() {\r
-       String value = "File: " + this.file.getAbsolutePath() + "\n";\r
-       value += "Delay (s): " + getDelayValue(TimeUnit.SECONDS) + "\n";\r
-       long exp = getDelay(TimeUnit.MILLISECONDS);\r
-       if (exp > 0) {\r
-           value += "Expire in (ms): " + exp + "\n";\r
-       } else {\r
-           value += "This object has expired" + "\n";\r
+\r
+       void setDelay(long delay, TimeUnit unit) {\r
+               assert delay > 0;\r
+               this.delay = TimeUnit.NANOSECONDS.convert(delay, unit);\r
+               assert delay < defaultDelay;\r
        }\r
-       value += "ChunkSize  " + this.chunkSize + "\n";\r
-       return value;\r
-    }\r
-\r
-    @Override\r
-    public boolean equals(Object obj) {\r
-       if (obj == null) {\r
-           return false;\r
+\r
+       long getDelayValue(TimeUnit unit) {\r
+               return (delay == 0\r
+                               ? unit.convert(defaultDelay, TimeUnit.NANOSECONDS)\r
+                               : unit.convert(delay, TimeUnit.NANOSECONDS));\r
+       }\r
+\r
+       public void disconnect() {\r
+               synchronized (this) {\r
+                       if (watcher != null) {\r
+                               watcher.disconnect();\r
+                               watcher = null;\r
+                       }\r
+               }\r
        }\r
-       if (!(obj instanceof FilePuller)) {\r
-           return false;\r
+\r
+       boolean disconnected() {\r
+               return watcher == null;\r
+       }\r
+\r
+       @Override\r
+       public String toString() {\r
+               String value = "File: " + this.file.getAbsolutePath() + "\n";\r
+               value += "Delay (s): " + getDelayValue(TimeUnit.SECONDS) + "\n";\r
+               long exp = getDelay(TimeUnit.MILLISECONDS);\r
+               if (exp > 0) {\r
+                       value += "Expire in (ms): " + exp + "\n";\r
+               } else {\r
+                       value += "This object has expired" + "\n";\r
+               }\r
+               value += "ChunkSize  " + this.chunkSize + "\n";\r
+               return value;\r
        }\r
-       FilePuller fp = (FilePuller) obj;\r
-       if (!this.file.equals(fp.file)) {\r
-           return false;\r
+\r
+       @Override\r
+       public boolean equals(Object obj) {\r
+               if (obj == null) {\r
+                       return false;\r
+               }\r
+               if (!(obj instanceof FilePuller)) {\r
+                       return false;\r
+               }\r
+               FilePuller fp = (FilePuller) obj;\r
+               if (!this.file.equals(fp.file)) {\r
+                       return false;\r
+               }\r
+               // Other fields does not matter\r
+               return true;\r
+       }\r
+\r
+       @Override\r
+       public int hashCode() {\r
+               return this.file.hashCode();\r
+       }\r
+\r
+       public byte getProgress() throws IOException {\r
+               initPull();\r
+               return watcher.getProgress();\r
        }\r
-       // Other fields does not matter\r
-       return true;\r
-    }\r
-\r
-    @Override\r
-    public int hashCode() {\r
-       return this.file.hashCode();\r
-    }\r
-\r
-    public byte getProgress() throws IOException {\r
-       initPull();\r
-       return watcher.getProgress();\r
-    }\r
 \r
 }\r
index 50a75c2..8e464c6 100644 (file)
@@ -49,7 +49,7 @@ public final class PulledFileCache {
         * the called to ensure this will not happen!\r
         * \r
         * @param fpuller\r
-        * @return\r
+        * @return true if the same filepooler is already in cache\r
         */\r
        public static boolean put(final FilePuller fpuller) {\r
                sweep();\r
index dae6696..db5992b 100644 (file)
@@ -116,9 +116,10 @@ public class CommandBuilder<T> {
        }\r
 \r
        boolean setParam(Parameter param) {\r
-               boolean overriden= paramList.put(param.name, param) != null;\r
-               if(overriden) {\r
-                       log.warn("Key " + param.name + " in the command list has been overriden! ");\r
+               boolean overriden = paramList.put(param.name, param) != null;\r
+               if (overriden) {\r
+                       log.warn("Key " + param.name\r
+                                       + " in the command list has been overriden! ");\r
                }\r
                return overriden;\r
        }\r
@@ -137,10 +138,9 @@ public class CommandBuilder<T> {
                // paramValue!\r
                // e.g. paramName could be a path to the file with spaces\r
                if (paramValue != null && paramName.contains(nameValueSeparator)) {\r
-                       log\r
-                                       .warn("WARN: paramName "\r
-                                                       + paramName\r
-                                                       + " contains nameValue separator. Removing the separator...");\r
+                       log.warn("WARN: paramName "\r
+                                       + paramName\r
+                                       + " contains nameValue separator. Removing the separator...");\r
                        paramName = paramName.trim().substring(0, paramName.length() - 1);\r
                }\r
                if (paramValue != null && paramName.contains(nameValueSeparator)) {\r
@@ -163,7 +163,7 @@ public class CommandBuilder<T> {
        }\r
 \r
        public boolean setParam(String paramName, String paramValue) {\r
-               return setParam( new Parameter(paramName, paramValue));\r
+               return setParam(new Parameter(paramName, paramValue));\r
        }\r
 \r
        public List<String> getCommands() {\r
@@ -198,7 +198,7 @@ public class CommandBuilder<T> {
         * is that it accepts a List of Options as an input\r
         * \r
         * @param arguments\r
-        * @return\r
+        * @return the instance of the CommandBuilder\r
         */\r
        public static <T> CommandBuilder<T> newCommandBuilder(\r
                        List<? extends Option<T>> arguments, String nameValueSeparator) {\r
@@ -216,7 +216,7 @@ public class CommandBuilder<T> {
        }\r
 \r
        boolean isWhiteSpaceSeparator() {\r
-               return nameValueSeparator.trim().length()==0;\r
+               return nameValueSeparator.trim().length() == 0;\r
        }\r
 \r
        List<Parameter> getCommandList() {\r
index 23d0793..14c023f 100644 (file)
@@ -249,7 +249,7 @@ public class ConfExecutable<T> implements ConfiguredExecutable<T> {
         * \r
         * @param <V>\r
         * @param clazz\r
-        * @return\r
+        * @return LimitsManager instance\r
         * @throws IOException\r
         */\r
        public static <V> LimitsManager<V> getRunnerLimits(Class<V> clazz)\r
index 92c5999..a10d82e 100644 (file)
@@ -82,7 +82,7 @@ public final class PathValidator {
         * Whether a certain path is absolute or not is operation system dependent!\r
         * \r
         * @param path\r
-        * @return\r
+        * @return true is the path is absolute, false otherwise\r
         */\r
        public static boolean isAbsolutePath(String path) {\r
                assert path != null : "Path is NULL! Not NULL path expected";\r
index a460062..058cc9c 100644 (file)
@@ -25,7 +25,7 @@ package compbio.engine.client;
  * handling\r
  * \r
  * @author pvtroshin\r
- * @date October 2009\r
+ * @version 1.0 October 2009\r
  * @param <T>\r
  */\r
 public interface PipedExecutable<T> extends Executable<T> {\r
index 634112f..aff3ca5 100644 (file)
@@ -272,7 +272,7 @@ public final class Util {
        /**\r
         * Returns the absolute path to the Java executable from JAVA_HOME\r
         * \r
-        * @return\r
+        * @return returns the absolute path to the Java executable from JAVA_HOME\r
         */\r
        public static String getJava() {\r
                String javahome = System.getProperty("java.home");\r
index 46debcc..940c4ad 100644 (file)
@@ -33,11 +33,11 @@ import compbio.metadata.ResultNotAvailableException;
  * Single cluster job runner class\r
  * \r
  * @author pvtroshin\r
- * @date August 2009\r
+ * @version 1.0 August 2009\r
  * \r
- *       TODO after call to submitJob() no setters really work as the job\r
- *       template gets deleted, this needs to be taken into account in this\r
- *       class design!\r
+ *          TODO after call to submitJob() no setters really work as the job\r
+ *          template gets deleted, this needs to be taken into account in this\r
+ *          class design!\r
  */\r
 public class AsyncJobRunner implements AsyncExecutor {\r
 \r
index e8b17b9..ca2f531 100644 (file)
@@ -207,8 +207,9 @@ public final class ClusterSession {
                // Once the job has been waited for it will be finished\r
                // Next time it will not be found in the session, so removed from the\r
                // job list\r
-               compbio.engine.client.Util.writeStatFile(compbio.engine.Configurator\r
-                               .getWorkDirectory(jobId), JobStatus.FINISHED.toString());\r
+               compbio.engine.client.Util.writeStatFile(\r
+                               compbio.engine.Configurator.getWorkDirectory(jobId),\r
+                               JobStatus.FINISHED.toString());\r
 \r
                return status;\r
        }\r
@@ -285,46 +286,46 @@ public final class ClusterSession {
         * in therms of a Sessions, not a JobStatus Should only be used for testing!\r
         * \r
         * @param status\r
-        * @return\r
+        * @return job status\r
         * @throws DrmaaException\r
         */\r
        @Deprecated\r
        public static String getJobStatus(final int status) throws DrmaaException {\r
                String statusString = null;\r
                switch (status) {\r
-               case Session.UNDETERMINED:\r
-                       statusString = "Job status cannot be determined\n";\r
-                       break;\r
-               case Session.QUEUED_ACTIVE:\r
-                       statusString = "Job is queued and active\n";\r
-                       break;\r
-               case Session.SYSTEM_ON_HOLD:\r
-                       statusString = "Job is queued and in system hold\n";\r
-                       break;\r
-               case Session.USER_ON_HOLD:\r
-                       statusString = "Job is queued and in user hold\n";\r
-                       break;\r
-               case Session.USER_SYSTEM_ON_HOLD:\r
-                       statusString = "Job is queued and in user and system hold\n";\r
-                       break;\r
-               case Session.RUNNING:\r
-                       statusString = "Job is running\n";\r
-                       break;\r
-               case Session.SYSTEM_SUSPENDED:\r
-                       statusString = "Job is system suspended\n";\r
-                       break;\r
-               case Session.USER_SUSPENDED:\r
-                       statusString = "Job is user suspended\n";\r
-                       break;\r
-               case Session.USER_SYSTEM_SUSPENDED:\r
-                       statusString = "Job is user and system suspended\n";\r
-                       break;\r
-               case Session.DONE:\r
-                       statusString = "Job finished normally\n";\r
-                       break;\r
-               case Session.FAILED:\r
-                       statusString = "Job finished, but failed\n";\r
-                       break;\r
+                       case Session.UNDETERMINED :\r
+                               statusString = "Job status cannot be determined\n";\r
+                               break;\r
+                       case Session.QUEUED_ACTIVE :\r
+                               statusString = "Job is queued and active\n";\r
+                               break;\r
+                       case Session.SYSTEM_ON_HOLD :\r
+                               statusString = "Job is queued and in system hold\n";\r
+                               break;\r
+                       case Session.USER_ON_HOLD :\r
+                               statusString = "Job is queued and in user hold\n";\r
+                               break;\r
+                       case Session.USER_SYSTEM_ON_HOLD :\r
+                               statusString = "Job is queued and in user and system hold\n";\r
+                               break;\r
+                       case Session.RUNNING :\r
+                               statusString = "Job is running\n";\r
+                               break;\r
+                       case Session.SYSTEM_SUSPENDED :\r
+                               statusString = "Job is system suspended\n";\r
+                               break;\r
+                       case Session.USER_SUSPENDED :\r
+                               statusString = "Job is user suspended\n";\r
+                               break;\r
+                       case Session.USER_SYSTEM_SUSPENDED :\r
+                               statusString = "Job is user and system suspended\n";\r
+                               break;\r
+                       case Session.DONE :\r
+                               statusString = "Job finished normally\n";\r
+                               break;\r
+                       case Session.FAILED :\r
+                               statusString = "Job finished, but failed\n";\r
+                               break;\r
                }\r
                return statusString;\r
        }\r
index 0e8b4ba..dbb312f 100644 (file)
@@ -29,7 +29,7 @@ import org.ggf.drmaa.JobTemplate;
 import org.ggf.drmaa.Session;\r
 import org.ggf.drmaa.SessionFactory;\r
 \r
-public class _DrmaaExample {\r
+class _DrmaaExample {\r
 \r
        private static int NBULKS = 3;\r
        private static int JOB_CHUNK = 8;\r
index 8ddaa5f..38b7410 100644 (file)
@@ -22,10 +22,8 @@ import org.ggf.drmaa.Session;
 import org.ggf.drmaa.SessionFactory;\r
 import org.ggf.drmaa.Version;\r
 \r
-public class _JobStatus {\r
+class _JobStatus {\r
 \r
-       \r
-       \r
        public static void main(String[] args) {\r
 \r
                SessionFactory factory = SessionFactory.getFactory();\r
index c0fbb0b..3ee2e0a 100644 (file)
  * must include this copyright and license notice.\r
  */\r
 package compbio.engine.cluster.dundee;\r
-import static compbio.engine.cluster.dundee._QueueConstraints.*;\r
+import static compbio.engine.cluster.dundee._QueueConstraints.FIRST_MEMORY_LIMIT;\r
+import static compbio.engine.cluster.dundee._QueueConstraints.LONG_TIME_LIMIT;\r
+import static compbio.engine.cluster.dundee._QueueConstraints.MAX_MEMORY_LIMIT;\r
+import static compbio.engine.cluster.dundee._QueueConstraints.SHORT_TIME_LIMIT;\r
 \r
+@Deprecated\r
 public enum _Queue {\r
 \r
        /*\r
-        * devel.q          4Gb or 16Gb          8 hour  I\r
-          64bit-pri.q  4Gb or 16Gb     24 hours        B\r
-       64bit.q         4Gb or 16Gb     None    B\r
-       bigint.q        32Gb            8 h     I\r
-       bigmem.q        32Gb            None    B \r
+        * devel.q 4Gb or 16Gb 8 hour I 64bit-pri.q 4Gb or 16Gb 24 hours B 64bit.q\r
+        * 4Gb or 16Gb None B bigint.q 32Gb 8 h I bigmem.q 32Gb None B\r
         */\r
 \r
        /**\r
         * Order of the constraint reflect the priority of the queue\r
         */\r
-       DEVEL(FIRST_MEMORY_LIMIT, SHORT_TIME_LIMIT,"devel.q"), \r
-       PRIBIT64(FIRST_MEMORY_LIMIT,LONG_TIME_LIMIT,"64bit-pri.q"), \r
-       BIT64(FIRST_MEMORY_LIMIT,0,"64bit.q"), \r
-       BIGINT(MAX_MEMORY_LIMIT,SHORT_TIME_LIMIT,"bigint.q"), \r
-       BIGMEM(MAX_MEMORY_LIMIT,0,"bigmem.q");\r
-       \r
-       \r
+       DEVEL(FIRST_MEMORY_LIMIT, SHORT_TIME_LIMIT, "devel.q"), PRIBIT64(\r
+                       FIRST_MEMORY_LIMIT, LONG_TIME_LIMIT, "64bit-pri.q"), BIT64(\r
+                       FIRST_MEMORY_LIMIT, 0, "64bit.q"), BIGINT(MAX_MEMORY_LIMIT,\r
+                       SHORT_TIME_LIMIT, "bigint.q"), BIGMEM(MAX_MEMORY_LIMIT, 0,\r
+                       "bigmem.q");\r
+\r
        int maxMemory;\r
        int maxRuntime;\r
        String qname;\r
        private _Queue(int maxMemory, int maxRuntime, String qname) {\r
-               this.maxMemory=maxMemory;\r
-               this.maxRuntime=maxRuntime;\r
-               this.qname = qname; \r
+               this.maxMemory = maxMemory;\r
+               this.maxRuntime = maxRuntime;\r
+               this.qname = qname;\r
        }\r
-       \r
+\r
        // -q 64bit.q -l qname=64bit.q -l h_vmem=8000M -l ram=8000M\r
        @Override\r
        public String toString() {\r
@@ -55,92 +55,98 @@ public enum _Queue {
 \r
        /**\r
         * 0 - unlimited\r
+        * \r
         * @return max runtime in hours\r
         */\r
-       public int getTimeLimit() { \r
+       public int getTimeLimit() {\r
                return this.maxRuntime;\r
        }\r
-       \r
+\r
        /**\r
         * \r
-        * @return true if the queue has time limit, false overwise \r
+        * @return true if the queue has time limit, false overwise\r
         */\r
-       public boolean hasTimeLimit()  { \r
-               return this.maxRuntime != 0; \r
+       public boolean hasTimeLimit() {\r
+               return this.maxRuntime != 0;\r
        }\r
        /**\r
         * return max memory limit in Mb\r
+        * \r
         * @return\r
         */\r
-       public int getMemoryLimit() { \r
+       public int getMemoryLimit() {\r
                return this.maxMemory;\r
        }\r
-       \r
-       public static _Queue getQueueByMemoryRequirements(int maxMemory) { \r
-               if(maxMemory>FIRST_MEMORY_LIMIT) {\r
+\r
+       public static _Queue getQueueByMemoryRequirements(int maxMemory) {\r
+               if (maxMemory > FIRST_MEMORY_LIMIT) {\r
                        return BIGMEM;\r
-               } else if(maxMemory<MAX_MEMORY_LIMIT)\r
-                       return BIT64; \r
-               else { \r
-                       throw new UnsupportedOperationException("Cluster does not support tasks requiring more than 30000M of memory");\r
+               } else if (maxMemory < MAX_MEMORY_LIMIT)\r
+                       return BIT64;\r
+               else {\r
+                       throw new UnsupportedOperationException(\r
+                                       "Cluster does not support tasks requiring more than 30000M of memory");\r
                }\r
        }\r
 \r
-       public static _Queue getQueue(int maxMemory, int timeLimitInHours) { \r
-               if(timeLimitInHours==0) { \r
+       public static _Queue getQueue(int maxMemory, int timeLimitInHours) {\r
+               if (timeLimitInHours == 0) {\r
                        return getQueueByMemoryRequirements(maxMemory);\r
-               } else { \r
-                       if(timeLimitInHours<=SHORT_TIME_LIMIT) { \r
-                               if(maxMemory<=FIRST_MEMORY_LIMIT) { \r
+               } else {\r
+                       if (timeLimitInHours <= SHORT_TIME_LIMIT) {\r
+                               if (maxMemory <= FIRST_MEMORY_LIMIT) {\r
                                        return DEVEL;\r
-                               }else if(maxMemory<=MAX_MEMORY_LIMIT){ \r
+                               } else if (maxMemory <= MAX_MEMORY_LIMIT) {\r
                                        return BIGINT;\r
-                               } else { \r
-                                       throw new UnsupportedOperationException("Cluster does not support tasks requiring more than 30000M of memory");\r
+                               } else {\r
+                                       throw new UnsupportedOperationException(\r
+                                                       "Cluster does not support tasks requiring more than 30000M of memory");\r
                                }\r
-                       } else { \r
+                       } else {\r
                                // timeLimit > 8\r
-                               if(timeLimitInHours <= LONG_TIME_LIMIT && maxMemory <=FIRST_MEMORY_LIMIT) { \r
-                                       return PRIBIT64; \r
-                               } else if( maxMemory<= MAX_MEMORY_LIMIT){ \r
+                               if (timeLimitInHours <= LONG_TIME_LIMIT\r
+                                               && maxMemory <= FIRST_MEMORY_LIMIT) {\r
+                                       return PRIBIT64;\r
+                               } else if (maxMemory <= MAX_MEMORY_LIMIT) {\r
                                        return BIGMEM;\r
-                               } else { \r
-                                       throw new UnsupportedOperationException("Cluster does not support tasks requiring more than 30000M of memory");\r
+                               } else {\r
+                                       throw new UnsupportedOperationException(\r
+                                                       "Cluster does not support tasks requiring more than 30000M of memory");\r
                                }\r
                        }\r
                }\r
        }\r
-       \r
-       public _Queue getQueue(String queueName) { \r
-               switch(this) { \r
-               case DEVEL: \r
-                       if ( queueName.equals(DEVEL.toString())) {  \r
-                               return DEVEL;\r
-                       }\r
-                       break;\r
-               case PRIBIT64: \r
-                       if ( queueName.equals(PRIBIT64.toString())) {  \r
-                               return PRIBIT64;\r
-                       }\r
-                       break;\r
-               case BIT64: \r
-                       if ( queueName.equals(BIT64.toString())) {  \r
-                               return BIT64;\r
-                       }\r
-                       break;\r
-               case BIGMEM: \r
-                       if ( queueName.equals(BIGMEM.toString())) {  \r
-                               return BIGMEM;\r
-                       }\r
-                       break;\r
-               case BIGINT: \r
-                       if ( queueName.equals(BIGINT.toString())) {  \r
-                               return BIGINT;\r
-                       }\r
-                       break; \r
+\r
+       public _Queue getQueue(String queueName) {\r
+               switch (this) {\r
+                       case DEVEL :\r
+                               if (queueName.equals(DEVEL.toString())) {\r
+                                       return DEVEL;\r
+                               }\r
+                               break;\r
+                       case PRIBIT64 :\r
+                               if (queueName.equals(PRIBIT64.toString())) {\r
+                                       return PRIBIT64;\r
+                               }\r
+                               break;\r
+                       case BIT64 :\r
+                               if (queueName.equals(BIT64.toString())) {\r
+                                       return BIT64;\r
+                               }\r
+                               break;\r
+                       case BIGMEM :\r
+                               if (queueName.equals(BIGMEM.toString())) {\r
+                                       return BIGMEM;\r
+                               }\r
+                               break;\r
+                       case BIGINT :\r
+                               if (queueName.equals(BIGINT.toString())) {\r
+                                       return BIGINT;\r
+                               }\r
+                               break;\r
                }\r
                // such queue appears to be not defined in the system!\r
-               return null; \r
+               return null;\r
        }\r
 \r
 }\r
index 2f69728..637136f 100644 (file)
  */\r
 package compbio.engine.cluster.dundee;\r
 \r
-public final class _QueueConstraints {\r
+@Deprecated\r
+final class _QueueConstraints {\r
 \r
-       private _QueueConstraints() {} \r
+       private _QueueConstraints() {\r
+       }\r
 \r
        public static final int SHORT_TIME_LIMIT = 8;\r
-       public static final int LONG_TIME_LIMIT = 24; \r
+       public static final int LONG_TIME_LIMIT = 24;\r
        public static final int FIRST_MEMORY_LIMIT = 14000;\r
-       public static final int MAX_MEMORY_LIMIT = 30000;       \r
-\r
+       public static final int MAX_MEMORY_LIMIT = 30000;\r
 \r
 }\r
index 939e5fe..fb35362 100644 (file)
@@ -23,8 +23,6 @@ import java.io.IOException;
 import java.net.URISyntaxException;\r
 import java.net.URL;\r
 \r
-import javax.naming.ConfigurationException;\r
-\r
 import org.apache.log4j.Logger;\r
 \r
 import compbio.util.PropertyHelper;\r
@@ -52,7 +50,7 @@ public final class PropertyHelperManager {
         * \r
         * Try 1 - succeed.\r
         * \r
-        * @return\r
+        * @return an instance\r
         */\r
        public static PropertyHelper getPropertyHelper() {\r
                if (ph == null) {\r
@@ -91,8 +89,9 @@ public final class PropertyHelperManager {
         * binaries WEB-INF classes compbio engine conf If the structure changes it\r
         * must be reflected in this method\r
         * \r
-        * @return\r
-        * @throws ConfigurationException\r
+        * @return the local path\r
+        * @throws RuntimeException\r
+        *             if cannot determine the local path\r
         */\r
        public static String getLocalPath() {\r
                String clname = PropertyHelperManager.class.getSimpleName();\r
index 570b43c..4fbd3a0 100644 (file)
@@ -60,8 +60,8 @@ public class RunnerConfigMarshaller<T> {
                        throws JAXBException {\r
 \r
                if (classes != null) {\r
-                       List<Class<?>> classesList = new ArrayList<Class<?>>(Arrays\r
-                                       .asList(classes));\r
+                       List<Class<?>> classesList = new ArrayList<Class<?>>(\r
+                                       Arrays.asList(classes));\r
                        classesList.add(rootClass);\r
                        ctx = JAXBContext.newInstance(classesList.toArray(new Class<?>[0]));\r
                } else {\r
@@ -109,7 +109,7 @@ public class RunnerConfigMarshaller<T> {
 \r
        /**\r
         * \r
-        * @return\r
+        * @return validator instance\r
         * @throws SAXException\r
         */\r
        public static Validator getValidator(String schemafile) throws SAXException {\r
@@ -182,8 +182,8 @@ public class RunnerConfigMarshaller<T> {
                }\r
                JAXBContext ctx = null;\r
                if (classes != null) {\r
-                       List<Class<?>> classesList = new ArrayList<Class<?>>(Arrays\r
-                                       .asList(classes));\r
+                       List<Class<?>> classesList = new ArrayList<Class<?>>(\r
+                                       Arrays.asList(classes));\r
                        classesList.add(resultElemType);\r
                        ctx = JAXBContext.newInstance(classesList.toArray(new Class<?>[0]));\r
                } else {\r
index 67343c7..a40abf3 100644 (file)
@@ -22,6 +22,7 @@ import javax.management.openmbean.InvalidKeyException;
 \r
 import compbio.util.Util;\r
 \r
+@Deprecated\r
 public final class _Key {\r
 \r
        public final static String DELIM = "#";\r
index cfc2916..d269aad 100644 (file)
@@ -47,10 +47,9 @@ public final class AsyncLocalRunner implements AsyncExecutor {
                                .getTask(jobId);\r
                // The job has already finished or cancelled.\r
                if (future == null) {\r
-                       log\r
-                                       .debug("Did not find future for local job "\r
-                                                       + jobId\r
-                                                       + " will not cancel it. Perhaps it has finished or cancelled already.");\r
+                       log.debug("Did not find future for local job "\r
+                                       + jobId\r
+                                       + " will not cancel it. Perhaps it has finished or cancelled already.");\r
                        return false;\r
                }\r
                LocalEngineUtil.cancelJob(future, getWorkDirectory(jobId));\r
@@ -88,7 +87,7 @@ public final class AsyncLocalRunner implements AsyncExecutor {
        /**\r
         * \r
         * @param jobId\r
-        * @return\r
+        * @return true if all files were removed, false otherwise\r
         */\r
        @Override\r
        public boolean cleanup(String jobId) {\r
index 04a0bd5..cbed001 100644 (file)
@@ -50,7 +50,7 @@ public final class LocalExecutorService extends ThreadPoolExecutor {
         * This method returns the single instance of CachedThreadPoolExecutor which\r
         * it cashes internally\r
         * \r
-        * @return\r
+        * @return the instance\r
         */\r
        public synchronized static LocalExecutorService getExecutor() {\r
                if (INSTANCE == null) {\r
index 5204049..ac0f848 100644 (file)
@@ -37,9 +37,11 @@ import java.util.concurrent.TimeUnit;
  * TODO it may be better to persists task from different place\r
  * \r
  * @author pvtroshin\r
- * @Date October 2009\r
+ * @version 1.0 October 2009\r
+ * @deprecated\r
  */\r
-public class _TrackingExecutor extends AbstractExecutorService {\r
+@Deprecated\r
+class _TrackingExecutor extends AbstractExecutorService {\r
 \r
        private final ExecutorService executor;\r
 \r
index 6f4125f..57ec660 100644 (file)
@@ -21,6 +21,7 @@ import java.net.UnknownServiceException;
 \r
 import compbio.engine.cluster.dundee._Queue;\r
 \r
+@Deprecated\r
 public class _NativeSpecHelper {\r
 \r
        int maxCalculationTime;\r
index c8f1373..3767ffb 100644 (file)
@@ -27,8 +27,10 @@ import compbio.engine.client.RunConfiguration;
 import compbio.metadata.Limit;\r
 import compbio.metadata.LimitsManager;\r
 \r
-public abstract class _SkeletalCommandBuilder implements\r
-               Executable<_SkeletalCommandBuilder> {\r
+@Deprecated\r
+public abstract class _SkeletalCommandBuilder\r
+               implements\r
+                       Executable<_SkeletalCommandBuilder> {\r
 \r
        String tmpDirectory;\r
        String name;\r
@@ -109,11 +111,11 @@ public abstract class _SkeletalCommandBuilder implements
                // TODO Auto-generated method stub\r
                return null;\r
        }\r
-       \r
+\r
        @Override\r
        public String getClusterJobSettings() {\r
                // TODO Auto-generated method stub\r
-               return null; \r
+               return null;\r
        }\r
 \r
 }\r
index e627462..54c7732 100644 (file)
@@ -50,7 +50,6 @@ public class Muscle extends SkeletalExecutable<Muscle> {
         * \r
         * -clwstrict - write output in clustal format\r
         * \r
-        * @param workDirectory\r
         */\r
        public Muscle() {\r
                /*\r
index 3d0f86a..532ba30 100644 (file)
@@ -43,8 +43,6 @@ public class Probcons extends SkeletalExecutable<Probcons>
        public static final String KEY_VALUE_SEPARATOR = Util.SPACE;\r
 \r
        /**\r
-        * \r
-        * @param workDirectory\r
         */\r
        public Probcons() {\r
                addParameters(Arrays.asList("-v", "-clustalw", "-annot", ANNOTATION));\r
index 0c76d21..645b994 100644 (file)
@@ -37,7 +37,8 @@ import compbio.runner.Util;
 import compbio.util.PropertyHelper;\r
 \r
 public class Tcoffee extends SkeletalExecutable<Tcoffee>\r
-               implements PipedExecutable<Tcoffee> {\r
+               implements\r
+                       PipedExecutable<Tcoffee> {\r
 \r
        private static Logger log = Logger.getLogger(Tcoffee.class);\r
 \r
@@ -58,8 +59,6 @@ public class Tcoffee extends SkeletalExecutable<Tcoffee>
        private final static String ncorePrm = "-n_core";\r
 \r
        /**\r
-        * \r
-        * @param workDirectory\r
         */\r
        public Tcoffee() {\r
                super(KEY_VALUE_SEPARATOR);\r
@@ -128,12 +127,11 @@ public class Tcoffee extends SkeletalExecutable<Tcoffee>
                        int cpunum = SkeletalExecutable.getClusterCpuNum(getType());\r
                        if (cpunum != 0) {\r
                                setNCore(cpunum);\r
-                       } \r
+                       }\r
                }\r
                return super.getParameters(provider);\r
        }\r
 \r
-\r
        @SuppressWarnings("unchecked")\r
        @Override\r
        public Class<Tcoffee> getType() {\r
index e06d58e..faaea67 100644 (file)
@@ -49,7 +49,7 @@ public interface RegistryWS extends JABAService {
         * tested or tested less then a one second ago.\r
         * \r
         * @param service\r
-        * @return\r
+        * @return when last time tested\r
         */\r
        int getLastTested(Services service);\r
        /**\r
index 61d9393..c094283 100644 (file)
@@ -113,7 +113,7 @@ public abstract class GenericMetadataService<T> {
         * \r
         * @param jobId\r
         * @param position\r
-        * @return\r
+        * @return ChunkHolder\r
         */\r
        public ChunkHolder pullExecStatistics(String jobId, long position) {\r
                // Execution stat is not supported\r
index 3230317..3e3a34b 100644 (file)
@@ -28,46 +28,47 @@ import javax.xml.ws.Endpoint;
  * @author pvtroshin\r
  * @date October 2009\r
  */\r
+@Deprecated\r
 public class SimpleWSPublisher {\r
 \r
-    public SimpleWSPublisher(Object exec, String context) {\r
+       public SimpleWSPublisher(Object exec, String context) {\r
 \r
-    }\r
+       }\r
 \r
-    public static void main(String[] args) {\r
-       if (args.length != 2) {\r
-           System.out.println("Usage: ");\r
-           System.out.println("SimpleWSPublisher context class");\r
-           System.out\r
-                   .println("where context is a context name, the name after the address by "\r
-                           + "which web service can be called e.g. Clustal "\r
-                           + " and class is a web service implementation class");\r
+       public static void main(String[] args) {\r
+               if (args.length != 2) {\r
+                       System.out.println("Usage: ");\r
+                       System.out.println("SimpleWSPublisher context class");\r
+                       System.out\r
+                                       .println("where context is a context name, the name after the address by "\r
+                                                       + "which web service can be called e.g. Clustal "\r
+                                                       + " and class is a web service implementation class");\r
 \r
+               }\r
+               String context = args[0];\r
+               String clazzName = args[1];\r
+               try {\r
+                       Class<?> clazz = Class.forName(clazzName);\r
+                       if (!clazz.isAnnotationPresent(WebService.class)) {\r
+                               System.out.println("Can only start web services. "\r
+                                               + "Please check whether the class provided is "\r
+                                               + "annotated with Webservice annotation");\r
+                               System.exit(1);\r
+                       }\r
+                       Endpoint.publish("http://127.0.0.1:7979/" + context,\r
+                                       clazz.newInstance());\r
+               } catch (InstantiationException e) {\r
+                       e.printStackTrace();\r
+                       System.exit(1);\r
+               } catch (IllegalAccessException e) {\r
+                       e.printStackTrace();\r
+                       System.exit(1);\r
+               } catch (ClassNotFoundException e) {\r
+                       e.printStackTrace();\r
+                       System.exit(1);\r
+               } catch (IllegalArgumentException e) {\r
+                       e.printStackTrace();\r
+                       System.exit(1);\r
+               }\r
        }\r
-       String context = args[0];\r
-       String clazzName = args[1];\r
-       try {\r
-           Class<?> clazz = Class.forName(clazzName);\r
-           if (!clazz.isAnnotationPresent(WebService.class)) {\r
-               System.out.println("Can only start web services. "\r
-                       + "Please check whether the class provided is "\r
-                       + "annotated with Webservice annotation");\r
-               System.exit(1);\r
-           }\r
-           Endpoint.publish("http://127.0.0.1:7979/" + context, clazz\r
-                   .newInstance());\r
-       } catch (InstantiationException e) {\r
-           e.printStackTrace();\r
-           System.exit(1);\r
-       } catch (IllegalAccessException e) {\r
-           e.printStackTrace();\r
-           System.exit(1);\r
-       } catch (ClassNotFoundException e) {\r
-           e.printStackTrace();\r
-           System.exit(1);\r
-       } catch (IllegalArgumentException e) {\r
-           e.printStackTrace();\r
-           System.exit(1);\r
-       }\r
-    }\r
 }\r