Merge branch 'JABAWS_Release_2_0'
[jabaws.git] / runner / compbio / runner / _NativeSpecHelper.java
diff --git a/runner/compbio/runner/_NativeSpecHelper.java b/runner/compbio/runner/_NativeSpecHelper.java
deleted file mode 100644 (file)
index 57ec660..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/* Copyright (c) 2011 Peter Troshin\r
- *  \r
- *  JAva Bioinformatics Analysis Web Services (JABAWS) @version: 2.0     \r
- * \r
- *  This library is free software; you can redistribute it and/or modify it under the terms of the\r
- *  Apache License version 2 as published by the Apache Software Foundation\r
- * \r
- *  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without\r
- *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache \r
- *  License for more details.\r
- * \r
- *  A copy of the license is in apache_license.txt. It is also available here:\r
- * @see: http://www.apache.org/licenses/LICENSE-2.0.txt\r
- * \r
- * Any republication or derived work distributed in source code form\r
- * must include this copyright and license notice.\r
- */\r
-package compbio.runner;\r
-\r
-import java.net.UnknownServiceException;\r
-\r
-import compbio.engine.cluster.dundee._Queue;\r
-\r
-@Deprecated\r
-public class _NativeSpecHelper {\r
-\r
-       int maxCalculationTime;\r
-       int requiredMemory;\r
-       String queue;\r
-\r
-       public _NativeSpecHelper(int requiredMemory) {\r
-               this(requiredMemory, 0);\r
-       }\r
-\r
-       public _NativeSpecHelper(int requiredMemory, int maxCalculationTime) {\r
-               this.requiredMemory = requiredMemory;\r
-               this.maxCalculationTime = maxCalculationTime;\r
-       }\r
-\r
-       public void setRequiredMemory(int memory) {\r
-               this.requiredMemory = memory;\r
-       }\r
-\r
-       int getRequiredMemory() {\r
-               return requiredMemory;\r
-       }\r
-\r
-       public void setQueue(String queue) {\r
-               this.queue = queue;\r
-       }\r
-\r
-       public String getQueue() {\r
-               return queue;\r
-       }\r
-\r
-       // -q 64bit.q -l qname=64bit.q -l h_vmem=8000M -l ram=8000M\r
-       public String getNativeSpec() throws UnknownServiceException {\r
-               if (queue == null) {\r
-                       queue = getApproprieteQueue().toString();\r
-               } else {\r
-                       // check whether chosen queue suits for memory and runtime settings\r
-                       _Queue knownQueue = _Queue.BIGINT.getQueue(queue);\r
-                       if (knownQueue == null) {\r
-                               throw new UnknownServiceException("Queue " + queue\r
-                                               + " is not regestered in the system! ");\r
-                       }\r
-                       if (this.requiredMemory <= knownQueue.getMemoryLimit()) {\r
-                               throw new UnknownServiceException("Queue " + queue\r
-                                               + " has a memory limit of "\r
-                                               + knownQueue.getMemoryLimit()\r
-                                               + "M - which is smaller than requested!");\r
-                       }\r
-                       if (knownQueue.hasTimeLimit()\r
-                                       && this.maxCalculationTime <= knownQueue.getTimeLimit()) {\r
-                               throw new UnknownServiceException("Queue " + queue\r
-                                               + " has a time limit of " + knownQueue.getTimeLimit()\r
-                                               + "hours - which is smaller than requested!");\r
-                       }\r
-               }\r
-               return "-q " + queue.toString() + "-l qname=" + queue.toString()\r
-                               + ", h_vmem=" + requiredMemory + "M,ram=" + requiredMemory\r
-                               + "M";\r
-       }\r
-\r
-       public _Queue getApproprieteQueue() {\r
-               return _Queue.getQueue(requiredMemory, maxCalculationTime);\r
-       }\r
-\r
-}\r