Removed dependency for Jersey webservice lib and updated code to use HttpClientUtils...
authorCharles Ofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 20 Oct 2014 09:39:17 +0000 (10:39 +0100)
committerCharles Ofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 20 Oct 2014 09:39:17 +0000 (10:39 +0100)
src/jalview/ws/intermine/IntermineFetchClient.java

index 535959f..321bb85 100644 (file)
@@ -4,16 +4,12 @@ import jalview.ws.HttpClientUtils;
 
 import java.io.IOException;
 
-import javax.ws.rs.core.MultivaluedMap;
-
 import org.apache.http.client.ClientProtocolException;
 
-import com.sun.jersey.api.client.Client;
 
 public class IntermineFetchClient
 {
 
-  private static final Client client = Client.create();
 
   public static enum IntermineDB
   {
@@ -78,26 +74,6 @@ public class IntermineFetchClient
 
   }
 
-  public static String fetchData(IntermineDB Database,
-          IntermineMethod method, MultivaluedMap<String, String> params)
-  {
-    String response = "";
-    if (params.isEmpty())
-    {
-
-      response = client.resource(Database.getURL() + method.getTarget())
-              .accept("text/plain")
-              .get(String.class);
-
-    }
-    else
-    {
-      response = client.resource(Database.getURL() + method.getTarget())
-              .queryParams(params)
-              .get(String.class);
-    }
-    return response;
-  }
 
   public static String fetchData(String url)
           throws ClientProtocolException, IOException