_group.sort_order
g1;Miscellaneous;2
g2;Name;1
+g3;Quality;3
#
_data_column.primary_key;id
_data_column.default_response_page_size;100
Uniprot Id;id;String;g2;80;150;85;true;true
UniProt Accession;uniprot_accession;String;g2;50;400;95;true;false
Entry Name;entry name;String;g2;100;150;105;true;true
+Url;model_url;String;g1;100;150;105;true;true
+Qmean;qmean_avg_local_score;double;g3;100;150;105;true;true
{
jsonObj = (Map<String, Object>) JSONUtils.parse(tdbJsonResponseString);
}
- //System.out.println(jsonObj);
Object uniprot_entry = jsonObj.get("uniprot_entry");
- System.out.println(uniprot_entry);
-
Long seqLength = (Long) ((Map<String, Object>) jsonObj.get("uniprot_entry")).get("sequence_length");
- System.out.println("seqLenght :" + seqLength);
+ //System.out.println(uniprot_entry);
+ //System.out.println(jsonObj);
+ //System.out.println("seqLenght :" + seqLength);
- result = new ArrayList<>();
+ //Map<String, Object> tdbResponse = (Map<String, Object>) jsonObj.get("structures");
List<Object> structures = (List<Object>) jsonObj.get("structures");
- //Map<String, Object> tdbResponse = (Map<String, Object>) jsonObj.get("structures");
+ result = new ArrayList<>();
int numFound = 0;
- for (Iterator<Object> strucIter = structures.iterator(); strucIter
- .hasNext();)
+ for (Iterator<Object> strucIter = structures.iterator(); strucIter.hasNext();)
{
Map<String, Object> structure = (Map<String, Object>) strucIter.next();
result.add(getFTSData(structure, tdbRestRequest));
Collection<FTSDataColumnI> displayFields = tdbRequest.getWantedFields();
int colCounter = 0;
summaryRowData = new Object[displayFields.size()];
+
for (FTSDataColumnI field : displayFields) {
+ System.out.println("Field " + field);
String fieldData = (tdbJsonStructure.get(field.getCode()) == null) ? " "
: tdbJsonStructure.get(field.getCode()).toString();
+ System.out.println("Field Data : " + fieldData);
if (field.isPrimaryKeyColumn())
{
primaryKey = fieldData;
: fieldData;
} catch (Exception e)
{
- e.printStackTrace();
+ //e.printStackTrace();
System.out.println("offending value:" + fieldData);
}
}
wantedFields.add(TDBeaconsFTSRestClient.getInstance()
.getDataColumnByNameOrCode("id"));
wantedFields.add(TDBeaconsFTSRestClient.getInstance()
- .getDataColumnByNameOrCode("uniprot_accession"));
+ .getDataColumnByNameOrCode("model_url"));
wantedFields.add(TDBeaconsFTSRestClient.getInstance()
- .getDataColumnByNameOrCode("entry name"));
+ .getDataColumnByNameOrCode("qmean_avg_local_score"));
} catch (Exception e1)
{
e1.printStackTrace();
FTSRestRequest request = new FTSRestRequest();
request.setResponseSize(100);
request.setFieldToSearchBy("P");
- request.setSearchTerm("01308.json");
+ request.setSearchTerm("01318.json");
request.setWantedFields(wantedFields);
System.out.println("request : " + request.getFieldToSearchBy());
//System.out.println(request.toString());