*/
public abstract class StructureChooserQuerySource
{
- protected FTSRestRequest lastPdbRequest;
-
- protected FTSRestClientI pdbRestClient;
protected FTSDataColumnPreferences docFieldPrefs;
public TableModel getTableModel(
Collection<FTSData> discoveredStructuresSet)
{
- return FTSRestResponse.getTableModel(lastPdbRequest,
+ return FTSRestResponse.getTableModel(getLastFTSRequest(),
discoveredStructuresSet);
}
+ protected abstract FTSRestRequest getLastFTSRequest();
+
public abstract PDBEntry[] collectSelectedRows(JTable restable,
int[] selectedRows, List<SequenceI> selectedSeqsToView);
import jalview.datamodel.PDBEntry;
import jalview.datamodel.SequenceI;
import jalview.fts.api.FTSDataColumnI;
+import jalview.fts.api.FTSRestClientI;
import jalview.fts.core.FTSDataColumnPreferences;
import jalview.fts.core.FTSDataColumnPreferences.PreferenceSource;
import jalview.fts.core.FTSRestRequest;
import jalview.util.MessageManager;
/**
- * logic for querying the PDBe API for structures of sequences
+ * logic for querying the 3DBeacons API for structures of sequences
*
* @author jprocter
*/
private static int MAX_QLENGTH = 7820;
+ protected FTSRestRequest lastTdbRequest;
+
+ protected FTSRestClientI tdbRestClient;
+
public ThreeDBStructureChooserQuerySource()
{
- pdbRestClient = TDBeaconsFTSRestClient.getInstance();
+ tdbRestClient = TDBeaconsFTSRestClient.getInstance();
docFieldPrefs = new FTSDataColumnPreferences(
PreferenceSource.STRUCTURE_CHOOSER,
TDBeaconsFTSRestClient.getInstance());
FilterOption selectedFilterOpt, boolean b) throws Exception
{
FTSRestResponse resultList;
- FTSRestRequest pdbRequest = getTDBeaconsRequest(seq, wantedFields);
- resultList = pdbRestClient.executeRequest(pdbRequest);
+ FTSRestRequest tdbRequest = getTDBeaconsRequest(seq, wantedFields);
+ resultList = tdbRestClient.executeRequest(tdbRequest);
- lastPdbRequest = pdbRequest;
+ lastTdbRequest = tdbRequest;
return resultList;
}
return null;
}
pdbRequest.setResponseSize(1);
- resultList = pdbRestClient.executeRequest(pdbRequest);
+ resultList = tdbRestClient.executeRequest(pdbRequest);
// TODO: client side filtering - sort results and pick top one (or N)
- lastPdbRequest = pdbRequest;
+ lastTdbRequest = pdbRequest;
return resultList;
}
}
return pdbEntriesToView;
}
+
+
+ @Override
+ protected FTSRestRequest getLastFTSRequest()
+ {
+ return lastTdbRequest;
+ }
}
\ No newline at end of file