ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seanfi...@apache.org
Subject svn commit: r1846041 - in /ctakes/trunk: ./ ctakes-distribution/ ctakes-distribution/src/main/assembly/ ctakes-examples/ ctakes-fhir/src/main/java/org/apache/ctakes/fhir/element/ ctakes-fhir/src/main/java/org/apache/ctakes/fhir/resource/ ctakes-gui/src...
Date Wed, 07 Nov 2018 15:08:01 GMT
Author: seanfinan
Date: Wed Nov  7 15:08:00 2018
New Revision: 1846041

URL: http://svn.apache.org/viewvc?rev=1846041&view=rev
Log:
CTAKES-526 : Add shutdown hook to close hsql database
Add ctakes-fhir to main build and distribution and examples
Enlarge Piper File Submitter Gui
Switch fhir id divider char to dash

Modified:
    ctakes/trunk/ctakes-distribution/pom.xml
    ctakes/trunk/ctakes-distribution/src/main/assembly/bin.xml
    ctakes/trunk/ctakes-examples/pom.xml
    ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/element/FhirElementFactory.java
    ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/element/FhirElementParser.java
    ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/resource/FhirPractitioner.java
    ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/resource/PractitionerCtakes.java
    ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/pipeline/PiperRunnerGui.java
    ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/pipeline/PiperRunnerPanel.java
    ctakes/trunk/pom.xml

Modified: ctakes/trunk/ctakes-distribution/pom.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-distribution/pom.xml?rev=1846041&r1=1846040&r2=1846041&view=diff
==============================================================================
--- ctakes/trunk/ctakes-distribution/pom.xml (original)
+++ ctakes/trunk/ctakes-distribution/pom.xml Wed Nov  7 15:08:00 2018
@@ -138,6 +138,10 @@
          <groupId>org.apache.ctakes</groupId>
          <artifactId>ctakes-gui</artifactId>
       </dependency>
+      <dependency>
+         <groupId>org.apache.ctakes</groupId>
+         <artifactId>ctakes-fhir</artifactId>
+      </dependency>
 	</dependencies>
 
 	<build>

Modified: ctakes/trunk/ctakes-distribution/src/main/assembly/bin.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-distribution/src/main/assembly/bin.xml?rev=1846041&r1=1846040&r2=1846041&view=diff
==============================================================================
--- ctakes/trunk/ctakes-distribution/src/main/assembly/bin.xml (original)
+++ ctakes/trunk/ctakes-distribution/src/main/assembly/bin.xml Wed Nov  7 15:08:00 2018
@@ -47,6 +47,7 @@
 				<include>org.apache.ctakes:ctakes-dictionary-lookup-fast</include>				
 				<include>org.apache.ctakes:ctakes-drug-ner</include>
 				<include>org.apache.ctakes:ctakes-gui</include>
+            <include>org.apache.ctakes:ctakes-fhir</include>
 				<include>org.apache.ctakes:ctakes-lvg</include>
 				<include>org.apache.ctakes:ctakes-ne-contexts</include>
 				<include>org.apache.ctakes:ctakes-pos-tagger</include>

Modified: ctakes/trunk/ctakes-examples/pom.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-examples/pom.xml?rev=1846041&r1=1846040&r2=1846041&view=diff
==============================================================================
--- ctakes/trunk/ctakes-examples/pom.xml (original)
+++ ctakes/trunk/ctakes-examples/pom.xml Wed Nov  7 15:08:00 2018
@@ -35,6 +35,10 @@
           <groupId>org.apache.ctakes</groupId>
           <artifactId>ctakes-gui</artifactId>
       </dependency>
+     <dependency>
+        <groupId>org.apache.ctakes</groupId>
+        <artifactId>ctakes-fhir</artifactId>
+     </dependency>
       <dependency>
       <groupId>org.apache.ctakes</groupId>
         <artifactId>ctakes-coreference</artifactId>
@@ -72,12 +76,15 @@
                         <executions>
                             <execution>
                                 <goals>
-                                    <goal>java</goal>
+                                   <goal>exec</goal>
                                 </goals>
                             </execution>
                         </executions>
                         <configuration>
-                            <workingDirectory>${project.parent.basedir}</workingDirectory>
+                           <executable>java</executable>
+                           <includeProjectDependencies>true</includeProjectDependencies>
+                           <includePluginDependencies>true</includePluginDependencies>
+                           <workingDirectory>${project.parent.basedir}</workingDirectory>
                             <arguments>
                                 <argument>-classpath</argument>
                                 <classpath/>

Modified: ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/element/FhirElementFactory.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/element/FhirElementFactory.java?rev=1846041&r1=1846040&r2=1846041&view=diff
==============================================================================
--- ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/element/FhirElementFactory.java
(original)
+++ ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/element/FhirElementFactory.java
Wed Nov  7 15:08:00 2018
@@ -43,6 +43,8 @@ final public class FhirElementFactory {
    static public final String CODING_TUI = "tui";
    static public final String CODING_SEMANTIC = "semantic-group";
 
+   static public final char DIVIDER_CHAR = '-';
+
 
    private FhirElementFactory() {
    }
@@ -141,7 +143,7 @@ final public class FhirElementFactory {
     * @return fhir id containing name and code.
     */
    static public String createId( final JCas jCas, final String name, final String code )
{
-      return DocumentIDAnnotationUtil.getDocumentID( jCas ) + "_" + name + "_" + code;
+      return DocumentIDAnnotationUtil.getDocumentID( jCas ) + DIVIDER_CHAR + name + DIVIDER_CHAR
+ code;
    }
 
 //   Identifiers are 0 .. 1 , so unnecessary

Modified: ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/element/FhirElementParser.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/element/FhirElementParser.java?rev=1846041&r1=1846040&r2=1846041&view=diff
==============================================================================
--- ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/element/FhirElementParser.java
(original)
+++ ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/element/FhirElementParser.java
Wed Nov  7 15:08:00 2018
@@ -32,7 +32,7 @@ final public class FhirElementParser {
    }
 
    static public String getIdName( final String id ) {
-      final String[] splits = StringUtil.fastSplit( id, '_' );
+      final String[] splits = StringUtil.fastSplit( id, DIVIDER_CHAR );
       if ( splits.length >= 3 ) {
          return splits[ 1 ];
       }

Modified: ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/resource/FhirPractitioner.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/resource/FhirPractitioner.java?rev=1846041&r1=1846040&r2=1846041&view=diff
==============================================================================
--- ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/resource/FhirPractitioner.java
(original)
+++ ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/resource/FhirPractitioner.java
Wed Nov  7 15:08:00 2018
@@ -6,6 +6,7 @@ import org.hl7.fhir.dstu3.model.*;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 
+import static org.apache.ctakes.fhir.element.FhirElementFactory.DIVIDER_CHAR;
 import static org.hl7.fhir.dstu3.model.Composition.CompositionAttesterComponent;
 
 /**
@@ -65,7 +66,8 @@ public interface FhirPractitioner {
       } catch ( UnknownHostException uhE ) {
          hostname = "UnknownHost";
       }
-      practitioner.setId( getFamilyName() + '_' + getName() + '_' + getVersion() + "_" +
hostname );
+      practitioner.setId(
+            getFamilyName() + DIVIDER_CHAR + getName() + DIVIDER_CHAR + getVersion() + DIVIDER_CHAR
+ hostname );
       practitioner.setActive( true );
       practitioner.addName( name );
       practitioner.addTelecom( contact );
@@ -79,7 +81,7 @@ public interface FhirPractitioner {
       final Organization organization = new Organization();
       final Practitioner practitioner = getPractitioner();
       final String id = practitioner.getId()
-            .replace( '_' + getName(), "" );
+                                    .replace( DIVIDER_CHAR + getName(), "" );
       organization.setId( id );
       organization.setActive( practitioner.getActive() );
       organization.setName( getFamilyName() );

Modified: ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/resource/PractitionerCtakes.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/resource/PractitionerCtakes.java?rev=1846041&r1=1846040&r2=1846041&view=diff
==============================================================================
--- ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/resource/PractitionerCtakes.java
(original)
+++ ctakes/trunk/ctakes-fhir/src/main/java/org/apache/ctakes/fhir/resource/PractitionerCtakes.java
Wed Nov  7 15:08:00 2018
@@ -5,6 +5,8 @@ import org.hl7.fhir.dstu3.model.Organiza
 import org.hl7.fhir.dstu3.model.Practitioner;
 import org.hl7.fhir.dstu3.model.Reference;
 
+import static org.apache.ctakes.fhir.element.FhirElementFactory.DIVIDER_CHAR;
+
 /**
  * https://www.hl7.org/fhir/practitioner.html
  * Even though ctakes is not human, registering it as a Practitioner provides reference to
information source and devlist contact
@@ -32,7 +34,7 @@ public enum PractitionerCtakes implement
 
    @Override
    public String getVersion() {
-      return "4_0_1";
+      return "4" + DIVIDER_CHAR + "0" + DIVIDER_CHAR + "1";
    }
 
    @Override

Modified: ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/pipeline/PiperRunnerGui.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/pipeline/PiperRunnerGui.java?rev=1846041&r1=1846040&r2=1846041&view=diff
==============================================================================
--- ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/pipeline/PiperRunnerGui.java
(original)
+++ ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/pipeline/PiperRunnerGui.java
Wed Nov  7 15:08:00 2018
@@ -27,7 +27,8 @@ final public class PiperRunnerGui {
       // iPhone 5 : 1136 x 640 (under 16:9, unique to Apple)
       // iPad 3&4 : 2048 x 1536 (4:3, QXGA)
       // iPad Mini: 1024 x 768 (4:3, XGA)
-      final Dimension size = new Dimension( 800, 600 );
+//      final Dimension size = new Dimension( 800, 600 );
+      final Dimension size = new Dimension( 1024, 768 );
       frame.setSize( size );
       frame.setMinimumSize( size );
 //      System.setProperty( "apple.laf.useScreenMenuBar", "true" );

Modified: ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/pipeline/PiperRunnerPanel.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/pipeline/PiperRunnerPanel.java?rev=1846041&r1=1846040&r2=1846041&view=diff
==============================================================================
--- ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/pipeline/PiperRunnerPanel.java
(original)
+++ ctakes/trunk/ctakes-gui/src/main/java/org/apache/ctakes/gui/pipeline/PiperRunnerPanel.java
Wed Nov  7 15:08:00 2018
@@ -142,7 +142,7 @@ final public class PiperRunnerPanel exte
    private JComponent createMainPanel() {
       final JComponent westPanel = createWestPanel();
       final JComponent eastPanel = createEastPanel();
-      final JSplitPane mainSplit = new JSplitPane( JSplitPane.HORIZONTAL_SPLIT, westPanel,
eastPanel );
+      final JSplitPane mainSplit = new PositionedSplitPane( JSplitPane.HORIZONTAL_SPLIT,
westPanel, eastPanel );
       mainSplit.setDividerLocation( 0.5 );
       return mainSplit;
    }
@@ -169,9 +169,9 @@ final public class PiperRunnerPanel exte
       _cliTable = new SmoothTipTable( new CliOptionModel() );
       _cliTable.setRowHeight( 20 );
       _cliTable.setAutoResizeMode( JTable.AUTO_RESIZE_LAST_COLUMN );
-      _cliTable.getColumnModel().getColumn( 0 ).setPreferredWidth( 100 );
-      _cliTable.getColumnModel().getColumn( 0 ).setMaxWidth( 100 );
-      _cliTable.getColumnModel().getColumn( 1 ).setMaxWidth( 50 );
+      _cliTable.getColumnModel().getColumn( 0 ).setPreferredWidth( 200 );
+      _cliTable.getColumnModel().getColumn( 0 ).setMaxWidth( 200 );
+      _cliTable.getColumnModel().getColumn( 1 ).setMaxWidth( 100 );
       _cliTable.getColumnModel().getColumn( 3 ).setMaxWidth( 25 );
       _cliTable.setRowSelectionAllowed( true );
       _cliTable.setCellSelectionEnabled( true );

Modified: ctakes/trunk/pom.xml
URL: http://svn.apache.org/viewvc/ctakes/trunk/pom.xml?rev=1846041&r1=1846040&r2=1846041&view=diff
==============================================================================
--- ctakes/trunk/pom.xml (original)
+++ ctakes/trunk/pom.xml Wed Nov  7 15:08:00 2018
@@ -153,6 +153,7 @@
 	<modules>
 		<module>ctakes-gui</module>
 		<module>ctakes-gui-res</module>
+		<module>ctakes-fhir</module>
 		<module>ctakes-utils</module>
 		<module>ctakes-core</module>
 		<module>ctakes-type-system</module>
@@ -515,6 +516,11 @@
 				<version>${project.version}</version>
 			</dependency>
 			<dependency>
+				<groupId>org.apache.ctakes</groupId>
+				<artifactId>ctakes-fhir</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+			<dependency>
 				<groupId>org.apache.ctakes</groupId>
 				<artifactId>ctakes-examples</artifactId>
 				<version>${project.version}</version>



Mime
View raw message