JAL-3144 SequenceFetcher without JDatabaseTree
[jalview.git] / src / jalview / fts / service / pdb / PDBFTSRestClient.java
index a5b441f..301cb16 100644 (file)
@@ -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<ClientResponse> 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)