X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=blobdiff_plain;f=src%2Fjalview%2Ffts%2Fservice%2Fpdb%2FPDBFTSRestClient.java;h=301cb16759f42d4818c4c601756c05c61a0733a7;hp=a5b441f10877c2a3f6a48b93542966fb66c5b6a2;hb=81667097b92ba72f5eb4d824646b31e7ff5383a0;hpb=a944dbc2b3c42f94c3e0c4c4dcb5bad1fe49f1cb diff --git a/src/jalview/fts/service/pdb/PDBFTSRestClient.java b/src/jalview/fts/service/pdb/PDBFTSRestClient.java index a5b441f..301cb16 100644 --- a/src/jalview/fts/service/pdb/PDBFTSRestClient.java +++ b/src/jalview/fts/service/pdb/PDBFTSRestClient.java @@ -43,26 +43,15 @@ import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; -//import jalview.javascript.web.Client; -//import jalview.javascript.web.ClientResponse; -//import jalview.javascript.web.WebResource; - import com.sun.jersey.api.client.Client; import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.WebResource; - -import com.sun.jersey.api.client.config.ClientConfig; import com.sun.jersey.api.client.config.DefaultClientConfig; /** * A rest client for querying the Search endpoint of the PDB API * - * BH 2018: just a tiny tweak here - for SwingJS, we coerce the classes to be - * from jalview.javascript.web instead of com.sun.jersey.api.client - * - * * @author tcnofoegbu - * */ public class PDBFTSRestClient extends FTSRestClient { @@ -90,9 +79,6 @@ public class PDBFTSRestClient extends FTSRestClient { try { - Client client; - WebResource webResource; - String wantedFields = getDataColumnsFieldsAsCommaDelimitedString( pdbRestRequest.getWantedFields()); int responseSize = (pdbRestRequest.getResponseSize() == 0) @@ -137,6 +123,7 @@ public class PDBFTSRestClient extends FTSRestClient // BH 2018 the trick here is to coerce the classes in Javascript to be // different from the ones in Java yet still allow this to be correct for Java + Client client; Class clientResponseClass; if (/** @j2sNative true || */ false) @@ -152,6 +139,7 @@ public class PDBFTSRestClient extends FTSRestClient clientResponseClass = ClientResponse.class; } + WebResource webResource; if (pdbRestRequest.isFacet()) { webResource = client.resource(PDB_SEARCH_ENDPOINT)