ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seanfi...@apache.org
Subject svn commit: r1877700 - in /ctakes/trunk: ctakes-dockhand/src/main/java/org/apache/ctakes/dockhand/build/ ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/ ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/do...
Date Wed, 13 May 2020 16:20:37 GMT
Author: seanfinan
Date: Wed May 13 16:20:37 2020
New Revision: 1877700

URL: http://svn.apache.org/viewvc?rev=1877700&view=rev
Log:
Updates for dockhand rest service

Added:
    ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/script/
    ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/script/install_rest.sh
    ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/script/start_rest.sh
    ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/script/stop_rest.sh
Modified:
    ctakes/trunk/ctakes-dockhand/src/main/java/org/apache/ctakes/dockhand/build/RestDockerBuilder.java
    ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/README.txt
    ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/docker/Dockerfile
    ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/attribute_pom.xml
    ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/coreference_pom.xml
    ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/entity_pom.xml
    ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_coref_pom.xml
    ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_pom.xml
    ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_temporal_coreference_pom.xml
    ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_temporal_pom.xml
    ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/temporal_coref_pom.xml
    ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/temporal_pom.xml
    ctakes/trunk/ctakes-tiny-rest/src/main/java/org/apache/ctakes/rest/service/RestPipelineRunner.java
    ctakes/trunk/ctakes-tiny-rest/src/main/java/org/apache/ctakes/rest/service/TinyController.java
    ctakes/trunk/ctakes-tiny-rest/src/main/webapp/js/app.js

Modified: ctakes/trunk/ctakes-dockhand/src/main/java/org/apache/ctakes/dockhand/build/RestDockerBuilder.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dockhand/src/main/java/org/apache/ctakes/dockhand/build/RestDockerBuilder.java?rev=1877700&r1=1877699&r2=1877700&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dockhand/src/main/java/org/apache/ctakes/dockhand/build/RestDockerBuilder.java
(original)
+++ ctakes/trunk/ctakes-dockhand/src/main/java/org/apache/ctakes/dockhand/build/RestDockerBuilder.java
Wed May 13 16:20:37 2020
@@ -21,9 +21,14 @@ final public class RestDockerBuilder imp
    static private final String PIPER_DIR = "/org/apache/ctakes/dockhand/goal/rest/pipeline/";
    static private final String SOURCE_URLDIR = "/org/apache/ctakes/dockhand/goal/rest/";
    static private final String DOCKER_DIR = "/org/apache/ctakes/dockhand/goal/rest/docker/";
+   static private final String SCRIPT_DIR = "/org/apache/ctakes/dockhand/goal/rest/script/";
    static private final String WEBAPP_SOURCE_DIR = "/org/apache/ctakes/dockhand/goal/rest/webapp/";
    static private final String WEBAPP_TARGET_DIR = "/webapp/";
 
+   static private final String[] SCRIPTS = { "install_rest.sh",
+                                             "start_rest.sh",
+                                             "stop_rest.sh" };
+
    static private final String[] WEBAPPS = { "index.jsp",
                                              "css/index.css",
                                              "js/app.js",
@@ -46,6 +51,9 @@ final public class RestDockerBuilder imp
       extraFiles.add( new CopyFileSpec( SOURCE_URLDIR + "README.txt", "README.txt" ) );
       extraFiles.add( new CopyFileSpec( DOCKER_DIR + "Dockerfile", "Dockerfile" ) );
       extraFiles.add( new CopyFileSpec( PIPER_DIR + "TinyRestPipeline.piper", "TinyRestPipeline.piper"
) );
+      Arrays.stream( SCRIPTS )
+            .map( f -> new CopyFileSpec( SCRIPT_DIR + f, f ) )
+            .forEach( extraFiles::add );
       Arrays.stream( WEBAPPS )
             .map( f -> new CopyFileSpec( WEBAPP_SOURCE_DIR + f, WEBAPP_TARGET_DIR + f
) )
             .forEach( extraFiles::add );

Modified: ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/README.txt
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/README.txt?rev=1877700&r1=1877699&r2=1877700&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/README.txt
(original)
+++ ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/README.txt
Wed May 13 16:20:37 2020
@@ -3,17 +3,29 @@ To create a tiny rest server:
 1.  Execute "docker-machine env".
      This will list the full DOCKER_HOST address.
      e.g. "tcp://192.168.99.101:2376"
+
 2.  Make note of the address between "//" and ":".
      e.g. "192.168.99.101".
      Let us call this "IP.IP.IP.IP".
+
 3.  Change to the directory containing "Dockerfile".
+
 4.  Execute "docker build -t ctakes_tiny_rest .".
      This will build an image with the tag "ctakes_tiny_rest".
-5.  Execute "docker run --name my_ctakes_rest --rm -d -p 8080:8080 ctakes_tiny_rest".
+
+5.  Set the environment variable "umlsUser" to your umls username.
+
+6.  Set the environment variable "umlsPass" to your umls password.
+
+5.  Execute "docker run --name my_ctakes_rest --rm -d -p 8080:8080 -e umlsUser -e umlsPass
ctakes_tiny_rest".
      This will start a container named "my_ctakes_rest" that runs the server.
+
 6.  In a browser, visit "http://IP.IP.IP.IP:8080/ctakes_tiny_rest".
      This should open a ctakes demo front page.
 
+
 7.  To stop the server, execute "docker stop my_ctakes_rest".
+
 8.  To remove the image, execute "docker rmi ctakes_tiny_rest".
-9.  To clean your docker machine, execute "docker image prune".
+
+9.  To clean your docker machine, execute "docker system prune".

Modified: ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/docker/Dockerfile
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/docker/Dockerfile?rev=1877700&r1=1877699&r2=1877700&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/docker/Dockerfile
(original)
+++ ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/docker/Dockerfile
Wed May 13 16:20:37 2020
@@ -9,35 +9,35 @@ RUN wget https://archive.apache.org/dist
 
 RUN mkdir -p /ctakes_src
 COPY pom.xml /ctakes_src/
-COPY TinyRestPipeline.piper /ctakes_src/
-COPY DockhandPipeline.piper /ctakes_src/
 COPY log4j.xml /ctakes_src/
 COPY LICENSE /ctakes_src/
 COPY NOTICE /ctakes_src/
+
 COPY webapp /ctakes_src/src/main/webapp
-#  Rest Server calls TinyRestPipeline.
 
 WORKDIR /ctakes_src
 
 RUN mvn compile -DskipTests
 #  Don't copy the piper file to resources until mvn compile has created the directories.
-#  Then package can put it in the WAR.
-COPY TinyRestPipeline.piper /ctakes_src/ctakes-core-res/src/main/resources/org/apache/ctakes/core/pipeline/
-COPY DockhandPipeline.piper /ctakes_src/ctakes-core-res/src/main/resources/org/apache/ctakes/core/pipeline/
+#  Then package can put it in the WAR.  The rest Server calls TinyRestPipeline.
+COPY TinyRestPipeline.piper /ctakes_src/src/main/resources/
+COPY DockhandPipeline.piper /ctakes_src/src/main/resources/
 
 RUN mvn package
 
-WORKDIR /
+# Move the war file and copy the dictionary.
 RUN mv /ctakes_src/ctakes_tiny_rest.war /apache-tomcat-9.0.14/webapps/
+RUN cp -fr /ctakes_src/resources /apache-tomcat-9.0.14/
 
+# A little cleanup.
 RUN rm -fr /ctakes_src
 
-ENV TOMCAT_HOME=/apache-tomcat-9.0.14
-
+# Expose port 8080 for html access.
 EXPOSE 8080
 
-
+ENV TOMCAT_HOME=/apache-tomcat-9.0.14
 WORKDIR $TOMCAT_HOME
 RUN chmod u+x bin/*.sh
 
+ENV JAVA_OPTS="-Xmx6G"
 CMD bin/catalina.sh run

Modified: ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/attribute_pom.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/attribute_pom.xml?rev=1877700&r1=1877699&r2=1877700&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/attribute_pom.xml
(original)
+++ ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/attribute_pom.xml
Wed May 13 16:20:37 2020
@@ -121,7 +121,7 @@
                            <artifactId>ctakes-resources-sno_rx</artifactId>
                            <type>jar</type>
                            <overWrite>false</overWrite>
-                           <outputDirectory>apache-ctakes-${project.version}/resources</outputDirectory>
+                           <outputDirectory>${project.basedir}/resources</outputDirectory>
                         </artifactItem>
                      </artifactItems>
                   </configuration>

Modified: ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/coreference_pom.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/coreference_pom.xml?rev=1877700&r1=1877699&r2=1877700&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/coreference_pom.xml
(original)
+++ ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/coreference_pom.xml
Wed May 13 16:20:37 2020
@@ -135,7 +135,7 @@
                            <artifactId>ctakes-resources-sno_rx</artifactId>
                            <type>jar</type>
                            <overWrite>false</overWrite>
-                           <outputDirectory>apache-ctakes-${project.version}/resources</outputDirectory>
+                           <outputDirectory>${project.basedir}/resources</outputDirectory>
                         </artifactItem>
                      </artifactItems>
                   </configuration>

Modified: ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/entity_pom.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/entity_pom.xml?rev=1877700&r1=1877699&r2=1877700&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/entity_pom.xml
(original)
+++ ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/entity_pom.xml
Wed May 13 16:20:37 2020
@@ -88,7 +88,7 @@
                            <artifactId>ctakes-resources-sno_rx</artifactId>
                            <type>jar</type>
                            <overWrite>false</overWrite>
-                           <outputDirectory>apache-ctakes-${project.version}/resources</outputDirectory>
+                           <outputDirectory>${project.basedir}/resources</outputDirectory>
                         </artifactItem>
                      </artifactItems>
                   </configuration>

Modified: ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_coref_pom.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_coref_pom.xml?rev=1877700&r1=1877699&r2=1877700&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_coref_pom.xml
(original)
+++ ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_coref_pom.xml
Wed May 13 16:20:37 2020
@@ -136,7 +136,7 @@
                            <artifactId>ctakes-resources-sno_rx</artifactId>
                            <type>jar</type>
                            <overWrite>false</overWrite>
-                           <outputDirectory>apache-ctakes-${project.version}/resources</outputDirectory>
+                           <outputDirectory>${project.basedir}/resources</outputDirectory>
                         </artifactItem>
                      </artifactItems>
                   </configuration>

Modified: ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_pom.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_pom.xml?rev=1877700&r1=1877699&r2=1877700&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_pom.xml
(original)
+++ ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_pom.xml
Wed May 13 16:20:37 2020
@@ -120,7 +120,7 @@
                            <artifactId>ctakes-resources-sno_rx</artifactId>
                            <type>jar</type>
                            <overWrite>false</overWrite>
-                           <outputDirectory>apache-ctakes-${project.version}/resources</outputDirectory>
+                           <outputDirectory>${project.basedir}/resources</outputDirectory>
                         </artifactItem>
                      </artifactItems>
                   </configuration>

Modified: ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_temporal_coreference_pom.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_temporal_coreference_pom.xml?rev=1877700&r1=1877699&r2=1877700&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_temporal_coreference_pom.xml
(original)
+++ ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_temporal_coreference_pom.xml
Wed May 13 16:20:37 2020
@@ -127,7 +127,7 @@
                            <artifactId>ctakes-resources-sno_rx</artifactId>
                            <type>jar</type>
                            <overWrite>false</overWrite>
-                           <outputDirectory>apache-ctakes-${project.version}/resources</outputDirectory>
+                           <outputDirectory>${project.basedir}/resources</outputDirectory>
                         </artifactItem>
                      </artifactItems>
                   </configuration>

Modified: ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_temporal_pom.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_temporal_pom.xml?rev=1877700&r1=1877699&r2=1877700&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_temporal_pom.xml
(original)
+++ ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/relation_temporal_pom.xml
Wed May 13 16:20:37 2020
@@ -128,7 +128,7 @@
                            <artifactId>ctakes-resources-sno_rx</artifactId>
                            <type>jar</type>
                            <overWrite>false</overWrite>
-                           <outputDirectory>apache-ctakes-${project.version}/resources</outputDirectory>
+                           <outputDirectory>${project.basedir}/resources</outputDirectory>
                         </artifactItem>
                      </artifactItems>
                   </configuration>

Modified: ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/temporal_coref_pom.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/temporal_coref_pom.xml?rev=1877700&r1=1877699&r2=1877700&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/temporal_coref_pom.xml
(original)
+++ ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/temporal_coref_pom.xml
Wed May 13 16:20:37 2020
@@ -131,7 +131,7 @@
                            <artifactId>ctakes-resources-sno_rx</artifactId>
                            <type>jar</type>
                            <overWrite>false</overWrite>
-                           <outputDirectory>apache-ctakes-${project.version}/resources</outputDirectory>
+                           <outputDirectory>${project.basedir}/resources</outputDirectory>
                         </artifactItem>
                      </artifactItems>
                   </configuration>

Modified: ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/temporal_pom.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/temporal_pom.xml?rev=1877700&r1=1877699&r2=1877700&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/temporal_pom.xml
(original)
+++ ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/pom/temporal_pom.xml
Wed May 13 16:20:37 2020
@@ -131,7 +131,7 @@
                            <artifactId>ctakes-resources-sno_rx</artifactId>
                            <type>jar</type>
                            <overWrite>false</overWrite>
-                           <outputDirectory>apache-ctakes-${project.version}/resources</outputDirectory>
+                           <outputDirectory>${project.basedir}/resources</outputDirectory>
                         </artifactItem>
                      </artifactItems>
                   </configuration>

Added: ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/script/install_rest.sh
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/script/install_rest.sh?rev=1877700&view=auto
==============================================================================
--- ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/script/install_rest.sh
(added)
+++ ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/script/install_rest.sh
Wed May 13 16:20:37 2020
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+docker build -t ctakes_tiny_rest .

Added: ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/script/start_rest.sh
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/script/start_rest.sh?rev=1877700&view=auto
==============================================================================
--- ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/script/start_rest.sh
(added)
+++ ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/script/start_rest.sh
Wed May 13 16:20:37 2020
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+if [ "$1" != "" ]; then
+    umlsUser=$1
+    set umlsUser=$1
+    export umlsUser
+fi
+
+if [ "$2" != "" ]; then
+    umlsPass=$2
+    set umlsPass=$2
+    export umlsPass
+fi
+
+## Make sure there are environment variables for umls username and password
+if [ -z $umlsUser ] ; then
+    echo "Environment variable umlsUser must be defined"
+    exit 1
+fi
+
+if [ -z $umlsPass ] ; then
+    echo "Environment variable umlsPass must be defined"
+    exit 1
+fi
+
+## Pass in environment variables
+docker run --name my_ctakes_rest --rm -d -p 8080:8080 -e umlsUser -e umlsPass ctakes_tiny_rest
+

Added: ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/script/stop_rest.sh
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/script/stop_rest.sh?rev=1877700&view=auto
==============================================================================
--- ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/script/stop_rest.sh
(added)
+++ ctakes/trunk/ctakes-dockhand/src/main/resources/org/apache/ctakes/dockhand/goal/rest/script/stop_rest.sh
Wed May 13 16:20:37 2020
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+docker stop my_ctakes_rest
+docker rmi ctakes_tiny_rest
+docker system prune

Modified: ctakes/trunk/ctakes-tiny-rest/src/main/java/org/apache/ctakes/rest/service/RestPipelineRunner.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-tiny-rest/src/main/java/org/apache/ctakes/rest/service/RestPipelineRunner.java?rev=1877700&r1=1877699&r2=1877700&view=diff
==============================================================================
--- ctakes/trunk/ctakes-tiny-rest/src/main/java/org/apache/ctakes/rest/service/RestPipelineRunner.java
(original)
+++ ctakes/trunk/ctakes-tiny-rest/src/main/java/org/apache/ctakes/rest/service/RestPipelineRunner.java
Wed May 13 16:20:37 2020
@@ -64,6 +64,7 @@ public enum RestPipelineRunner {
          _engine = UIMAFramework.produceAnalysisEngine( pipeline );
          _pool = new JCasPool( 2, _engine );
       } catch ( IOException | UIMAException multE ) {
+         Logger.getLogger( "RestPipelineRunner" ).error( multE.getMessage() );
          throw new ExceptionInInitializerError( multE );
       }
    }

Modified: ctakes/trunk/ctakes-tiny-rest/src/main/java/org/apache/ctakes/rest/service/TinyController.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-tiny-rest/src/main/java/org/apache/ctakes/rest/service/TinyController.java?rev=1877700&r1=1877699&r2=1877700&view=diff
==============================================================================
--- ctakes/trunk/ctakes-tiny-rest/src/main/java/org/apache/ctakes/rest/service/TinyController.java
(original)
+++ ctakes/trunk/ctakes-tiny-rest/src/main/java/org/apache/ctakes/rest/service/TinyController.java
Wed May 13 16:20:37 2020
@@ -63,7 +63,7 @@ public class TinyController {
    public String processText( @RequestBody final String text,
                               @RequestParam( "format" ) final Optional<String> responseFormat
)
          throws AnalysisEngineProcessException {
-      LOGGER.info( "Processing " + text );
+//      LOGGER.info( "Processing " + text );
       final String format = responseFormat.orElse( "default" ).toLowerCase();
       switch ( format ) {
          case "fhir":

Modified: ctakes/trunk/ctakes-tiny-rest/src/main/webapp/js/app.js
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-tiny-rest/src/main/webapp/js/app.js?rev=1877700&r1=1877699&r2=1877700&view=diff
==============================================================================
--- ctakes/trunk/ctakes-tiny-rest/src/main/webapp/js/app.js (original)
+++ ctakes/trunk/ctakes-tiny-rest/src/main/webapp/js/app.js Wed May 13 16:20:37 2020
@@ -10,7 +10,7 @@ $(document).ready(function() {
 				async: true,
 				data: document.getElementById("documentText").value,
 				error: function(xhr, statusText, error) {
-					 document.getElementById("resultText").innerHTML = "Error processing REST call\n" +
xhr + "\n" + statusText + "\n" + error;
+					 document.getElementById("resultText").innerHTML = "Error processing REST call";
 				},
 				success: function(response, statusText, xhr) {
 				   document.getElementById("resultText").innerHTML = response;



Mime
View raw message