-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
101 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,6 @@ | |
|
||
import java.util.Map; | ||
|
||
import javax.servlet.annotation.WebServlet; | ||
|
||
import org.semanticweb.owlapi.model.OWLClass; | ||
import org.vaadin.googleanalytics.tracking.GoogleAnalyticsTracker; | ||
import org.vaadin.viritin.fields.LazyComboBox; | ||
|
||
import com.sebworks.vaadstrap.Col; | ||
import com.sebworks.vaadstrap.ColMod; | ||
import com.sebworks.vaadstrap.Container; | ||
|
@@ -37,6 +31,12 @@ | |
import com.vaadin.ui.Window; | ||
import com.vaadin.ui.themes.ValoTheme; | ||
|
||
import javax.servlet.annotation.WebServlet; | ||
|
||
import org.semanticweb.owlapi.model.OWLClass; | ||
import org.vaadin.googleanalytics.tracking.GoogleAnalyticsTracker; | ||
import org.vaadin.viritin.fields.LazyComboBox; | ||
|
||
import hpo.ItemId; | ||
import hpoweb.data.HpData; | ||
import hpoweb.data.dataprovider.IDiseaseDataProvider; | ||
|
@@ -142,13 +142,11 @@ protected void init(VaadinRequest request) { | |
hpoClassTabFactory.addTermInfoElements(gridContainer, (IHpClassDataProvider) dataProvider); | ||
|
||
addExtraButtons(gridContainer, (IHpClassDataProvider) dataProvider); | ||
} | ||
else if (dataProvider instanceof IDiseaseDataProvider) { | ||
} else if (dataProvider instanceof IDiseaseDataProvider) { | ||
|
||
DiseaseTabFactory diseaseTabFactory = new DiseaseTabFactory(tableUtils); | ||
diseaseTabFactory.addDiseaseInfoElements(gridContainer, (IDiseaseDataProvider) dataProvider); | ||
} | ||
else if (dataProvider instanceof IGeneDataProvider) { | ||
} else if (dataProvider instanceof IGeneDataProvider) { | ||
|
||
GeneTabFactory geneTabFactory = new GeneTabFactory(tableUtils); | ||
geneTabFactory.addGeneInfoElements(gridContainer, (IGeneDataProvider) dataProvider); | ||
|
@@ -161,8 +159,7 @@ else if (dataProvider instanceof IGeneDataProvider) { | |
String ontologyVersion; | ||
if (doParseHpo) { | ||
ontologyVersion = hpData.getExtOwlOntology().getOntologyVersionIri().toString(); | ||
} | ||
else | ||
} else | ||
|
||
{ | ||
ontologyVersion = "some ontology version here"; | ||
|
@@ -172,8 +169,8 @@ else if (dataProvider instanceof IGeneDataProvider) { | |
* Bottom part | ||
*/ | ||
Label version = new Label("Ontology version: " + ontologyVersion); | ||
Label copyright = new Label("Copyright 2017 - Sebastian Köhler & The Human Phenotype Ontology Project"); | ||
Link feedback = new Link("Question, Comments, Feedback: [email protected]", new ExternalResource("https://drseb.github.io/")); | ||
Label copyright = new Label("Copyright 2018 - Sebastian Köhler & The Phenomics Group Berlin"); | ||
Link feedback = new Link("Contact: [email protected]", new ExternalResource("https://phenomics.github.io/")); | ||
addLabelRow(gridContainer, version); | ||
addLabelRow(gridContainer, copyright); | ||
addLabelRow(gridContainer, feedback); | ||
|
@@ -259,13 +256,11 @@ private IEntityDataProvider setupDataProvider(VaadinRequest request, Map<String, | |
|
||
if (doParseHpo) { | ||
dataProvider = new HpClassDataProvider(hpClass, hpData); | ||
} | ||
else { | ||
} else { | ||
dataProvider = new FakeHpClassDataProvider(); | ||
} | ||
|
||
} | ||
else if (parameterMap.containsKey(CONSTANTS.geneRequestId)) { | ||
} else if (parameterMap.containsKey(CONSTANTS.geneRequestId)) { | ||
|
||
Integer geneId = parseGeneId(request); | ||
if (geneId == null && doParseHpo) { | ||
|
@@ -278,13 +273,11 @@ else if (parameterMap.containsKey(CONSTANTS.geneRequestId)) { | |
if (doParseHpo) { | ||
|
||
dataProvider = new GeneDataProvider(geneId, hpData); | ||
} | ||
else { | ||
} else { | ||
dataProvider = new FakeGeneDataProvider(); | ||
} | ||
|
||
} | ||
else if (parameterMap.containsKey(CONSTANTS.diseaseRequestId)) { | ||
} else if (parameterMap.containsKey(CONSTANTS.diseaseRequestId)) { | ||
|
||
ItemId diseaseId = parseDiseaseId(request); | ||
if (diseaseId == null && doParseHpo) { | ||
|
@@ -296,12 +289,10 @@ else if (parameterMap.containsKey(CONSTANTS.diseaseRequestId)) { | |
|
||
if (doParseHpo) { | ||
dataProvider = new DiseaseDataProvider(diseaseId, hpData); | ||
} | ||
else { | ||
} else { | ||
dataProvider = new FakeDiseaseDataProvider(); | ||
} | ||
} | ||
else { | ||
} else { | ||
new Notification("Invalid URL", "<br/><br/>You have to provide one URL parameter (" + CONSTANTS.hpRequestId + "," | ||
+ CONSTANTS.geneRequestId + ", or " + CONSTANTS.diseaseRequestId + ") ! ", Notification.Type.WARNING_MESSAGE, true) | ||
.show(Page.getCurrent()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package hpoweb.util; | ||
|
||
import com.vaadin.ui.Button.ClickEvent; | ||
import com.vaadin.ui.Button.ClickListener; | ||
import com.vaadin.ui.Notification; | ||
|
||
public class UpdatePageClickListener implements ClickListener { | ||
|
||
private String id; | ||
private String label; | ||
|
||
public UpdatePageClickListener(String id, String label) { | ||
this.id = id; | ||
this.label = label; | ||
|
||
} | ||
|
||
@Override | ||
public void buttonClick(ClickEvent event) { | ||
Notification.show(id + " " + label); | ||
} | ||
|
||
} |