-
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
cwitte
committed
Jun 1, 2020
0 parents
commit 0730ea4
Showing
32 changed files
with
12,306 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" output="target/classes" path="src/main/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
<attribute name="test" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> |
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 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>HAf-backend</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.m2e.core.maven2Builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
</natures> | ||
</projectDescription> |
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,4 @@ | ||
eclipse.preferences.version=1 | ||
encoding//src/main/java=UTF-8 | ||
encoding//src/test/java=UTF-8 | ||
encoding/<project>=UTF-8 |
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,8 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
org.eclipse.jdt.core.compiler.compliance=1.8 | ||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled | ||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore | ||
org.eclipse.jdt.core.compiler.release=disabled | ||
org.eclipse.jdt.core.compiler.source=1.8 |
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,4 @@ | ||
activeProfiles= | ||
eclipse.preferences.version=1 | ||
resolveWorkspaceProjects=true | ||
version=1 |
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,85 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>edu.ubi.sc</groupId> | ||
<artifactId>HAf-backend</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
|
||
<name>HAf-backend</name> | ||
<url>http://maven.apache.org</url> | ||
|
||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<undertow.version>2.0.28.Final</undertow.version> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>3.8.1</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.undertow</groupId> | ||
<artifactId>undertow-core</artifactId> | ||
<version>${undertow.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.undertow</groupId> | ||
<artifactId>undertow-servlet</artifactId> | ||
<version>${undertow.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.undertow</groupId> | ||
<artifactId>undertow-websockets-jsr</artifactId> | ||
<version>${undertow.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.code.gson</groupId> | ||
<artifactId>gson</artifactId> | ||
<version>2.8.6</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.jena</groupId> | ||
<artifactId>apache-jena-libs</artifactId> | ||
<type>pom</type> | ||
<version>3.13.1</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<archive> | ||
<manifest> | ||
<addClasspath>true</addClasspath> | ||
<mainClass>edu.ubi.sc.haf.App</mainClass> | ||
</manifest> | ||
</archive> | ||
<descriptorRefs> | ||
<descriptorRef>jar-with-dependencies</descriptorRef> | ||
</descriptorRefs> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
Binary file not shown.
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,28 @@ | ||
package edu.ubi.sc.haf; | ||
|
||
import io.undertow.Undertow; | ||
import io.undertow.server.handlers.BlockingHandler; | ||
|
||
|
||
public class App | ||
{ | ||
public static void main( String[] args ) | ||
{ | ||
int serverPort = 8080; | ||
if (args.length > 0 && !"".equals(args[0].trim())) { | ||
try { | ||
serverPort = Integer.parseInt(args[0].trim()); | ||
} catch (NumberFormatException nfe) { | ||
System.err.println("Failed to parse port <" + args[0].trim() + ">. A numeric argument is required."); | ||
System.exit(1); | ||
} | ||
} | ||
System.err.println( "Starting up on port " + serverPort ); | ||
Undertow server = Undertow.builder() | ||
.addHttpListener(serverPort, "localhost") | ||
.setHandler(new BlockingHandler(new ServiceRequests())).build(); | ||
server.start(); | ||
|
||
System.err.println("Server listening on 127.0.0.1:" + serverPort); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
code/backend/src/main/java/edu/ubi/sc/haf/BackendInput.java
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,36 @@ | ||
package edu.ubi.sc.haf; | ||
|
||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import edu.ubi.sc.haf.core.RangeFilter; | ||
|
||
public class BackendInput { | ||
public static String EFFICACY_STR = "efficacy"; | ||
|
||
public static String SAFETY_STR = "safety"; | ||
|
||
public static String DURATION_STR = "duration"; | ||
|
||
public static String NUM_PATIENTS_STR = "numPatients"; | ||
|
||
public static String AVG_AGE_STR = "avgAge"; | ||
|
||
public static String PUBLICATION_YEAR_STR = "publicationYear"; | ||
|
||
public String disease; | ||
|
||
public String drug1; | ||
|
||
public String drug2; | ||
|
||
public HashMap<String, RangeFilter> filters; // duration,numPatients,avgAge | ||
|
||
public HashMap<String,Double> weights; | ||
|
||
public List<ClinicalTrial> evidence; | ||
|
||
public boolean filtersModified; | ||
} | ||
|
14 changes: 14 additions & 0 deletions
14
code/backend/src/main/java/edu/ubi/sc/haf/BackendInputMachineReading.java
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,14 @@ | ||
package edu.ubi.sc.haf; | ||
|
||
import java.util.List; | ||
import java.util.HashMap; | ||
|
||
public class BackendInputMachineReading { | ||
public String model1; | ||
|
||
public String model2; | ||
|
||
public List<String> included_datasets; // for checkboxes; names: squad, dream, race, race_m, race_h | ||
|
||
public HashMap<String,Double> weights; // key names: accuracy, f1_score, exact_match | ||
} |
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,9 @@ | ||
package edu.ubi.sc.haf; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public class BackendOutput { | ||
public Map<String, Object> verbalization; | ||
|
||
public List<ClinicalTrial> evidence; | ||
} |
11 changes: 11 additions & 0 deletions
11
code/backend/src/main/java/edu/ubi/sc/haf/BackendOutputMachineReading.java
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,11 @@ | ||
package edu.ubi.sc.haf; | ||
|
||
import java.util.Map; | ||
|
||
public class BackendOutputMachineReading { | ||
public Map<String, Object> verbalization; | ||
|
||
public ExperimentalEvidence evidenceModel1; | ||
|
||
public ExperimentalEvidence evidenceModel2; | ||
} |
39 changes: 39 additions & 0 deletions
39
code/backend/src/main/java/edu/ubi/sc/haf/ClinicalTrial.java
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,39 @@ | ||
package edu.ubi.sc.haf; | ||
|
||
public class ClinicalTrial { | ||
public String id; | ||
|
||
public String link; | ||
|
||
public String title; | ||
|
||
public String authors; | ||
|
||
public boolean include; | ||
|
||
public String exclusionReason; | ||
|
||
public double year; | ||
|
||
public double duration; | ||
|
||
public double numParticipants; | ||
|
||
public double avgAge; | ||
|
||
public String sponsors; | ||
|
||
public String conflictOfInterest; | ||
|
||
public String affiliation; | ||
|
||
public String reasonOfBias; | ||
|
||
public String abstractFullText; | ||
|
||
public String studyDesign; | ||
|
||
public String arm1Description; | ||
|
||
public String arm2Description; | ||
} |
Oops, something went wrong.