Map<String, Object> jsonObj, FTSRestRequest tdbRestRequest)
{
FTSRestResponse searchResult = new FTSRestResponse();
- //searchResult.setNumberOfItemsFound(1);
List<FTSData> result = null;
try
{
jsonObj = (Map<String, Object>) JSONUtils.parse(tdbJsonResponseString);
}
- System.out.println(jsonObj);
- //Map<String, Object> tdbResponse = (Map<String, Object>) jsonObj.get("structures");
+ //System.out.println(jsonObj);
+
+ Object uniprot_entry = jsonObj.get("uniprot_entry");
+ System.out.println(uniprot_entry);
- //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);
+ System.out.println("seqLenght :" + 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));
+ //Map<String, Object> tdbResponse = (Map<String, Object>) jsonObj.get("structures");
+
int numFound = 0;
for (Iterator<Object> strucIter = structures.iterator(); strucIter
.hasNext();)
numFound++;
//System.out.println(structure);
}
- //System.out.println(structures);
+
System.out.println("1 : " + structures.get(1));
searchResult.setNumberOfItemsFound(numFound);
searchResult.setSearchSummary(result);
request.setSearchTerm("01308.json");
request.setWantedFields(wantedFields);
System.out.println("request : " + request.getFieldToSearchBy());
- System.out.println(request.toString());
+ //System.out.println(request.toString());
FTSRestResponse response;
try
return;
}
assertTrue(response.getSearchSummary() != null);
- assertTrue(response.getNumberOfItemsFound() > 99);
+ assertTrue(response.getNumberOfItemsFound() > 3);
System.out.println(response.getSearchSummary());
System.out.println(response.getSearchSummary().size());
}