GPL license added
[jalview.git] / src / jalview / io / WSWUBlastClient.java
index 1622187..fd82c9e 100755 (executable)
@@ -1,3 +1,22 @@
+/*\r
+* Jalview - A Sequence Alignment Editor and Viewer\r
+* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+*\r
+* This program is free software; you can redistribute it and/or\r
+* modify it under the terms of the GNU General Public License\r
+* as published by the Free Software Foundation; either version 2\r
+* of the License, or (at your option) any later version.\r
+*\r
+* This program is distributed in the hope that it will be useful,\r
+* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+* GNU General Public License for more details.\r
+*\r
+* You should have received a copy of the GNU General Public License\r
+* along with this program; if not, write to the Free Software\r
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
+*/\r
+\r
 package jalview.io;\r
 \r
 import org.apache.axis.client.*;\r
@@ -11,18 +30,14 @@ import java.awt.*;
 \r
 public class WSWUBlastClient\r
 {\r
-  JInternalFrame outputFrame = new JInternalFrame();\r
-  CutAndPasteTransfer output = new CutAndPasteTransfer(false);\r
+  CutAndPasteTransfer output = new CutAndPasteTransfer();\r
   int jobsRunning = 0;\r
 \r
   public WSWUBlastClient(AlignmentI al, ArrayList ids)\r
   {\r
-\r
-    output.formatForOutput();\r
-    outputFrame.setContentPane(output);\r
     output.setText("To display sequence features an exact Uniprot id with 100% sequence identity match must be entered."\r
                 +"\nIn order to display these features, try changing the names of your sequences to the ids suggested below.");\r
-    Desktop.addInternalFrame(outputFrame, "BLASTing for unidentified sequences ", 800,300);\r
+    Desktop.addInternalFrame(output, "BLASTing for unidentified sequences ", 800,300);\r
 \r
     for(int i=0; i<ids.size(); i++)\r
     {\r
@@ -65,8 +80,8 @@ public class WSWUBlastClient
           Thread.sleep(100);\r
           imageIndex++;\r
           imageIndex %=9;\r
-          outputFrame.setFrameIcon( imageIcon[imageIndex]);\r
-          outputFrame.setTitle("BLASTing for unidentified sequences - "+jobsRunning+" jobs running.");\r
+          output.setFrameIcon( imageIcon[imageIndex]);\r
+          output.setTitle("BLASTing for unidentified sequences - "+jobsRunning+" jobs running.");\r
 \r
         }catch(Exception ex){}\r
 \r
@@ -111,7 +126,7 @@ public class WSWUBlastClient
                 jobsRunning --;\r
           }\r
           Thread.sleep(5000);\r
-          System.out.println("I'm alive "+seqid+" "+jobid);\r
+          // System.out.println("WSWuBlastClient: I'm alive "+seqid+" "+jobid); // log.debug\r
         }\r
         catch (Exception ex)\r
         {}\r
@@ -140,12 +155,12 @@ public class WSWUBlastClient
         String result = (String) call.invoke(new Object[]\r
                                              {params, seqbytes});\r
         jobid = result;\r
-        System.out.println(jobid);\r
+        System.out.println("http://www.ebi.ac.uk/cgi-bin/webservices/WSWUBlast JobId '"+jobid+"'");\r
 \r
       }\r
       catch (Exception exp)\r
       {\r
-        System.err.println("ERROR:\n" + exp.toString());\r
+        System.err.println("WSWUBlastClient error:\n" + exp.toString());\r
         exp.printStackTrace();\r
       }\r
     }\r