: fetcher.getProgressIndicator();
}
- public int TDBeaconsFTSPanel2(String result)
- {
- int seqlength = executeParse(result);
- return seqlength;
- }
+// public int TDBeaconsFTSPanel2(String result)
+// {
+// int seqlength = executeParse(result);
+// return seqlength;
+// }
public static int executeParse(String query) {
BufferedReader reader;
JSONArray structures = entry.getJSONArray("structures");
for (int i=0 ; i < structures.length() ; i++) {
String id = structures.getJSONObject(i).getString("model_identifier");
- System.out.println("identifier num " + i + " : " + id);
+ //System.out.println("identifier num " + i + " : " + id);
}
System.out.println("length : " + length + "; access name : " + ac);
return length;
{
try
{
- // Removed wantedFields, sortParam & facetPivot from PDBFTSRClient
- String wantedFields = getDataColumnsFieldsAsCommaDelimitedString(
- tdbRestRequest.getWantedFields());
- int responseSize = (tdbRestRequest.getResponseSize() == 0)
- ? getDefaultResponsePageSize()
- : tdbRestRequest.getResponseSize();
- //int offSet = pdbRestRequest.getOffSet();
-
String query = tdbRestRequest.getFieldToSearchBy()
+ tdbRestRequest.getSearchTerm();
Client client;
clientResponseClass = ClientResponse.class;
}
WebResource webResource;
- webResource = client.resource(DEFAULT_THREEDBEACONS_DOMAIN).path(query);
+ webResource = client.resource(DEFAULT_THREEDBEACONS_DOMAIN)
+ .path(query);
URI uri = webResource.getURI();
-// .queryParam("P", query);
-// .queryParam("rows", String.valueOf(responseSize))
-// .queryParam("P",query);
-// URI uri = webResource.getURI();
System.out.println(uri.toString());
// Execute the REST request
Map<String, Object> jsonObj = null;
String responseString = null;
- //System.out.println("query >>>>>>> " + tdbRestRequest.toString());
-
// Check the response status and report exception if one occurs
int responseStatus = clientResponse.getStatus();
switch (responseStatus)
{
- // if succesful
+ // if success
case 200:
if (Platform.isJS())
{
{
jsonObj = (Map<String, Object>) JSONUtils.parse(tdbJsonResponseString);
}
+ System.out.println(jsonObj);
//Map<String, Object> tdbResponse = (Map<String, Object>) jsonObj.get("structures");
- //String seqLength = tdbEntry.get("sequence_length").toString();
- //int seqLength = Integer.valueOf(tdbEntry.get("sequence_length").toString());
+ //System.out.println((Map<String, Object>) jsonObj.get("uniprot_entry"));
Long seqLength = (Long) ((Map<String, Object>) jsonObj.get("uniprot_entry")).get("sequence_length");
+ System.out.println(seqLength);
result = new ArrayList<>();
List<Object> structures = (List<Object>) jsonObj.get("structures");
+ //System.out.println(jsonObj.get("structures"));
+ //System.out.println(structures);
+ System.out.println("ZERO : " + structures.get(0));
+ System.out.println("1 : " + structures.get(1));
int numFound = 0;
for (Iterator<Object> strucIter = structures.iterator(); strucIter
.hasNext();)
Map<String, Object> structure = (Map<String, Object>) strucIter.next();
result.add(getFTSData(structure, tdbRestRequest));
numFound++;
+ //System.out.println(structure);
}
- searchResult.setNumberOfItemsFound(numFound);
- searchResult.setSearchSummary(result);
- searchResult.setSequenceLength(seqLength);
+ //System.out.println(structures);
+ System.out.println("1 : " + structures.get(1));
+ searchResult.setNumberOfItemsFound(numFound);
+ searchResult.setSearchSummary(result);
+ searchResult.setSequenceLength(seqLength);
} catch (ParseException e)
{