ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seanfi...@apache.org
Subject svn commit: r1830589 - /ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/patient/AbstractPatientConsumer.java
Date Mon, 30 Apr 2018 13:35:03 GMT
Author: seanfinan
Date: Mon Apr 30 13:35:03 2018
New Revision: 1830589

URL: http://svn.apache.org/viewvc?rev=1830589&view=rev
Log:
Add EngineName parameter.  Not mandatory.

Modified:
    ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/patient/AbstractPatientConsumer.java

Modified: ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/patient/AbstractPatientConsumer.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/patient/AbstractPatientConsumer.java?rev=1830589&r1=1830588&r2=1830589&view=diff
==============================================================================
--- ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/patient/AbstractPatientConsumer.java
(original)
+++ ctakes/trunk/ctakes-core/src/main/java/org/apache/ctakes/core/patient/AbstractPatientConsumer.java
Mon Apr 30 13:35:03 2018
@@ -32,6 +32,7 @@ import java.util.Collection;
 abstract public class AbstractPatientConsumer extends JCasAnnotator_ImplBase implements NamedEngine
{
 
    static public final String REMOVE_PATIENT = "RemovePatient";
+   static public final String ENGINE_NAME = "EngineName";
 
    @ConfigurationParameter(
          name = REMOVE_PATIENT,
@@ -40,6 +41,13 @@ abstract public class AbstractPatientCon
    )
    private boolean _removePatient;
 
+   @ConfigurationParameter(
+         name = ENGINE_NAME,
+         description = "The Name to use for this Patient Consumer.  Must be unique in the
pipeline",
+         mandatory = false
+   )
+   private String _engineName;
+
    private final String _action;
    private final Logger _logger;
 
@@ -49,6 +57,17 @@ abstract public class AbstractPatientCon
    }
 
    /**
+    * {@inheritDoc}
+    */
+   @Override
+   public String getEngineName() {
+      if ( _engineName != null && !_engineName.isEmpty() ) {
+         return _engineName;
+      }
+      return getClass().getSimpleName();
+   }
+
+   /**
     * {@inheritDoc}
     */
    @Override



Mime
View raw message