Skip to content

Commit

Permalink
up from home
Browse files Browse the repository at this point in the history
  • Loading branch information
koehlers committed Feb 26, 2018
1 parent 3620fed commit c5177e9
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 38 deletions.
12 changes: 6 additions & 6 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/phenOwl"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v9.0">
<attributes>
<attribute name="owner.project.facets" value="java"/>
<attribute name="owner.project.facets" value="jst.web"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.0">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/Java SE 8 [1.8.0_161]">
<attributes>
<attribute name="owner.project.facets" value="jst.web"/>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
5 changes: 0 additions & 5 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.vaadin.integration.eclipse.addonStylesBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
Expand Down
2 changes: 2 additions & 0 deletions .settings/org.apache.ivyde.eclipse.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.apache.ivyde.eclipse.standaloneretrieve=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><setuplist/>
2 changes: 1 addition & 1 deletion .settings/org.eclipse.wst.common.project.facet.core.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="Apache Tomcat v8.0"/>
<runtime name="Apache Tomcat v9.0"/>
<fixed facet="jst.web"/>
<fixed facet="java"/>
<fixed facet="wst.jsdt.web"/>
Expand Down
2 changes: 2 additions & 0 deletions ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,7 @@
<dependency org="org.vaadin.addons" name="googleanalyticstracker" rev="2.1.0" />
<dependency org="com.github.vaadin4qbanos" name="jsclipboard" rev="1.0.2" />
<dependency org="com.sebworks" name="vaadstrap" rev="0.1.2" />
<dependency org="net.sourceforge.owlapi" name="owlapi-distribution" rev="4.1.3"/>

</dependencies>
</ivy-module>
45 changes: 19 additions & 26 deletions src/hpoweb/HpowebUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import com.vaadin.event.FieldEvents.FocusEvent;
import com.vaadin.event.FieldEvents.FocusListener;
import com.vaadin.jsclipboard.JSClipboard;
import com.vaadin.server.ExternalResource;
import com.vaadin.server.Page;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinServlet;
Expand Down Expand Up @@ -142,13 +141,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);
Expand All @@ -161,8 +158,7 @@ else if (dataProvider instanceof IGeneDataProvider) {
String ontologyVersion;
if (doParseHpo) {
ontologyVersion = hpData.getExtOwlOntology().getOntologyVersionIri().toString();
}
else
} else

{
ontologyVersion = "some ontology version here";
Expand All @@ -173,7 +169,8 @@ else if (dataProvider instanceof IGeneDataProvider) {
*/
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("http:https://drseb.github.io/"));
Link feedback = new Link("Question, Comments, Feedback: [email protected]",
new com.vaadin.server.ExternalResource("http:https://drseb.github.io/"));
addLabelRow(gridContainer, version);
addLabelRow(gridContainer, copyright);
addLabelRow(gridContainer, feedback);
Expand Down Expand Up @@ -252,39 +249,36 @@ private IEntityDataProvider setupDataProvider(VaadinRequest request, Map<String,

OWLClass hpClass = parseHpId(request);
if (hpClass == null && doParseHpo) {
new Notification("Invalid HPO id input", "<br/><br/>Can't parse HPO id from '" + request.getParameter(CONSTANTS.hpRequestId) + "'",
new Notification("Invalid HPO id input",
"<br/><br/>Can't parse HPO id from '" + request.getParameter(CONSTANTS.hpRequestId) + "'",
Notification.Type.ERROR_MESSAGE, true).show(Page.getCurrent());
return null;
}

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) {
new Notification("Invalid gene id input",
"<br/><br/>Can't parse gene id from '" + request.getParameter(CONSTANTS.geneRequestId) + "'", Notification.Type.ERROR_MESSAGE,
true).show(Page.getCurrent());
"<br/><br/>Can't parse gene id from '" + request.getParameter(CONSTANTS.geneRequestId) + "'",
Notification.Type.ERROR_MESSAGE, true).show(Page.getCurrent());
return null;
}

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) {
Expand All @@ -296,15 +290,14 @@ else if (parameterMap.containsKey(CONSTANTS.diseaseRequestId)) {

if (doParseHpo) {
dataProvider = new DiseaseDataProvider(diseaseId, hpData);
}
else {
} else {
dataProvider = new FakeDiseaseDataProvider();
}
}
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());
} 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());
return null;
}
return dataProvider;
Expand Down
1 change: 1 addition & 0 deletions tmp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
page.setUriFragment("!" + SampleCrudView2.VIEW_NAME + "/" + fragmentParameter, false);

0 comments on commit c5177e9

Please sign in to comment.