You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2015/10/29 16:14:59 UTC

svn commit: r1711289 - /uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/CAS.java

Author: schor
Date: Thu Oct 29 15:14:59 2015
New Revision: 1711289

URL: http://svn.apache.org/viewvc?rev=1711289&view=rev
Log:
[UIMA-4668] [UIMA-4669] add JavaObject constants, change one API to a more specific return type

Modified:
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/CAS.java

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/CAS.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/CAS.java?rev=1711289&r1=1711288&r2=1711289&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/CAS.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/CAS.java Thu Oct 29 15:14:59 2015
@@ -28,6 +28,7 @@ import org.apache.uima.cas.impl.LowLevel
 import org.apache.uima.cas.text.AnnotationFS;
 import org.apache.uima.cas.text.AnnotationIndex;
 import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.cas.TOP;
 
 /**
  * Object-oriented CAS (Common Analysis System) API.
@@ -126,6 +127,10 @@ public interface CAS extends AbstractCas
   static final String TYPE_NAME_DOUBLE = UIMA_CAS_PREFIX + "Double";
 
   /**
+   * Java Object type
+   */
+  static final String TYPE_NAME_JAVA_OBJECT = UIMA_CAS_PREFIX + "JavaObject";
+  /**
    * ArrayBase type.
    */
   static final String TYPE_NAME_ARRAY_BASE = UIMA_CAS_PREFIX + "ArrayBase";
@@ -176,6 +181,11 @@ public interface CAS extends AbstractCas
   static final String TYPE_NAME_DOUBLE_ARRAY = UIMA_CAS_PREFIX + "DoubleArray";
 
   /**
+   * JavaObject array type
+   */
+  static final String TYPE_NAME_JAVA_OBJECT_ARRAY = UIMA_CAS_PREFIX + "JavaObjectArray";
+  
+  /**
    * Sofa type.
    */
   static final String TYPE_NAME_SOFA = UIMA_CAS_PREFIX + "Sofa";
@@ -405,17 +415,22 @@ public interface CAS extends AbstractCas
   static final String NAME_SPACE_UIMA_TCAS = "uima" + TypeSystem.NAMESPACE_SEPARATOR + "tcas";
 
   /**
+   * UIMA TCAS name space prefix to prepend to type names (adds an extra period to the name space
+   * proper.
+   */
+  static final String UIMA_TCAS_PREFIX = NAME_SPACE_UIMA_TCAS + TypeSystem.NAMESPACE_SEPARATOR;
+
+  /**
    * Name of annotation type.
    */
-  static final String TYPE_NAME_ANNOTATION = NAME_SPACE_UIMA_TCAS + TypeSystem.NAMESPACE_SEPARATOR
-          + "Annotation";
+  static final String TYPE_NAME_ANNOTATION = UIMA_TCAS_PREFIX + "Annotation";
 
   /**
    * Name of document annotation type.
    */
-  static final String TYPE_NAME_DOCUMENT_ANNOTATION = NAME_SPACE_UIMA_TCAS
-          + TypeSystem.NAMESPACE_SEPARATOR + "DocumentAnnotation";
+  static final String TYPE_NAME_DOCUMENT_ANNOTATION = UIMA_TCAS_PREFIX + "DocumentAnnotation";
 
+   
   /**
    * Sofa ID feature that is the handle to a text Sofa.
    */
@@ -475,7 +490,7 @@ public interface CAS extends AbstractCas
    * @param <T> the Java cover class for the FS being created
    * @return The new FS.
    */
-  <T extends FeatureStructure> T createFS(Type type) throws CASRuntimeException;
+  <T extends TOP> T createFS(Type type) throws CASRuntimeException;
 
   /**
    * Create a new feature structure array.