g17;Date of;17
g18;Family & Domain;18
#
-_data_column.primary_key;entry name
+_data_column.primary_key;id
_data_column.default_response_page_size;150
#
_data_column.name
_data_column.preferred_col_width
_data_column.is_shown_by_default
_data_column.is_searchable
-Entry Name;entry name|name;String;g3;90;150;95;true;true
+Uniprot Id;id;String;g3;80;150;85;true;true
+Entry Name;entry name|name;String;g3;100;150;105;true;true
Protein names;protein names|protein name;String;g3;300;1500;500;true;true
Gene Names;genes|gene;String;g3;50;1000;95;true;true
Organism;organism;String;g3;50;1000;95;true;true
return result;
}
- /**
- * Takes a collection of FTSDataColumnI and converts its 'code' values into a
- * tab delimited string.
- *
- * @param dataColumnFields
- * the collection of FTSDataColumnI to process
- * @return the generated comma delimited string from the supplied
- * FTSDataColumnI collection
- */
- public String getDataColumnsFieldsAsTabDelimitedString(
- Collection<FTSDataColumnI> dataColumnFields)
- {
- String result = "";
- if (dataColumnFields != null && !dataColumnFields.isEmpty())
- {
- StringBuilder returnedFields = new StringBuilder();
- for (FTSDataColumnI field : dataColumnFields)
- {
- returnedFields.append("\t").append(field.getName());
- }
- returnedFields.deleteCharAt(0);
- result = returnedFields.toString();
- }
- return result;
- }
@Override
public Collection<FTSDataColumnI> getAllFTSDataColumns()
{
return;
}
- if ("pdb id".equalsIgnoreCase(getCmbSearchTarget()
+ String primaryKeyName = getFTSRestClient().getPrimaryKeyColumn()
+ .getName();
+ if (primaryKeyName.equalsIgnoreCase(getCmbSearchTarget()
.getSelectedItem().toString()))
{
transferToSequenceFetcher(txt_search.getText());
return searchResult;
}
+ /**
+ * Takes a collection of FTSDataColumnI and converts its 'code' values into a
+ * tab delimited string.
+ *
+ * @param dataColumnFields
+ * the collection of FTSDataColumnI to process
+ * @return the generated comma delimited string from the supplied
+ * FTSDataColumnI collection
+ */
+ private String getDataColumnsFieldsAsTabDelimitedString(
+ Collection<FTSDataColumnI> dataColumnFields)
+ {
+ String result = "";
+ if (dataColumnFields != null && !dataColumnFields.isEmpty())
+ {
+ StringBuilder returnedFields = new StringBuilder();
+ for (FTSDataColumnI field : dataColumnFields)
+ {
+ if (field.getName().equalsIgnoreCase("Uniprot Id"))
+ {
+ returnedFields.append("\t").append("Entry");
+ }
+ else
+ {
+ returnedFields.append("\t").append(field.getName());
+ }
+ }
+ returnedFields.deleteCharAt(0);
+ result = returnedFields.toString();
+ }
+ return result;
+ }
public static FTSData getFTSData(String tabDelimittedDataStr,
FTSRestRequest request)
{
"entry name,protein names,genes,organism,created,last-modified");
}
- @Test(groups = { "Functional" })
- public void getDataColumnsFieldsAsTabDelimitedString()
- {
- Collection<FTSDataColumnI> wantedFields = ftsRestClient
- .getAllDefaulDisplayedDataColumns();
- String actual = ftsRestClient
- .getDataColumnsFieldsAsTabDelimitedString(wantedFields);
- Assert.assertEquals(actual,
- "Entry Name\tProtein names\tGene Names\tOrganism\tDate of creation\tDate of last modification");
- }
@Test(groups = { "Functional" })
public void getAllFTSDataColumns()