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 2016/12/23 22:00:22 UTC

svn commit: r1775919 - in /uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima: cas/ cas/text/ jcas/cas/ jcas/tcas/

Author: schor
Date: Fri Dec 23 22:00:21 2016
New Revision: 1775919

URL: http://svn.apache.org/viewvc?rev=1775919&view=rev
Log:
[UIMA-5233] redo hierarchy for better compatibility, also some minor cleanups (remove unused imports, add overrides)

Removed:
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/CommonArray.java
Modified:
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/AbstractCas_ImplBase.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/AnnotationBaseFS.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/ArrayFS.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/BooleanArrayFS.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/CAS.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/CommonArrayFS.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FSIndex.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FSIterator.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FeatureStructure.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FloatArrayFS.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/IntArrayFS.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/LongArrayFS.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/SofaFS.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/StringArrayFS.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/text/AnnotationFS.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/AnnotationBase.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/BooleanArray.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/ByteArray.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/CommonPrimitiveArray.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/DoubleArray.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/FSArray.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/FSArrayList.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/FloatArray.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/IntegerArray.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/IntegerArrayList.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/LongArray.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/ShortArray.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/Sofa.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/StringArray.java
    uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/tcas/Annotation.java

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/AbstractCas_ImplBase.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/AbstractCas_ImplBase.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/AbstractCas_ImplBase.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/AbstractCas_ImplBase.java Fri Dec 23 22:00:21 2016
@@ -30,6 +30,7 @@ public abstract class AbstractCas_ImplBa
    * Default implementation that returns this CAS to its CasManager by calling
    * {@link CasOwner#releaseCas(AbstractCas)}.
    */
+  @Override
   public void release() {
     if (mOwner != null) {
       mOwner.releaseCas(this);

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/AnnotationBaseFS.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/AnnotationBaseFS.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/AnnotationBaseFS.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/AnnotationBaseFS.java Fri Dec 23 22:00:21 2016
@@ -37,6 +37,5 @@ public interface AnnotationBaseFS extend
    * 
    * @return the CAS view associated with the Annotation's Sofa
    */
-  public CAS getView();
-
+  CAS getView(); 
 }

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/ArrayFS.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/ArrayFS.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/ArrayFS.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/ArrayFS.java Fri Dec 23 22:00:21 2016
@@ -28,13 +28,6 @@ package org.apache.uima.cas;
 public interface ArrayFS extends CommonArrayFS {
 
   /**
-   * Return the size of the array.
-   * 
-   * @return The size of the array.
-   */
-  int size(); // Java style. We can also call this getLength().
-
-  /**
    * Get the i-th feature structure from the array.
    * @param i index
    * @return The i-th feature structure.
@@ -72,7 +65,7 @@ public interface ArrayFS extends CommonA
    *              <code>destOffset + length &gt; destArray.length</code>.
    */
   void copyToArray(int srcOffset, FeatureStructure[] dest, int destOffset, int length)
-          throws ArrayIndexOutOfBoundsException;
+      throws ArrayIndexOutOfBoundsException;
 
   /**
    * Copy the contents of an external array into this array.
@@ -90,7 +83,7 @@ public interface ArrayFS extends CommonA
    *              <code>destOffset + length &gt; destArray.length</code>.
    */
   void copyFromArray(FeatureStructure[] src, int srcOffset, int destOffset, int length)
-          throws ArrayIndexOutOfBoundsException;
+      throws ArrayIndexOutOfBoundsException;
 
   /**
    * Creates a new array the this array is copied to.

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/BooleanArrayFS.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/BooleanArrayFS.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/BooleanArrayFS.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/BooleanArrayFS.java Fri Dec 23 22:00:21 2016
@@ -88,4 +88,5 @@ public interface BooleanArrayFS extends
    */
   void copyFromArray(boolean[] src, int srcOffset, int destOffset, int length)
           throws ArrayIndexOutOfBoundsException;
+
 }

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=1775919&r1=1775918&r2=1775919&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 Fri Dec 23 22:00:21 2016
@@ -24,15 +24,11 @@ import java.util.Iterator;
 import java.util.ListIterator;
 
 import org.apache.uima.cas.admin.CASAdminException;
-import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.LowLevelCAS;
 import org.apache.uima.cas.impl.SelectFSs_impl;
 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.Sofa;
-import org.apache.uima.jcas.cas.TOP;
-import org.apache.uima.jcas.tcas.Annotation;
 
 /**
  * Object-oriented CAS (Common Analysis System) API.

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/CommonArrayFS.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/CommonArrayFS.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/CommonArrayFS.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/CommonArrayFS.java Fri Dec 23 22:00:21 2016
@@ -29,14 +29,19 @@ public interface CommonArrayFS extends F
    * 
    * @return The size of the array.
    */
-  int size(); // Java style. We can also call this getLength().
+  int size(); 
 
   /**
    * Creates a new string array and copies this array values into it.
    * 
    * @return A Java array copy of this array.
    */
-  String[] toStringArray();
+  default String[] toStringArray() {
+    final int size = size();
+    String[] strArray = new String[size];
+    copyToArray(0, strArray, 0, size);
+    return strArray;
+  }
 
   /**
    * Copy the contents of the array to an external string array.
@@ -79,4 +84,26 @@ public interface CommonArrayFS extends F
   void copyFromArray(String[] src, int srcOffset, int destOffset, int length)
       throws ArrayIndexOutOfBoundsException, NumberFormatException;
 
+  /**
+   * @return a comma-separated string of the string values of the elements of the array
+   */
+  default String getValuesAsCommaSeparatedString() { 
+    String [] sa = toStringArray();
+    StringBuilder sb = new StringBuilder();
+    boolean isFirst = true;
+    for (String s : sa) {
+      if (!isFirst) {
+        sb.append(',');
+      }
+      isFirst = false;
+      sb.append(s);
+    }
+    return sb.toString();
+  }
+
+  /**
+   * Copy values from another array of the same kind
+   * @param v the other array
+   */
+  void copyValuesFrom(CommonArrayFS v);
 }

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FSIndex.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FSIndex.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FSIndex.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FSIndex.java Fri Dec 23 22:00:21 2016
@@ -19,10 +19,6 @@
 
 package org.apache.uima.cas;
 
-import org.apache.uima.cas.impl.LowLevelIndex;
-import org.apache.uima.cas.impl.SelectFSs_impl;
-import org.apache.uima.jcas.cas.TOP;
-
 /**
  * Feature structure index access interface.
  * 
@@ -172,7 +168,7 @@ public interface FSIndex<T extends Featu
    * @return An iterator positioned at <code>fs</code>, if it exists; else, an invalid iterator.
    */
   default FSIterator<T> iterator(FeatureStructure fs) {
-    FSIterator<T> it = (FSIterator<T>) iterator();
+    FSIterator<T> it = iterator();
     if (fs != null) {
       it.moveTo(fs);
     }
@@ -184,8 +180,9 @@ public interface FSIndex<T extends Featu
    * return the first item in the index.
    * If the index is empty, the iterator position will be marked as invalid.
    * 
-   * @return An iterator positioned at the beginning, or an invalid iterator.
+   * @return An FSIterator positioned at the beginning, or an invalid iterator.
    */
+  @Override
   FSIterator<T> iterator();
   
   /**

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FSIterator.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FSIterator.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FSIterator.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FSIterator.java Fri Dec 23 22:00:21 2016
@@ -20,7 +20,6 @@
 package org.apache.uima.cas;
 
 import java.util.ConcurrentModificationException;
-import java.util.Iterator;
 import java.util.ListIterator;
 import java.util.NoSuchElementException;
 import java.util.Spliterator;
@@ -178,6 +177,7 @@ public interface FSIterator<T extends Fe
    * 
    * @see java.util.Iterator#hasNext()
    */
+  @Override
   default boolean hasNext() {
     return isValid();
   }
@@ -187,6 +187,7 @@ public interface FSIterator<T extends Fe
    * 
    * @see java.util.Iterator#next()
    */
+  @Override
   default T next() {
     T result = get();
     moveToNext();
@@ -204,6 +205,7 @@ public interface FSIterator<T extends Fe
    * 
    * @see java.util.Iterator#remove()
    */
+  @Override
   default void remove() {
     throw new UnsupportedOperationException();
   } 

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FeatureStructure.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FeatureStructure.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FeatureStructure.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FeatureStructure.java Fri Dec 23 22:00:21 2016
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -19,12 +19,14 @@
 
 package org.apache.uima.cas;
 
+import org.apache.uima.cas.impl.FeatureStructureImplC;
+
 /**
  * Interface for feature structures.
- * 
+ *
  * This interface includes indirect getters and setters that use Feature object instances to specify the feature.
  *   There are multiple versions of these, corresponding to the consolidated types of the feature range.
- *   
+ *
  *   Here are the types:
  *     FeatureStructure - reference to another Feature structure
  *     String
@@ -35,21 +37,20 @@ package org.apache.uima.cas;
  *     short
  *     long
  *     double
- *     JavaObject  
- * 
+ *
  */
-public interface FeatureStructure {
+public interface FeatureStructure extends Cloneable {
 
   /**
    * Get the type of this FS.
-   * 
+   *
    * @return The type.
    */
   Type getType();
 
   /**
    * Set a feature value to another FS.
-   * 
+   *
    * @param feat
    *          The feature whose value should be set.
    * @param fs
@@ -63,7 +64,7 @@ public interface FeatureStructure {
 
   /**
    * Get a feature value.
-   * 
+   *
    * @param feat
    *          The feature whose value we want to get.
    * @return The value; may be <code>null</code> if the value has not been set.
@@ -73,10 +74,10 @@ public interface FeatureStructure {
    *              String.
    */
   FeatureStructure getFeatureValue(Feature feat) throws CASRuntimeException;
-
+  
   /**
    * Set the string value of a feature.
-   * 
+   *
    * @param feat
    *          The feature whose value we want to set.
    * @param s
@@ -90,7 +91,7 @@ public interface FeatureStructure {
 
   /**
    * Get the string value under a feature.
-   * 
+   *
    * @param f
    *          The feature for which we want the value.
    * @return The value of this feature; may be <code>null</code> if the value has not been set.
@@ -104,7 +105,7 @@ public interface FeatureStructure {
   /**
    * Get the float value of a feature. This method will throw an exception if the feature is not
    * float valued.
-   * 
+   *
    * @param feat
    *          The feature whose value we want to get.
    * @return The value float; <code>0.0</code> if the value has not been set.
@@ -116,7 +117,7 @@ public interface FeatureStructure {
 
   /**
    * Set the float value of a feature.
-   * 
+   *
    * @param feat
    *          The feature whose value we want to set.
    * @param f
@@ -130,7 +131,7 @@ public interface FeatureStructure {
   /**
    * Get the int value of a feature. This method will throw an exception if the feature is not int
    * valued.
-   * 
+   *
    * @param feat
    *          The feature whose value we want to get.
    * @return The value int; <code>0</code> if the value has not been set.
@@ -142,7 +143,7 @@ public interface FeatureStructure {
 
   /**
    * Set the int value of a feature.
-   * 
+   *
    * @param feat
    *          The feature whose value we want to set.
    * @param i
@@ -151,10 +152,10 @@ public interface FeatureStructure {
   void setIntValue(Feature feat, int i) throws CASRuntimeException;
 
   /**
-   * 
+   *
    * Get the byte value of a feature. This method will throw an exception if the feature is not byte
    * valued.
-   * 
+   *
    * @param feat
    *          The feature whose value we want to set.
    * @return The value byte; <code>0</code> if the value has not been set.
@@ -164,7 +165,7 @@ public interface FeatureStructure {
 
   /**
    * Set the byte (8 bit) value of a feature.
-   * 
+   *
    * @param feat
    *          The feature whose value we want to set.
    * @param i
@@ -176,7 +177,7 @@ public interface FeatureStructure {
   /**
    * Get the boolean value of a feature. This method will throw an exception if the feature is not
    * boolean valued.
-   * 
+   *
    * @param feat
    *          The feature whose value we want to get.
    * @return The value int; <code>0</code> if the value has not been set.
@@ -188,7 +189,7 @@ public interface FeatureStructure {
 
   /**
    * Set the boolean value of a feature.
-   * 
+   *
    * @param feat
    *          The feature whose value we want to set.
    * @param i
@@ -199,7 +200,7 @@ public interface FeatureStructure {
   /**
    * Get the short value of a feature. This method will throw an exception if the feature is not
    * short valued.
-   * 
+   *
    * @param feat
    *          The feature whose value we want to get.
    * @return The value int; <code>0</code> if the value has not been set.
@@ -211,7 +212,7 @@ public interface FeatureStructure {
 
   /**
    * Set the short (16 bit) value of a feature.
-   * 
+   *
    * @param feat
    *          The feature whose value we want to set.
    * @param i
@@ -222,7 +223,7 @@ public interface FeatureStructure {
   /**
    * Get the long value of a feature. This method will throw an exception if the feature is not long
    * valued.
-   * 
+   *
    * @param feat
    *          The feature whose value we want to get.
    * @return The value int; <code>0</code> if the value has not been set.
@@ -234,7 +235,7 @@ public interface FeatureStructure {
 
   /**
    * Set the long (64 bit) value of a feature.
-   * 
+   *
    * @param feat
    *          The feature whose value we want to set.
    * @param i
@@ -245,7 +246,7 @@ public interface FeatureStructure {
   /**
    * Get the double value of a feature. This method will throw an exception if the feature is not
    * double valued.
-   * 
+   *
    * @param feat
    *          The feature whose value we want to get.
    * @return The value int; <code>0</code> if the value has not been set.
@@ -257,19 +258,19 @@ public interface FeatureStructure {
 
   /**
    * Set the double value of a feature.
-   * 
+   *
    * @param feat
    *          The feature whose value we want to set.
    * @param i
    *          The double value we're setting the feature to.
    * @exception CASRuntimeException If <code>feat</code> is not defined for the type of this FS
    */
-  void setDoubleValue(Feature feat, double i) throws CASRuntimeException;    
-  
+  void setDoubleValue(Feature feat, double i) throws CASRuntimeException;
+
   /**
    * Get the value of the feature as a string if the type of the feature is one of the primitive
    * type.
-   * 
+   *
    * @param feat
    *          The feature whose value we want to get and whose type is one of the primitive types.
    * @return A string representation of the feature value.
@@ -282,8 +283,8 @@ public interface FeatureStructure {
   /**
    * Sets the value of a feature from a string input if the feature type is one of the primitive
    * types.
-   * 
-   * @param feat 
+   *
+   * @param feat
    *          The feature whose value we want to set.
    * @param s
    *          The string value that the feature will be set to.
@@ -294,34 +295,8 @@ public interface FeatureStructure {
   void setFeatureValueFromString(Feature feat, String s) throws CASRuntimeException;
 
   /**
-   * A feature structure is equal to another feature structure iff it is identical in the underlying
-   * representation.
-   * 
-   * @exception ClassCastException
-   *              If <code>o</code> is not a FS.
-   */
-  boolean equals(Object o) throws ClassCastException;
-
-  /**
-   * Creates a copy of this feature structure. The returned feature structure is shallow copy of the original 
-   * Feature Structure.  Updating the features of the clone will not affect the original.
-   * 
-   * @return a FeatureStructure that is the cloned copy of this FeatureStructure.
-   * @throws CASRuntimeException passthru
-   */
-  Object clone() throws CASRuntimeException;
-
-  /**
-   * Will return a hash code that's consistent with equality, i.e., if two FSs are equal, they will
-   * also return the same hash code.
-   * 
-   * @return The hash code.
-   */
-  int hashCode();
-
-  /**
    * Return the CAS that this FS belongs to.
-   * 
+   *
    * @return The CAS.
    */
   CAS getCAS();
@@ -331,11 +306,21 @@ public interface FeatureStructure {
    * @return the id
    */
   int _id();
-  
+
   /**
    * Internal use
    * @return the type code of this feature structure
    */
   int _getTypeCode();
   
+  /**
+   * Creates a copy of this feature structure. The returned feature structure is a new and separate
+   * object but all features of the feature structure which are not of builtin types (integer,
+   * float, string) will be shared between the clone and it's source FS.
+   * 
+   * @return a FeatureStructure that is the cloned copy of this FeatureStructure.
+   * @throws CASRuntimeException passthru
+   */
+  FeatureStructureImplC clone() throws CASRuntimeException;
 }
+

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FloatArrayFS.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FloatArrayFS.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FloatArrayFS.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/FloatArrayFS.java Fri Dec 23 22:00:21 2016
@@ -63,7 +63,7 @@ public interface FloatArrayFS extends Co
    *              If <code>srcOffset &lt; 0</code> or <code>length &gt; size()</code> or
    *              <code>destOffset + length &gt; destArray.length</code>.
    */
-  void copyToArray(int srcOffset, float[] dest, int destOffset, int length)
+  void copyToArray(int srcOffset, float[] dest, int destOffset, int length) 
           throws ArrayIndexOutOfBoundsException;
 
   /**
@@ -78,7 +78,7 @@ public interface FloatArrayFS extends Co
    * @param length
    *          The number of elements to copy.
    */
-  void copyFromArray(float[] src, int srcOffset, int destOffset, int length)
+  void copyFromArray(float[] src, int srcOffset, int destOffset, int length) 
           throws ArrayIndexOutOfBoundsException;
 
   /**
@@ -87,5 +87,4 @@ public interface FloatArrayFS extends Co
    * @return An array copy.
    */
   float[] toArray();
-
 }

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/IntArrayFS.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/IntArrayFS.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/IntArrayFS.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/IntArrayFS.java Fri Dec 23 22:00:21 2016
@@ -46,7 +46,7 @@ public interface IntArrayFS extends Comm
    * @exception ArrayIndexOutOfBoundsException
    *              If <code>index</code> is out of bounds.
    */
-  void set(int index, int value) throws ArrayIndexOutOfBoundsException;
+  void set(int index, int value);
 
   /**
    * Copy the contents of the array from <code>start</code> to <code>end</code> to the
@@ -81,11 +81,12 @@ public interface IntArrayFS extends Comm
    */
   void copyFromArray(int[] src, int srcOffset, int destOffset, int length)
           throws ArrayIndexOutOfBoundsException;
-
+  
   /**
    * Create a Java array that is a copy of the internal CAS array.
    * 
    * @return An array copy.
    */
   int[] toArray();
+
 }

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/LongArrayFS.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/LongArrayFS.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/LongArrayFS.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/LongArrayFS.java Fri Dec 23 22:00:21 2016
@@ -81,11 +81,10 @@ public interface LongArrayFS extends Com
    */
   void copyFromArray(long[] src, int srcOffset, int destOffset, int length)
           throws ArrayIndexOutOfBoundsException;
-
   /**
    * Creates a new array the this array is copied to.
    * 
    * @return A Java array copy of this FS array.
    */
-  long[] toArray();
+  long[] toArray();  
 }

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/SofaFS.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/SofaFS.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/SofaFS.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/SofaFS.java Fri Dec 23 22:00:21 2016
@@ -59,7 +59,7 @@ public interface SofaFS extends FeatureS
    * @throws CASRuntimeException
    *           if the Sofa data has already been set
    */
-  void setRemoteSofaURI(String aURI) throws CASRuntimeException;
+  void setRemoteSofaURI(String aURI);
 
   /**
    * Set the Local Subject of Analysis to be a predefined ArrayFS. Once set, the Sofa data cannot be
@@ -68,8 +68,8 @@ public interface SofaFS extends FeatureS
    * @throws CASRuntimeException
    *           if given FS is not an ArrayFS, or if the Sofa data has already been set
    */
+  
   void setLocalSofaData(FeatureStructure aFS) throws CASRuntimeException;
-
   /**
    * Set the Local Subject of Analysis to be a String. Once set, the Sofa data cannot be changed.
    * @param aString  The subject of analysis 
@@ -112,6 +112,13 @@ public interface SofaFS extends FeatureS
   String getSofaURI();
 
   /**
+   * Get the Sofa Ref value. (same as getSofaRef())
+   * @return the Sofa Reference value
+   */
+
+  int getSofaNum();
+  
+  /**
    * Get the Sofa Ref value.
    * @return the Sofa Reference value
    */
@@ -126,5 +133,4 @@ public interface SofaFS extends FeatureS
    * @return an InputStream for reading Sofa data. null returned if there is no Sofa data.
    */
   InputStream getSofaDataStream();
-
 }

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/StringArrayFS.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/StringArrayFS.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/StringArrayFS.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/StringArrayFS.java Fri Dec 23 22:00:21 2016
@@ -28,13 +28,6 @@ package org.apache.uima.cas;
 public interface StringArrayFS extends CommonArrayFS {
 
   /**
-   * Return the size of the array.
-   * 
-   * @return The size of the array.
-   */
-  int size();
-
-  /**
    * Get the i-th string from the array.
    * @param i the index
    * @return The i-th element.
@@ -55,39 +48,40 @@ public interface StringArrayFS extends C
    */
   void set(int i, String str) throws ArrayIndexOutOfBoundsException;
 
-  /**
-   * Copy the contents of the array from <code>start</code> to <code>end</code> to the
-   * destination <code>destArray</code> with destination offset <code>destOffset</code>.
-   * 
-   * @param srcOffset
-   *          The index of the first element to copy.
-   * @param dest
-   *          The array to copy to.
-   * @param destOffset
-   *          Where to start copying into <code>dest</code>.
-   * @param length
-   *          The number of elements to copy.
-   * @exception ArrayIndexOutOfBoundsException
-   *              If <code>srcOffset &lt; 0</code> or <code>length &gt; size()</code> or
-   *              <code>destOffset + length &gt; destArray.length</code>.
-   */
-  void copyToArray(int srcOffset, String[] dest, int destOffset, int length)
-          throws ArrayIndexOutOfBoundsException;
-
-  /**
-   * Copy the contents of an external array into this array.
-   * 
-   * @param src
-   *          The source array.
-   * @param srcOffset
-   *          Where to start copying in the source array.
-   * @param destOffset
-   *          Where to start copying to in the destination array.
-   * @param length
-   *          The number of elements to copy.
-   */
-  void copyFromArray(String[] src, int srcOffset, int destOffset, int length)
-          throws ArrayIndexOutOfBoundsException;
+  // these next 2 are inherited from super interface
+//  /**
+//   * Copy the contents of the array from <code>start</code> to <code>end</code> to the
+//   * destination <code>destArray</code> with destination offset <code>destOffset</code>.
+//   * 
+//   * @param srcOffset
+//   *          The index of the first element to copy.
+//   * @param dest
+//   *          The array to copy to.
+//   * @param destOffset
+//   *          Where to start copying into <code>dest</code>.
+//   * @param length
+//   *          The number of elements to copy.
+//   * @exception ArrayIndexOutOfBoundsException
+//   *              If <code>srcOffset &lt; 0</code> or <code>length &gt; size()</code> or
+//   *              <code>destOffset + length &gt; destArray.length</code>.
+//   */
+//  void copyToArray(int srcOffset, String[] dest, int destOffset, int length)
+//          throws ArrayIndexOutOfBoundsException;
+
+//  /**
+//   * Copy the contents of an external array into this array.
+//   * 
+//   * @param src
+//   *          The source array.
+//   * @param srcOffset
+//   *          Where to start copying in the source array.
+//   * @param destOffset
+//   *          Where to start copying to in the destination array.
+//   * @param length
+//   *          The number of elements to copy.
+//   */
+//  void copyFromArray(String[] src, int srcOffset, int destOffset, int length)
+//          throws ArrayIndexOutOfBoundsException;
 
   /**
    * Creates a new array the this array is copied to.
@@ -95,5 +89,4 @@ public interface StringArrayFS extends C
    * @return A Java array copy of this FS array.
    */
   String[] toArray();
-
 }

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/text/AnnotationFS.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/text/AnnotationFS.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/text/AnnotationFS.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/cas/text/AnnotationFS.java Fri Dec 23 22:00:21 2016
@@ -20,6 +20,8 @@
 package org.apache.uima.cas.text;
 
 import org.apache.uima.cas.AnnotationBaseFS;
+import org.apache.uima.cas.CASRuntimeException;
+import org.apache.uima.cas.impl.FeatureStructureImplC;
 
 /**
  * Interface for Annotation Feature Structures.
@@ -72,4 +74,4 @@ public interface AnnotationFS extends An
    */
   String getCoveredText();
 
-}
+ }

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/AnnotationBase.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/AnnotationBase.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/AnnotationBase.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/AnnotationBase.java Fri Dec 23 22:00:21 2016
@@ -50,7 +50,7 @@ import org.apache.uima.jcas.JCasRegistry
  * (which is view-specific),
  * it should be a subtype of this base type.
  */
-public class AnnotationBase extends TOP implements AnnotationBaseFS {
+public class AnnotationBase extends TOP implements AnnotationBaseImpl {
 
   /* public static strings for use where constants are needed, e.g. in some Java Annotations */
   public final static String _TypeName = "org.apache.uima.cas.jcas.AnnotationBase";

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/BooleanArray.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/BooleanArray.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/BooleanArray.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/BooleanArray.java Fri Dec 23 22:00:21 2016
@@ -23,13 +23,15 @@ import java.util.Iterator;
 import java.util.NoSuchElementException;
 
 import org.apache.uima.cas.BooleanArrayFS;
+import org.apache.uima.cas.CommonArrayFS;
+import org.apache.uima.cas.impl.BooleanArrayFSImpl;
 import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
 
 /** JCas class model for BooleanArray */
-public final class BooleanArray extends TOP implements CommonPrimitiveArray, BooleanArrayFS, Iterable<Boolean> {
+public final class BooleanArray extends TOP implements CommonPrimitiveArray, BooleanArrayFSImpl, Iterable<Boolean> {
 
   /* public static string for use where constants are needed, e.g. in some Java Annotations */
   public final static String _TypeName = "org.apache.uima.cas.jcas.BooleanArray";
@@ -159,13 +161,6 @@ public final class BooleanArray extends
     _casView.maybeLogArrayUpdates(this, destPos, length);
   }
 
-  public String[] toStringArray() {
-    final int size = size();
-    String[] strArray = new String[size];
-    copyToArray(0, strArray, 0, size);
-    return strArray;
-  }
-  
   // internal use
   public boolean[] _getTheArray() {
     return theArray;
@@ -175,7 +170,7 @@ public final class BooleanArray extends
    * @see org.apache.uima.jcas.cas.CommonArray#copyValuesFrom(org.apache.uima.jcas.cas.CommonArray)
    */
   @Override
-  public void copyValuesFrom(CommonArray v) {
+  public void copyValuesFrom(CommonArrayFS v) {
     BooleanArray bv = (BooleanArray) v;
     System.arraycopy(bv.theArray,  0,  theArray, 0, theArray.length);
     _casView.maybeLogArrayUpdates(this, 0, size());

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/ByteArray.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/ByteArray.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/ByteArray.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/ByteArray.java Fri Dec 23 22:00:21 2016
@@ -23,13 +23,15 @@ import java.util.Iterator;
 import java.util.NoSuchElementException;
 
 import org.apache.uima.cas.ByteArrayFS;
+import org.apache.uima.cas.CommonArrayFS;
+import org.apache.uima.cas.impl.ByteArrayFSImpl;
 import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
 
 /** JCas class model for ByteArray */
-public final class ByteArray extends TOP implements CommonPrimitiveArray, ByteArrayFS, Iterable<Byte> {
+public final class ByteArray extends TOP implements CommonPrimitiveArray, ByteArrayFSImpl, Iterable<Byte> {
 
   /* public static string for use where constants are needed, e.g. in some Java Annotations */
   public final static String _TypeName = "org.apache.uima.cas.jcas.ByteArray";
@@ -156,13 +158,6 @@ public final class ByteArray extends TOP
     _casView.maybeLogArrayUpdates(this, destPos, length);
   }
 
-  public String[] toStringArray() {
-    final int size = size();
-    String[] strArray = new String[size];
-    copyToArray(0, strArray, 0, size);
-    return strArray;
-  }
-  
   // internal use
   public byte[] _getTheArray() {
     return theArray;
@@ -172,7 +167,7 @@ public final class ByteArray extends TOP
    * @see org.apache.uima.jcas.cas.CommonArray#copyValuesFrom(org.apache.uima.jcas.cas.CommonArray)
    */
   @Override
-  public void copyValuesFrom(CommonArray v) {
+  public void copyValuesFrom(CommonArrayFS v) {
     ByteArray bv = (ByteArray) v;
     System.arraycopy(bv.theArray,  0,  theArray, 0, theArray.length);
     _casView.maybeLogArrayUpdates(this, 0, size());

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/CommonPrimitiveArray.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/CommonPrimitiveArray.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/CommonPrimitiveArray.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/CommonPrimitiveArray.java Fri Dec 23 22:00:21 2016
@@ -19,11 +19,13 @@
 
 package org.apache.uima.jcas.cas;
 
+import org.apache.uima.cas.CommonArrayFS;
+
 /**
  * This interface is implemented by arrays of non-FeatureStructure components 
  *   boolean, byte, short, int, long, float, double, String, JavaObject
  */
-public interface CommonPrimitiveArray extends CommonArray {
+public interface CommonPrimitiveArray extends CommonArrayFS {
   
   /**
    * Set an array value from a string representation

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/DoubleArray.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/DoubleArray.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/DoubleArray.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/DoubleArray.java Fri Dec 23 22:00:21 2016
@@ -20,21 +20,21 @@
 package org.apache.uima.jcas.cas;
 
 import java.util.Arrays;
-import java.util.Iterator;
 import java.util.NoSuchElementException;
-import java.util.PrimitiveIterator;
 import java.util.PrimitiveIterator.OfDouble;
 import java.util.Spliterator;
 import java.util.stream.DoubleStream;
 
+import org.apache.uima.cas.CommonArrayFS;
 import org.apache.uima.cas.DoubleArrayFS;
 import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.DoubleArrayFSImpl;
 import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
 
 /** JCas class model for DoubleArray */
-public final class DoubleArray extends TOP implements CommonPrimitiveArray, DoubleArrayFS, Iterable<Double> {
+public final class DoubleArray extends TOP implements CommonPrimitiveArray, DoubleArrayFSImpl, Iterable<Double> {
 
   /* public static string for use where constants are needed, e.g. in some Java Annotations */
   public final static String _TypeName = "org.apache.uima.cas.jcas.DoubleArray";
@@ -159,13 +159,6 @@ public final class DoubleArray extends T
       theArray[i + destPos] = Double.parseDouble(src[i + srcPos]);
     }
   }
-
-  public String[] toStringArray() {
-    final int size = size();
-    String[] strArray = new String[size];
-    copyToArray(0, strArray, 0, size);
-    return strArray;
-  }
   
   // internal use
   public double[] _getTheArray() {
@@ -176,7 +169,7 @@ public final class DoubleArray extends T
    * @see org.apache.uima.jcas.cas.CommonArray#copyValuesFrom(org.apache.uima.jcas.cas.CommonArray)
    */
   @Override
-  public void copyValuesFrom(CommonArray v) {
+  public void copyValuesFrom(CommonArrayFS v) {
     DoubleArray bv = (DoubleArray) v;
     System.arraycopy(bv.theArray,  0,  theArray, 0, theArray.length);
   }

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/FSArray.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/FSArray.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/FSArray.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/FSArray.java Fri Dec 23 22:00:21 2016
@@ -26,8 +26,8 @@ import java.util.Spliterator;
 import java.util.stream.Stream;
 import java.util.stream.StreamSupport;
 
-import org.apache.uima.cas.ArrayFS;
 import org.apache.uima.cas.CASRuntimeException;
+import org.apache.uima.cas.CommonArrayFS;
 import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.TypeImpl;
@@ -35,7 +35,7 @@ import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
 
 /** Java Class model for Cas FSArray type */
-public final class FSArray extends TOP implements Iterable<TOP>, CommonArray, ArrayFS, SelectViaCopyToArray {
+public final class FSArray extends TOP implements Iterable<TOP>, ArrayFSImpl, SelectViaCopyToArray {
 
   /* public static string for use where constants are needed, e.g. in some Java Annotations */
   public final static String _TypeName = "org.apache.uima.cas.jcas.FSArray";
@@ -206,13 +206,6 @@ public final class FSArray extends TOP i
     }
   }
 
-  public String[] toStringArray() {
-    final int size = size();
-    String[] strArray = new String[size];
-    copyToArray(0, strArray, 0, size);
-    return strArray;
-  }
-
   // internal use
   // used by serializers, other impls (e.g. FSHashSet)
   // no conversion to Pear trampolines done
@@ -225,7 +218,7 @@ public final class FSArray extends TOP i
    * no conversion to Pear trampolines done
    */
   @Override
-  public void copyValuesFrom(CommonArray v) {
+  public void copyValuesFrom(CommonArrayFS v) {
     FSArray bv = (FSArray) v;
     System.arraycopy(bv.theArray,  0,  theArray, 0, theArray.length);
     _casView.maybeLogArrayUpdates(this, 0, size());

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/FSArrayList.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/FSArrayList.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/FSArrayList.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/FSArrayList.java Fri Dec 23 22:00:21 2016
@@ -66,7 +66,7 @@ import org.apache.uima.util.impl.Constan
  * @param <T> the generic type
  */
 public final class FSArrayList <T extends TOP> extends TOP implements 
-                                 UimaSerializableFSs, CommonArray, CommonArrayFS, SelectViaCopyToArray, 
+                                 UimaSerializableFSs, CommonArrayFS, SelectViaCopyToArray, 
                                  List<T>, RandomAccess, Cloneable {
 
   /** The Constant EMPTY_LIST. */
@@ -405,17 +405,6 @@ public final class FSArrayList <T extend
       i++;
     }
   }
-
-  /* (non-Javadoc)
-   * @see org.apache.uima.jcas.cas.CommonArray#toStringArray()
-   */
-  @Override
-  public String[] toStringArray() {
-    final int size = size();
-    String[] strArray = new String[size];
-    copyToArray(0, strArray, 0, size);
-    return strArray;
-  }
   
   /* 
    * 
@@ -424,7 +413,7 @@ public final class FSArrayList <T extend
    * no conversion to Pear trampolines done
    */
   @Override
-  public void copyValuesFrom(CommonArray v) {
+  public void copyValuesFrom(CommonArrayFS v) {
     clear();
     Spliterator<T> si;
     if (v instanceof FSArrayList) {

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/FloatArray.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/FloatArray.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/FloatArray.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/FloatArray.java Fri Dec 23 22:00:21 2016
@@ -19,14 +19,15 @@
 
 package org.apache.uima.jcas.cas;
 
-import org.apache.uima.cas.FloatArrayFS;
+import org.apache.uima.cas.CommonArrayFS;
 import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.FloatArrayFSImpl;
 import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
 
 /** Java Cas model for Cas FloatArray. */
-public final class FloatArray extends TOP implements CommonPrimitiveArray, FloatArrayFS {
+public final class FloatArray extends TOP implements CommonPrimitiveArray, FloatArrayFSImpl {
 
   /* public static string for use where constants are needed, e.g. in some Java Annotations */
   public final static String _TypeName = "org.apache.uima.cas.jcas.FloatArray";
@@ -173,16 +174,6 @@ public final class FloatArray extends TO
       set(i + destOffset, Float.parseFloat(src[i + srcOffset]));
     }
   }
-
-  /**
-   * @see org.apache.uima.cas.FloatArrayFS#toStringArray()
-   */
-  public String[] toStringArray() {
-    final int size = size();
-    String[] strArray = new String[size];
-    copyToArray(0, strArray, 0, size);
-    return strArray;
-  }
   
   // internal use only
   public float[] _getTheArray() {
@@ -193,7 +184,7 @@ public final class FloatArray extends TO
    * @see org.apache.uima.jcas.cas.CommonArray#copyValuesFrom(org.apache.uima.jcas.cas.CommonArray)
    */
   @Override
-  public void copyValuesFrom(CommonArray v) {
+  public void copyValuesFrom(CommonArrayFS v) {
     FloatArray bv = (FloatArray) v;
     System.arraycopy(bv.theArray,  0,  theArray, 0, theArray.length);
     _casView.maybeLogArrayUpdates(this, 0, size());

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/IntegerArray.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/IntegerArray.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/IntegerArray.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/IntegerArray.java Fri Dec 23 22:00:21 2016
@@ -20,23 +20,21 @@
 package org.apache.uima.jcas.cas;
 
 import java.util.Arrays;
-import java.util.Iterator;
 import java.util.NoSuchElementException;
 import java.util.PrimitiveIterator.OfInt;
 import java.util.Spliterator;
 import java.util.function.IntConsumer;
 import java.util.stream.IntStream;
-import java.util.stream.Stream;
 
-import org.apache.uima.List_of_ints;
-import org.apache.uima.cas.IntArrayFS;
+import org.apache.uima.cas.CommonArrayFS;
 import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.IntArrayFSImpl;
 import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
 
 /** The Java Class model corresponding to the Cas IntegerArray_JCasImpl type. */
-public final class IntegerArray extends TOP implements CommonPrimitiveArray, IntArrayFS, Iterable<Integer> {
+public final class IntegerArray extends TOP implements CommonPrimitiveArray, IntArrayFSImpl, Iterable<Integer> {
 
   /* public static string for use where constants are needed, e.g. in some Java Annotations */
   public final static String _TypeName = "org.apache.uima.cas.jcas.IntegerArray";
@@ -164,16 +162,6 @@ public final class IntegerArray extends
     }
   }
 
-  /**
-   * @see org.apache.uima.cas.IntArrayFS#toStringArray()
-   */
-  public String[] toStringArray() {
-    final int size = size();
-    String[] strArray = new String[size];
-    copyToArray(0, strArray, 0, size);
-    return strArray;
-  }
-  
   // internal use only
   public int[] _getTheArray() {
     return theArray;
@@ -183,7 +171,7 @@ public final class IntegerArray extends
    * @see org.apache.uima.jcas.cas.CommonArray#copyValuesFrom(org.apache.uima.jcas.cas.CommonArray)
    */
   @Override
-  public void copyValuesFrom(CommonArray v) {
+  public void copyValuesFrom(CommonArrayFS v) {
     IntegerArray bv = (IntegerArray) v;
     System.arraycopy(bv.theArray,  0,  theArray, 0, theArray.length);
     _casView.maybeLogArrayUpdates(this, 0, size());

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/IntegerArrayList.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/IntegerArrayList.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/IntegerArrayList.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/IntegerArrayList.java Fri Dec 23 22:00:21 2016
@@ -28,6 +28,7 @@ import java.util.stream.StreamSupport;
 
 import org.apache.uima.List_of_ints;
 import org.apache.uima.UimaSerializable;
+import org.apache.uima.cas.CommonArrayFS;
 import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.FeatureStructureImplC;
@@ -55,7 +56,7 @@ import org.apache.uima.jcas.JCasRegistry
  */
 public final class IntegerArrayList extends TOP implements 
                                  Iterable<Integer>,
-                                 UimaSerializable, CommonArray, 
+                                 UimaSerializable, CommonArrayFS, 
                                  RandomAccess, Cloneable {
 
   /* public static string for use where constants are needed, e.g. in some Java Annotations */
@@ -305,21 +306,13 @@ public final class IntegerArrayList exte
     }
   }
 
-  @Override
-  public String[] toStringArray() {
-    final int size = size();
-    String[] strArray = new String[size];
-    copyToArray(0, strArray, 0, size);
-    return strArray;
-  }
-  
   /* 
    * 
    * (non-Javadoc)
    * @see org.apache.uima.jcas.cas.CommonArray#copyValuesFrom(org.apache.uima.jcas.cas.CommonArray)
    */
   @Override
-  public void copyValuesFrom(CommonArray v) {
+  public void copyValuesFrom(CommonArrayFS v) {
     clear();
     Spliterator.OfInt si;
     

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/LongArray.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/LongArray.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/LongArray.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/LongArray.java Fri Dec 23 22:00:21 2016
@@ -20,21 +20,21 @@
 package org.apache.uima.jcas.cas;
 
 import java.util.Arrays;
-import java.util.Iterator;
 import java.util.NoSuchElementException;
 import java.util.PrimitiveIterator.OfLong;
-import java.util.stream.DoubleStream;
-import java.util.stream.LongStream;
 import java.util.Spliterator;
+import java.util.stream.LongStream;
 
+import org.apache.uima.cas.CommonArrayFS;
 import org.apache.uima.cas.LongArrayFS;
 import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.LongArrayFSImpl;
 import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
 
 /** JCas class model for LongArray */
-public final class LongArray extends TOP implements CommonPrimitiveArray, LongArrayFS, Iterable<Long> {
+public final class LongArray extends TOP implements CommonPrimitiveArray, LongArrayFSImpl, Iterable<Long> {
 
   /* public static string for use where constants are needed, e.g. in some Java Annotations */
   public final static String _TypeName = "org.apache.uima.cas.jcas.LongArray";
@@ -162,13 +162,6 @@ public final class LongArray extends TOP
     _casView.maybeLogArrayUpdates(this, destPos, length);
   }
 
-  public String[] toStringArray() {
-    final int size = size();
-    String[] strArray = new String[size];
-    copyToArray(0, strArray, 0, size);
-    return strArray;
-  }
-  
   // internal use
   public long[] _getTheArray() {
     return theArray;
@@ -178,7 +171,7 @@ public final class LongArray extends TOP
    * @see org.apache.uima.jcas.cas.CommonArray#copyValuesFrom(org.apache.uima.jcas.cas.CommonArray)
    */
   @Override
-  public void copyValuesFrom(CommonArray v) {
+  public void copyValuesFrom(CommonArrayFS v) {
     LongArray bv = (LongArray) v;
     System.arraycopy(bv.theArray,  0,  theArray, 0, theArray.length);
     _casView.maybeLogArrayUpdates(this, 0, size());

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/ShortArray.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/ShortArray.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/ShortArray.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/ShortArray.java Fri Dec 23 22:00:21 2016
@@ -22,14 +22,16 @@ package org.apache.uima.jcas.cas;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 
+import org.apache.uima.cas.CommonArrayFS;
 import org.apache.uima.cas.ShortArrayFS;
 import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.ShortArrayFSImpl;
 import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
 
 /** JCas class model for ShortArray */
-public final class ShortArray extends TOP implements CommonPrimitiveArray, ShortArrayFS, Iterable<Short> {
+public final class ShortArray extends TOP implements CommonPrimitiveArray, ShortArrayFSImpl, Iterable<Short> {
 
   /* public static string for use where constants are needed, e.g. in some Java Annotations */
   public final static String _TypeName = "org.apache.uima.cas.jcas.ShortArray";
@@ -155,13 +157,6 @@ public final class ShortArray extends TO
     }
     _casView.maybeLogArrayUpdates(this, destPos, length);
   }
-
-  public String[] toStringArray() {
-    final int size = size();
-    String[] strArray = new String[size];
-    copyToArray(0, strArray, 0, size);
-    return strArray;
-  }
   
   // internal use
   public short[] _getTheArray() {
@@ -172,7 +167,7 @@ public final class ShortArray extends TO
    * @see org.apache.uima.jcas.cas.CommonArray#copyValuesFrom(org.apache.uima.jcas.cas.CommonArray)
    */
   @Override
-  public void copyValuesFrom(CommonArray v) {
+  public void copyValuesFrom(CommonArrayFS v) {
     ShortArray bv = (ShortArray) v;
     System.arraycopy(bv.theArray,  0,  theArray, 0, theArray.length);
     _casView.maybeLogArrayUpdates(this, 0, size());

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/Sofa.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/Sofa.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/Sofa.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/Sofa.java Fri Dec 23 22:00:21 2016
@@ -24,13 +24,13 @@ import java.io.InputStream;
 import org.apache.uima.cas.CASRuntimeException;
 import org.apache.uima.cas.Feature;
 import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.SofaFS;
 import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.SofaFSImpl;
 import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.cas.impl.TypeSystemImpl;
 import org.apache.uima.jcas.JCasRegistry;
 
-public class Sofa extends TOP implements SofaFS {
+public class Sofa extends TOP implements SofaFSImpl {
   
   /* public static string for use where constants are needed, e.g. in some Java Annotations */
   public final static String _TypeName = "org.apache.uima.jcas.cas.Sofa";
@@ -243,7 +243,6 @@ public class Sofa extends TOP implements
 	  throw new CASRuntimeException(CASRuntimeException.PROTECTED_SOFA_FEATURE);
 	}
 
-	// override setFeatureValue for SofaFS to prohibit setting in this manner!
 	@Override
   public void setFeatureValue(Feature feat, FeatureStructure fs) {
 		throw new CASRuntimeException(CASRuntimeException.PROTECTED_SOFA_FEATURE);

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/StringArray.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/StringArray.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/StringArray.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/cas/StringArray.java Fri Dec 23 22:00:21 2016
@@ -22,14 +22,16 @@ package org.apache.uima.jcas.cas;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 
+import org.apache.uima.cas.CommonArrayFS;
 import org.apache.uima.cas.StringArrayFS;
 import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.StringArrayFSImpl;
 import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
 
 /** JCas class model for StringArray */
-public final class StringArray extends TOP implements Iterable<String>, CommonPrimitiveArray, StringArrayFS {
+public final class StringArray extends TOP implements Iterable<String>, CommonPrimitiveArray, StringArrayFSImpl {
 
   /* public static string for use where constants are needed, e.g. in some Java Annotations */
   public final static String _TypeName = "org.apache.uima.jcas.cas.StringArray";
@@ -135,13 +137,6 @@ public final class StringArray extends T
     return theArray.length;
   }
 
-  public String[] toStringArray() {
-    final int size = size();
-    String[] strArray = new String[size];
-    copyToArray(0, strArray, 0, size);
-    return strArray;
-  }
-  
   // internal use
   public String[] _getTheArray() {
     return theArray;
@@ -151,7 +146,7 @@ public final class StringArray extends T
    * @see org.apache.uima.jcas.cas.CommonArray#copyValuesFrom(org.apache.uima.jcas.cas.CommonArray)
    */
   @Override
-  public void copyValuesFrom(CommonArray v) {
+  public void copyValuesFrom(CommonArrayFS v) {
     StringArray bv = (StringArray) v;
     System.arraycopy(bv.theArray,  0,  theArray, 0, theArray.length);
     _casView.maybeLogArrayUpdates(this, 0, size());

Modified: uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/tcas/Annotation.java
URL: http://svn.apache.org/viewvc/uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/tcas/Annotation.java?rev=1775919&r1=1775918&r2=1775919&view=diff
==============================================================================
--- uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/tcas/Annotation.java (original)
+++ uima/uimaj/branches/experiment-v3-jcas/uimaj-core/src/main/java/org/apache/uima/jcas/tcas/Annotation.java Fri Dec 23 22:00:21 2016
@@ -27,13 +27,14 @@ import org.apache.uima.cas.text.Annotati
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
 import org.apache.uima.jcas.cas.AnnotationBase;
+import org.apache.uima.jcas.cas.AnnotationImpl;
 
 /**
  * the JCas class model for the CAS type uima.cas.Annotation. It defines two integer valued features
  * indicating the begin and end of the span being annotated. There is also a method to retrieve the
  * spanned text as a string.
  */
-public class Annotation extends AnnotationBase implements AnnotationFS {
+public class Annotation extends AnnotationBase implements AnnotationImpl {
 
   /* public static string for use where constants are needed, e.g. in some Java Annotations */
   public final static String _TypeName = "org.apache.uima.jcas.cas.Annotation";