g2;Name;1
g3;Quality;3
#
-_data_column.primary_key;id
+_data_column.primary_key;model_identifier
_data_column.default_response_page_size;100
#
_data_column.name
_data_column.preferred_col_width
_data_column.is_shown_by_default
_data_column.is_searchable
+Sequence;aligned_sequence;String;g1;80;150;85;true;true
+Model id;model_identifier;String;g2;80;150;85;true;true
+Provider;provider;String;g1;80;150;85;true;true
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
for (FTSDataColumnI field : diplayFields)
{
+ //System.out.println("Field " + field);
String fieldData = (pdbJsonDoc.get(field.getCode()) == null) ? ""
: pdbJsonDoc.get(field.getCode()).toString();
+ //System.out.println("Field Data : " + fieldData);
if (field.isPrimaryKeyColumn())
{
primaryKey = fieldData;
//System.out.println(structure);
}
- System.out.println("1 : " + structures.get(1));
+ //System.out.println("1 : " + structures.get(1));
searchResult.setNumberOfItemsFound(numFound);
searchResult.setSearchSummary(result);
searchResult.setSequenceLength(seqLength);
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);
+ System.out.println("Field : " + field + " Data : " + fieldData);
if (field.isPrimaryKeyColumn())
{
primaryKey = fieldData;
} catch (Exception e)
{
//e.printStackTrace();
- System.out.println("offending value:" + fieldData);
+ System.out.println("offending value:" + fieldData + fieldData);
}
}
}
{
e1.printStackTrace();
}
+ System.out.println("wantedFields >>" + wantedFields);
+
FTSRestRequest request = new FTSRestRequest();
request.setAllowEmptySeq(false);
assertTrue(response.getSearchSummary() != null);
assertTrue(response.getNumberOfItemsFound() == 931);
assertTrue(response.getSearchSummary().size() == 14);
+ System.out.println("Search summary : " + response.getSearchSummary());
}
@Test(groups = { "Functional" })
try
{
wantedFields.add(TDBeaconsFTSRestClient.getInstance()
- .getDataColumnByNameOrCode("id"));
+ .getDataColumnByNameOrCode("Model id"));
wantedFields.add(TDBeaconsFTSRestClient.getInstance()
.getDataColumnByNameOrCode("uniprot_accession"));
wantedFields.add(TDBeaconsFTSRestClient.getInstance()
}
try
{
- assertEquals(1, PDBFTSRestClient.getInstance()
+ assertEquals(1, TDBeaconsFTSRestClient.getInstance()
.getPrimaryKeyColumIndex(wantedFields, true));
-// assertEquals(4, PDBFTSRestClient.getInstance()
-// .getPrimaryKeyColumIndex(wantedFields, false));
+// assertEquals(3, TDBeaconsFTSRestClient.getInstance()
+// .getPrimaryKeyColumIndex(wantedFields, true));
} catch (Exception e)
{
e.printStackTrace();
try
{
wantedFields.add(TDBeaconsFTSRestClient.getInstance()
- .getDataColumnByNameOrCode("id"));
+ .getDataColumnByNameOrCode("Model id"));
wantedFields.add(TDBeaconsFTSRestClient.getInstance()
.getDataColumnByNameOrCode("model_url"));
wantedFields.add(TDBeaconsFTSRestClient.getInstance()
+ .getDataColumnByNameOrCode("provider"));
+ wantedFields.add(TDBeaconsFTSRestClient.getInstance()
.getDataColumnByNameOrCode("qmean_avg_local_score"));
} catch (Exception e1)
{
return;
}
assertTrue(response.getSearchSummary() != null);
- assertTrue(response.getNumberOfItemsFound() > 3);
- System.out.println(response.getSearchSummary());
- System.out.println(response.getSearchSummary().size());
+ assertTrue(response.getNumberOfItemsFound() > 3); //4 atm
+ System.out.println("Search summary : \n" + response.getSearchSummary());
+ //System.out.println(response.getSearchSummary().size());
}
}
seq = null;
}
+ @SuppressWarnings("deprecation")
@Test(groups = { "Functional" })
public void buildQueryTest()
{
+ System.out.println("seq >>>> " + seq);
String query = StructureChooser.buildQuery(seq);
assertEquals("pdb_id:1tim", query);
- System.out.println("seq >>>> " + seq);
seq.getAllPDBEntries().clear();
query = StructureChooser.buildQuery(seq);
assertEquals(
"text:XYZ_1 OR text:XYZ_2 OR text:XYZ_3 OR text:XYZ_4 OR text:4kqy",
query);
- seq.setDBRefs(null);
+ seq.setDBRefs(null);
query = StructureChooser.buildQuery(seq);
+ System.out.println(query);
assertEquals("text:4kqy", query);
DBRefEntry uniprotDBRef = new DBRefEntry();
dbRef.setAccessionId("XYZ_" + x);
seq.addDBRef(dbRef);
}
+ System.out.println("");
+ System.out.println(seq.getDBRefs());
+ System.out.println(query);
query = StructureChooser.buildQuery(seq);
assertEquals(
"uniprot_accession:P12345 OR uniprot_id:P12345 OR pdb_id:1xyz",