From f4ce96548d478b01489f7a9157badb6efb1362bd Mon Sep 17 00:00:00 2001 From: Charles Ofoegbu Date: Mon, 20 Oct 2014 10:39:17 +0100 Subject: [PATCH 1/1] Removed dependency for Jersey webservice lib and updated code to use HttpClientUtils class. --- src/jalview/ws/intermine/IntermineFetchClient.java | 24 -------------------- 1 file changed, 24 deletions(-) diff --git a/src/jalview/ws/intermine/IntermineFetchClient.java b/src/jalview/ws/intermine/IntermineFetchClient.java index 535959f..321bb85 100644 --- a/src/jalview/ws/intermine/IntermineFetchClient.java +++ b/src/jalview/ws/intermine/IntermineFetchClient.java @@ -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 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 -- 1.7.10.2