Skip to content

Commit

Permalink
Fixing #219
Browse files Browse the repository at this point in the history
  • Loading branch information
josemduarte committed Aug 22, 2018
1 parent 3a7b26d commit b4c5dad
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ public static PdbInfo getPdbInfo() {
* Sets selected pdb score item.
* @param pdbInfo selected pdb score item
*/
public static void setPdbScoreItem(PdbInfo pdbScoreItem) {
ApplicationContext.pdbInfo = pdbScoreItem;
Collections.sort(pdbScoreItem.getInterfaceClusters());
public static void setPdbScoreItem(PdbInfo pdbInfo) {
ApplicationContext.pdbInfo = pdbInfo;
Collections.sort(pdbInfo.getInterfaceClusters());
}

/**
Expand Down Expand Up @@ -153,6 +153,10 @@ public static String getSelectedJobId() {
* @param selectedJobId job identifier
*/
public static void setSelectedJobId(String selectedJobId) {
// if PDB id, then lower case. See issue https://github.com/eppic-team/eppic/issues/219
if (selectedJobId.length() == 4) {
selectedJobId = selectedJobId.toLowerCase();
}
ApplicationContext.selectedJobId = selectedJobId;
}

Expand Down Expand Up @@ -275,7 +279,7 @@ public static WindowData getAdjustedWindowData() {

/**
* Sets adjusted main application window data.
* @param windowData adjusted main application window data
* @param adjustedWindowData adjusted main application window data
*/
public static void setAdjustedWindowData(WindowData adjustedWindowData) {
ApplicationContext.adjustedWindowData = adjustedWindowData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ public void displayView(String token)
token = token.replaceAll(" ", "");
EventBusManager.EVENT_BUS.fireEvent(new HideAllWindowsEvent());
EventBusManager.EVENT_BUS.fireEvent(new ShowTopPanelSearchBoxEvent());
if ((token != null) && (token.length() > 3) && (token.startsWith("id")))
if ((token.length() > 3) && (token.startsWith("id")))
//|| (token.startsWith("assembly") && (ApplicationContext.getSelectedAssemblyId() == 0)))//main results screen - show list of assemblies
{
Window.setTitle(AppPropertiesManager.CONSTANTS.window_title_loading());
Expand All @@ -543,7 +543,7 @@ public void displayView(String token)
}
//this is renamed!!!
//else if ((token != null) && (token.length() > 10) && (token.startsWith("interfaces"))) //show list of interfaces belonging to assembly x
else if ((token != null) && (token.length() > 8) && (token.startsWith("assembly"))) //show list of interfaces belonging to assembly x
else if ((token.length() > 8) && (token.startsWith("assembly"))) //show list of interfaces belonging to assembly x
{
ApplicationContext.setSelectedViewType(ResultsPanel.INTERFACES_VIEW);
Window.setTitle(AppPropertiesManager.CONSTANTS.window_title_loading());
Expand All @@ -557,7 +557,7 @@ else if ((token != null) && (token.length() > 8) && (token.startsWith("assembly"
ApplicationContext.setSelectedJobId(token.substring(9));
int assemblyId = -1;
int from = token.lastIndexOf("/");
String idString = token.substring(from+1,token.length());
String idString = token.substring(from+1);
try {
assemblyId = Integer.parseInt(idString);
} catch (Exception e) {}
Expand All @@ -569,7 +569,7 @@ else if ((token != null) && (token.length() > 8) && (token.startsWith("assembly"
ResultsGridPanel.clusterIdColumn.setHidden(true);
}
//this is "new"!!!
else if ((token != null) && (token.length() > 11) && (token.startsWith("interfaces"))) //show list of interfaces belonging to assembly x
else if ((token.length() > 11) && (token.startsWith("interfaces"))) //show list of interfaces belonging to assembly x
{
ApplicationContext.setSelectedViewType(ResultsPanel.INTERFACES_VIEW);
Window.setTitle(AppPropertiesManager.CONSTANTS.window_title_loading());
Expand All @@ -581,7 +581,7 @@ else if ((token != null) && (token.length() > 11) && (token.startsWith("interfac
//int assemblyId = -1;
int interfaceId = -1;
int from = token.lastIndexOf("/");
String idString = token.substring(from+1,token.length());
String idString = token.substring(from+1);
try {
interfaceId = Integer.parseInt(idString);
} catch (Exception e) {}
Expand All @@ -593,7 +593,7 @@ else if ((token != null) && (token.length() > 11) && (token.startsWith("interfac
ResultsGridPanel.clusterIdColumn.setHidden(true);
}

else if ((token != null) && (token.length() > 8) && (token.startsWith("clusters"))) //show list of interfaces (clusters view) belonging to assembly x
else if ((token.length() > 8) && (token.startsWith("clusters"))) //show list of interfaces (clusters view) belonging to assembly x
{
ApplicationContext.setSelectedViewType(ResultsPanel.INTERFACES_VIEW);
Window.setTitle(AppPropertiesManager.CONSTANTS.window_title_loading());
Expand All @@ -604,7 +604,7 @@ else if ((token != null) && (token.length() > 8) && (token.startsWith("clusters"
else
ApplicationContext.setSelectedJobId(token.substring(9));
int assemblyId = -1;
String idString = token.substring(14,token.length());
String idString = token.substring(14);
try {
assemblyId = Integer.parseInt(idString);
} catch (Exception e) {}
Expand All @@ -615,42 +615,42 @@ else if ((token != null) && (token.length() > 8) && (token.startsWith("clusters"
ResultsGridPanel.clustersViewButton.setValue(true);
ResultsGridPanel.clustersView.groupBy(ResultsGridPanel.clusterIdColumn);
}
else if ((token != null) && (token.length() > 14) && (token.startsWith("searchUniprot")))
else if ((token.length() > 14) && (token.startsWith("searchUniprot")))
{
Window.setTitle(AppPropertiesManager.CONSTANTS.window_title_searching());
displayUniprotSearch(token.substring(14));
}
else if ((token != null) && (token.length() > 10) && (token.startsWith("searchPdb")))
else if ((token.length() > 10) && (token.startsWith("searchPdb")))
{
Window.setTitle(AppPropertiesManager.CONSTANTS.window_title_searching());
String[] tokenParts = token.split("/");
displayPdbSearch(tokenParts[1], tokenParts[2]);
}
else if((token != null) && (token.equals("help") || token.equals("!help")))
else if((token.equals("help") || token.equals("!help")))
{
displayHelp();
}
else if((token != null) && (token.equals("downloads") || token.equals("!downloads")))
else if((token.equals("downloads") || token.equals("!downloads")))
{
displayDownloads();
}
else if((token != null) && (token.equals("releases") || token.equals("!releases")))
else if((token.equals("releases") || token.equals("!releases")))
{
displayReleases();
}
else if((token != null) && (token.equals("publications") || token.equals("!publications")))
else if((token.equals("publications") || token.equals("!publications")))
{
displayPublications();
}
else if((token != null) && (token.equals("statistics") || token.equals("!statistics")))
else if((token.equals("statistics") || token.equals("!statistics")))
{
displayStatistics();
}
else if((token != null) && (token.equals("faq") || token.equals("!faq")))
else if((token.equals("faq") || token.equals("!faq")))
{
displayFAQ();
}
else if((token != null) && (token.equals("advancedsearch") || token.equals("!advancedsearch")))
else if((token.equals("advancedsearch") || token.equals("!advancedsearch")))
{
displayEppicExplorer();
}
Expand Down

0 comments on commit b4c5dad

Please sign in to comment.