remove p+3 < query.length
authoramwaterhouse <Andrew Waterhouse>
Tue, 27 Feb 2007 13:37:31 +0000 (13:37 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 27 Feb 2007 13:37:31 +0000 (13:37 +0000)
src/jalview/io/EBIFetchClient.java

index b71e152..292247f 100755 (executable)
@@ -118,29 +118,6 @@ public class EBIFetchClient
     }
   }
 
-  public static void main(String[] args)
-  {
-    EBIFetchClient ebi = new EBIFetchClient();
-    String[] result = ebi.fetchData("uniprot:25KD_SARPE;G6PD_HUMAN",
-                                    "xml", null);
-
-    try
-    {
-      java.io.PrintWriter out = new java.io.PrintWriter(
-          new java.io.FileWriter("out.xml"));
-
-      for (int i = 0; i < result.length; i++)
-      {
-        out.println(result[i]);
-      }
-      out.close();
-    }
-    catch (Exception ex)
-    {
-      ex.printStackTrace();
-    }
-
-  }
 
   public File fetchDataAsFile(String ids, String f, String s)
   {
@@ -177,7 +154,6 @@ public class EBIFetchClient
   {
     // Need to split
     // ids of the form uniprot:25KD_SARPE;ADHR_DROPS;
-
     StringTokenizer queries = new StringTokenizer(ids, ";");
     String db = null;
     StringBuffer querystring = null;
@@ -185,7 +161,7 @@ public class EBIFetchClient
     {
       String query = queries.nextToken();
       int p;
-      if ( (p = query.indexOf(':')) > -1 && (p + 3 < query.length()))
+      if ( (p = query.indexOf(':')) > -1)
       {
         db = query.substring(0, p);
         query = query.substring(p + 1);