JAL-3829 proof in principle 3d-beacons sequence fetcher - still some TODOs !
[jalview.git] / src / jalview / fts / service / threedbeacons / TDBeaconsFTSRestClient.java
index b55d9b1..e956461 100644 (file)
@@ -32,7 +32,7 @@ import jalview.util.Platform;
 public class TDBeaconsFTSRestClient extends FTSRestClient
 {
   private static final String DEFAULT_THREEDBEACONS_DOMAIN = 
-          "https://wwwdev.ebi.ac.uk/pdbe/pdbe-kb/3dbeacons-hub-api/uniprot/";
+          "https://wwwdev.ebi.ac.uk/pdbe/pdbe-kb/3dbeacons/api/uniprot/summary/";
   
   private static FTSRestClientI instance = null;
   
@@ -47,8 +47,7 @@ public class TDBeaconsFTSRestClient extends FTSRestClient
   {
     try
     {
-      String query = tdbRestRequest.getFieldToSearchBy()
-              + tdbRestRequest.getSearchTerm();
+      String query = tdbRestRequest.getSearchTerm();
       Client client;
       Class<ClientResponse> clientResponseClass;
       if (Platform.isJS())
@@ -190,13 +189,13 @@ private static FTSData getFTSData(Map<String, Object> tdbJsonStructure,
     for (FTSDataColumnI field : displayFields) {
       String fieldData = (tdbJsonStructure.get(field.getCode()) == null) ? " " 
               : tdbJsonStructure.get(field.getCode()).toString();
-      System.out.println("Field : " + field + "  Data : " + fieldData);
+      // System.out.println("Field : " + field + "  Data : " + fieldData);
       if (field.isPrimaryKeyColumn())
       {
         primaryKey = fieldData;
         summaryRowData[colCounter++] = primaryKey;
       }
-      else if (fieldData == null || fieldData.isEmpty())
+      else if (fieldData == null || fieldData.trim().isEmpty())
       {
         summaryRowData[colCounter++] = null;
       }