You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by bu...@apache.org on 2016/08/19 13:22:22 UTC

svn commit: r1756914 - in /uima/uimaj/trunk/uimaj-core/src: main/java/org/apache/uima/resource/impl/ main/resources/org/apache/uima/ test/java/org/apache/uima/analysis_engine/impl/ test/resources/TextAnalysisEngineImplTest/ test/resources/org/apache/ui...

Author: burn
Date: Fri Aug 19 13:22:22 2016
New Revision: 1756914

URL: http://svn.apache.org/viewvc?rev=1756914&view=rev
Log:
UIMA-5058 Changed to check that each piece of metadata already exists; name the failing item in the error msg; added JUnit tests

Added:
    uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/AggregateForMultipleAeTest.xml   (with props)
    uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest.xml   (with props)
    uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest2.xml   (with props)
    uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest3.xml   (with props)
    uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest4.xml   (with props)
    uima/uimaj/trunk/uimaj-core/src/test/resources/org/apache/uima/resource/metadata/impl/ImportsTypeSystemImportedByName.xml   (with props)
    uima/uimaj/trunk/uimaj-core/src/test/resources/org/apache/uima/resource/metadata/impl/TypeSystemImportedByName2.xml   (with props)
Modified:
    uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/impl/CasManager_impl.java
    uima/uimaj/trunk/uimaj-core/src/main/resources/org/apache/uima/UIMAException_Messages.properties
    uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/analysis_engine/impl/AnalysisEngine_implTest.java

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/impl/CasManager_impl.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/impl/CasManager_impl.java?rev=1756914&r1=1756913&r2=1756914&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/impl/CasManager_impl.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/impl/CasManager_impl.java Fri Aug 19 13:22:22 2016
@@ -20,6 +20,7 @@
 package org.apache.uima.resource.impl;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
@@ -41,8 +42,12 @@ import org.apache.uima.resource.CasManag
 import org.apache.uima.resource.ResourceInitializationException;
 import org.apache.uima.resource.ResourceManager;
 import org.apache.uima.resource.metadata.FsIndexCollection;
+import org.apache.uima.resource.metadata.FsIndexDescription;
+import org.apache.uima.resource.metadata.MetaDataObject;
 import org.apache.uima.resource.metadata.ProcessingResourceMetaData;
+import org.apache.uima.resource.metadata.TypeDescription;
 import org.apache.uima.resource.metadata.TypePriorities;
+import org.apache.uima.resource.metadata.TypePriorityList;
 import org.apache.uima.resource.metadata.TypeSystemDescription;
 import org.apache.uima.util.CasCreationUtils;
 import org.apache.uima.util.CasPool;
@@ -96,56 +101,99 @@ public class CasManager_impl implements
    */
   public synchronized void addMetaData(ProcessingResourceMetaData aMetaData) {
     if (mCasDefinition != null) {
-      if (containsSameTypeAndIndexInfo(aMetaData)) { //UIMA-1249
+      String error = containsSameTypeAndIndexInfo(aMetaData);  //UIMA-1249 UIMA-5058
+      if (error == null) { 
         return;
       }
-      throw new UIMARuntimeException(UIMARuntimeException.ILLEGAL_ADDING_OF_NEW_META_INFO_AFTER_CAS_DEFINED, new Object[] {});  // internal error  UIMA-1249    
+      throw new UIMARuntimeException(UIMARuntimeException.ILLEGAL_ADDING_OF_NEW_META_INFO_AFTER_CAS_DEFINED, new Object[] {error});  // internal error  UIMA-1249    
     }
     mMetaDataList.add(aMetaData);
-//    mCasDefinition = null; // marka this stale
-//    mCurrentTypeSystem = null; //this too
   }
   
   /**
-   * This comparison is needed to avoid throwing errors in the use case:
+   * This check is needed to avoid throwing errors in the use case:
    *   a) the pipeline has been fully initialized, and one or more CASes have been drawn from this pool
    *   b) Another instance of an annotator using the same resource manager is initialized.
    *   
    * In this case there is no change to the metadata, and we do not want to disturb anything.
    * 
    * @param md the metadata to see if its in the list already
-   * @return true if the type system description, the type priority description, and the index collection are
-   * in the list already.
+   * @return  null if the type system description, the type priority description, and the index collection are in the list already,
+   *          or the name of the failing item. UIMA-5058
    */
-  private boolean containsSameTypeAndIndexInfo(ProcessingResourceMetaData md) {
+  private String containsSameTypeAndIndexInfo(ProcessingResourceMetaData md) {
     final TypeSystemDescription tsd = md.getTypeSystem();
-    final TypePriorities tsp = md.getTypePriorities();
+    if (tsd != null) {
+      for (TypeDescription td : tsd.getTypes()) {
+        String missing = findMissingEntry(td);
+        if (missing != null) return missing;  // At least 1 type is new
+      }
+    }
+    final TypePriorities tp = md.getTypePriorities();
+    if (tp != null) {
+      for (TypePriorityList tpl : tp.getPriorityLists()) {
+        String missing = findMissingEntry(tpl);
+        if (missing != null) return missing;  // At least 1 priority-list is new
+      }
+    }
     final FsIndexCollection ic = md.getFsIndexCollection();
-    
-    for (ProcessingResourceMetaData item : mMetaDataList) {
-      final TypeSystemDescription otsd = item.getTypeSystem();
-      final TypePriorities otsp = item.getTypePriorities();
-      final FsIndexCollection oic = item.getFsIndexCollection();
-      if (equalsWithNulls(tsp, otsp) &&
-          equalsWithNulls(tsd, otsd) &&
-          equalsWithNulls(ic , oic )) {
-        return true;
+    if (ic != null) {
+      for (FsIndexDescription fid : ic.getFsIndexes()) {
+        String missing = findMissingEntry(fid);
+        if (missing != null) return missing;   // At least 1 index is new
+      }
+    }
+    return null;  // All metadata already merged
+  }
+  
+  /*
+   * Check if the MetaDataObject is missing from the already merged CasDefinition
+   * Returns its name, or null if it is found.
+   */
+  private String findMissingEntry(MetaDataObject mdo) {
+    for (ProcessingResourceMetaData oldMd : mMetaDataList) {
+      MetaDataObject[] array = getMdArray(mdo, oldMd);
+      if (array != null) {
+        for (MetaDataObject oldMdo : array) {
+          if (mdo.equals(oldMdo)) return null;
+        }
       }
     }
-    return false;
+    return getMdName(mdo);
   }
   
-  private boolean equalsWithNulls(Object a, Object b) {
-    if (a == null && b == null) {
-      return true;
+  /*
+   * Return an array of TypeDescriptions or TypePriorities or FsIndexDescriptions
+   */
+  private MetaDataObject[] getMdArray(MetaDataObject type, ProcessingResourceMetaData md) {
+    if (type instanceof TypeDescription) {
+      TypeSystemDescription tsd = md.getTypeSystem();
+      return tsd==null ? null : tsd.getTypes();
+    } else if (type instanceof TypePriorityList) {
+      TypePriorities tp = md.getTypePriorities();
+      return tp==null ? null : tp.getPriorityLists();
+    } else if (type instanceof FsIndexDescription) {
+       FsIndexCollection ic = md.getFsIndexCollection();
+      return ic==null ? null : ic.getFsIndexes();
     }
-    if (a != null) {
-      return a.equals(b);
-    } else {
-      return b.equals(a);
+    return null;
+  }
+  
+  /*
+   * Return the "name" of the MetaDataObject for an error message
+   */
+  private String getMdName(MetaDataObject type) {
+    String name = "?";
+    if (type instanceof TypeDescription) {
+      name = "Type: " + ((TypeDescription)type).getName();
+    } else if (type instanceof TypePriorityList) {
+      name = "TypePriority: " + Arrays.toString(((TypePriorityList)type).getTypes());
+    } else if (type instanceof FsIndexDescription) {
+      name = "FsIndex: " + ((FsIndexDescription)type).getLabel();
     }
+    return name + "@" + type.getSourceUrlString();
   }
-
+  
   /*
    * (non-Javadoc)
    * 

Modified: uima/uimaj/trunk/uimaj-core/src/main/resources/org/apache/uima/UIMAException_Messages.properties
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/resources/org/apache/uima/UIMAException_Messages.properties?rev=1756914&r1=1756913&r2=1756914&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/resources/org/apache/uima/UIMAException_Messages.properties (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/resources/org/apache/uima/UIMAException_Messages.properties Fri Aug 19 13:22:22 2016
@@ -55,7 +55,7 @@ illegal_cas_copy_to_same_cas = It is not
 
 unsupported_cas_copy_view_base_cas = Unsupported invocation of CasCopier copyCasView, specifying a source or destination as a base CAS.
 
-illegal_adding_of_new_meta_info = Illegal adding of additional MetaData after CASes have been defined.  Likely cause is the reuse of a Resource Manager object for a different pipeline, after it has already been initialized.
+illegal_adding_of_new_meta_info = Illegal adding of additional MetaData after CASes have been defined.\n  {0}\n  Likely cause is the reuse of a Resource Manager object for a different pipeline, after it has already been initialized.
 
 illegal_update_indexed_fs = Illegal update of indexed Feature Structure feature used as an key in one or more indices
 
@@ -573,4 +573,4 @@ DESERIALIZING_COMPRESSED_BINARY_UNSUPPOR
 DEREF_FS_OTHER_CAS = Dereferencing a FeatureStructure of a CAS in a different CAS''s context. This can happen if you try to set a feature structure reference to a value of a feature structure belonging to an entirely different CAS. FS = "{0}", CAS = "{1}".
 ILLEGAL_FEAT_SET = While a FeatureStructure was in the index, an illegal attempt was made to modify Feature "{0}" which is used as a key in one or more indices; the Feature Structure being modified was "{1}".
 LENIENT_NOT_SUPPORTED = Lenient deserialization not support for input of type {0}.
-SWITCH_CLASS_LOADER_NESTED = Multiply nested classloaders not supported.  Original base loader: {0}, current nested loader: {1}, trying to switch to loader: {2}.
\ No newline at end of file
+SWITCH_CLASS_LOADER_NESTED = Multiply nested classloaders not supported.  Original base loader: {0}, current nested loader: {1}, trying to switch to loader: {2}.

Modified: uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/analysis_engine/impl/AnalysisEngine_implTest.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/analysis_engine/impl/AnalysisEngine_implTest.java?rev=1756914&r1=1756913&r2=1756914&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/analysis_engine/impl/AnalysisEngine_implTest.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/analysis_engine/impl/AnalysisEngine_implTest.java Fri Aug 19 13:22:22 2016
@@ -1622,4 +1622,59 @@ public class AnalysisEngine_implTest ext
     rdr.close();
     return len;
   }
+  
+  /*
+   * Test attempts to update the type-system after the lazy merge (UIMA-1249 & 5048)
+   * Creating a 2nd identical AE should be OK even if the types are assembled in a different order.
+   * Creating an AE with an unseen type, type-priority, or index should fail. 
+   */
+  public void testAdditionalAEs() throws Exception {
+
+    // Create an AE and "freeze" the type-system
+    AnalysisEngineDescription desc = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(
+            new XMLInputSource(JUnitExtension.getFile("TextAnalysisEngineImplTest/AggregateForMultipleAeTest.xml")));
+    UIMAFramework.getLogger().setLevel(Level.CONFIG);
+    AnalysisEngine ae1 = UIMAFramework.produceAnalysisEngine(desc);
+    ae1.newCAS();
+    
+    // Creating a 2nd duplicate engine failed in 2.8.1 if the 2nd of the 2 typesystems imported
+    // is also contained in the 1st (UIMA-5058)
+    try {
+      AnalysisEngineDescription desc2 = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(
+              new XMLInputSource(JUnitExtension.getFile("TextAnalysisEngineImplTest/MultipleAeTest.xml")));
+      UIMAFramework.produceAnalysisEngine(desc2, ae1.getResourceManager(), null);
+    } catch (Exception e) {
+      JUnitExtension.handleException(e);
+    }
+    
+    // Try creating one with at least one different type
+    try {
+      AnalysisEngineDescription desc2 = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(
+              new XMLInputSource(JUnitExtension.getFile("TextAnalysisEngineImplTest/MultipleAeTest2.xml")));
+      UIMAFramework.produceAnalysisEngine(desc2, ae1.getResourceManager(), null);
+      fail();
+    } catch (Exception e) {
+      System.err.println("Expected exception: " + e);
+    }
+    
+    // Try creating one with different type-priorities
+    try {
+      AnalysisEngineDescription desc2 = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(
+              new XMLInputSource(JUnitExtension.getFile("TextAnalysisEngineImplTest/MultipleAeTest3.xml")));
+      UIMAFramework.produceAnalysisEngine(desc2, ae1.getResourceManager(), null);
+      fail();
+    } catch (Exception e) {
+      System.err.println("Expected exception: " + e);
+    }
+    
+    // Try creating one with different indexes
+    try {
+      AnalysisEngineDescription desc2 = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(
+              new XMLInputSource(JUnitExtension.getFile("TextAnalysisEngineImplTest/MultipleAeTest4.xml")));
+      UIMAFramework.produceAnalysisEngine(desc2, ae1.getResourceManager(), null);
+      fail();
+    } catch (Exception e) {
+      System.err.println("Expected exception: " + e);
+    }
+  }
 }

Added: uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/AggregateForMultipleAeTest.xml
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/AggregateForMultipleAeTest.xml?rev=1756914&view=auto
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/AggregateForMultipleAeTest.xml (added)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/AggregateForMultipleAeTest.xml Fri Aug 19 13:22:22 2016
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<!-- Descriptor for testing external overrides. -->
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier">
+  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+  <primitive>false</primitive>
+  <delegateAnalysisEngineSpecifiers>
+    <delegateAnalysisEngine key="MultipleAeTest">
+      <import location="MultipleAeTest.xml"/>
+    </delegateAnalysisEngine>
+  </delegateAnalysisEngineSpecifiers>
+  <analysisEngineMetaData>
+    <name>Aggregate for multiple AE test</name>
+    <description/>
+    <version>1.0</version>
+    <vendor/>
+    <configurationParameters searchStrategy="language_fallback"/>
+    <configurationParameterSettings/>
+    <flowConstraints>
+      <fixedFlow>
+        <node>MultipleAeTest</node>
+      </fixedFlow>
+    </flowConstraints>
+    <fsIndexCollection/>
+    <capabilities>
+      <capability>
+        <inputs/>
+        <outputs/>
+        <languagesSupported/>
+      </capability>
+    </capabilities>
+    <operationalProperties>
+      <modifiesCas>true</modifiesCas>
+      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+      <outputsNewCASes>false</outputsNewCASes>
+    </operationalProperties>
+  </analysisEngineMetaData>
+  <resourceManagerConfiguration/>
+</analysisEngineDescription>

Propchange: uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/AggregateForMultipleAeTest.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest.xml
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest.xml?rev=1756914&view=auto
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest.xml (added)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest.xml Fri Aug 19 13:22:22 2016
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<!-- Descriptor for testing duplicated nested types. -->
+<taeDescription xmlns="http://uima.apache.org/resourceSpecifier">
+  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+  <primitive>true</primitive>
+  <annotatorImplementationName>org.apache.uima.analysis_engine.impl.TestAnnotator2</annotatorImplementationName>
+ 
+  <analysisEngineMetaData>
+    <name>AnnotatorWithDuplicatedNestedTypes</name>
+    <description>For testing duplicated nested types.</description>
+    <version>1.0</version>
+    <vendor>The Apache Software Foundation</vendor>
+
+    <typeSystemDescription>
+      <imports>
+      	<import name="org.apache.uima.resource.metadata.impl.ImportsTypeSystemImportedByName"/>
+      	<import name="org.apache.uima.resource.metadata.impl.TypeSystemImportedByName"/>
+      </imports>
+    </typeSystemDescription>
+
+	<typePriorities>
+	  <priorityLists>
+		<priorityList>
+		  <type>TestType1</type>
+		  <type>NamedEntity</type>
+		</priorityList>
+	  </priorityLists>
+	</typePriorities>
+
+    <!-- Capabilities: Inputs and Outputs -->
+    <capabilities>
+      <capability>
+        <inputs/>
+        <outputs/>
+        <languagesSupported/>
+      </capability>
+    </capabilities>
+    <operationalProperties>
+      <modifiesCas>true</modifiesCas>
+      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+      <outputsNewCASes>false</outputsNewCASes>
+    </operationalProperties>
+  </analysisEngineMetaData>
+</taeDescription>

Propchange: uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest2.xml
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest2.xml?rev=1756914&view=auto
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest2.xml (added)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest2.xml Fri Aug 19 13:22:22 2016
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<!-- Descriptor for testing duplicated nested types. -->
+<taeDescription xmlns="http://uima.apache.org/resourceSpecifier">
+  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+  <primitive>true</primitive>
+  <annotatorImplementationName>org.apache.uima.analysis_engine.impl.TestAnnotator2</annotatorImplementationName>
+ 
+  <analysisEngineMetaData>
+    <name>AnnotatorWithDifferentTypes</name>
+    <description>For testing a 2nd AE with new types.</description>
+    <version>1.0</version>
+    <vendor>The Apache Software Foundation</vendor>
+
+    <typeSystemDescription>
+      <imports>
+      	<import name="org.apache.uima.resource.metadata.impl.TypeSystemImportedByName2"/>
+      </imports>
+    </typeSystemDescription>
+
+    <!-- Capabilities: Inputs and Outputs -->
+    <capabilities>
+      <capability>
+        <inputs/>
+        <outputs/>
+        <languagesSupported/>
+      </capability>
+    </capabilities>
+    <operationalProperties>
+      <modifiesCas>true</modifiesCas>
+      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+      <outputsNewCASes>false</outputsNewCASes>
+    </operationalProperties>
+  </analysisEngineMetaData>
+</taeDescription>

Propchange: uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest3.xml
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest3.xml?rev=1756914&view=auto
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest3.xml (added)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest3.xml Fri Aug 19 13:22:22 2016
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<!-- Descriptor for testing duplicated nested types. -->
+<taeDescription xmlns="http://uima.apache.org/resourceSpecifier">
+  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+  <primitive>true</primitive>
+  <annotatorImplementationName>org.apache.uima.analysis_engine.impl.TestAnnotator2</annotatorImplementationName>
+ 
+  <analysisEngineMetaData>
+    <name>AnnotatorWithDifferentTypePriorities</name>
+    <description>For testing different type-priorities.</description>
+    <version>1.0</version>
+    <vendor>The Apache Software Foundation</vendor>
+
+    <typeSystemDescription>
+      <imports>
+      	<import name="org.apache.uima.resource.metadata.impl.ImportsTypeSystemImportedByName"/>
+      	<import name="org.apache.uima.resource.metadata.impl.TypeSystemImportedByName"/>
+      </imports>
+    </typeSystemDescription>
+
+	<typePriorities>
+	  <priorityLists>
+		<priorityList>
+		  <type>TestType2</type>
+		  <type>NamedEntity</type>
+		</priorityList>
+	  </priorityLists>
+	</typePriorities>
+
+    <!-- Capabilities: Inputs and Outputs -->
+    <capabilities>
+      <capability>
+        <inputs/>
+        <outputs/>
+        <languagesSupported/>
+      </capability>
+    </capabilities>
+    <operationalProperties>
+      <modifiesCas>true</modifiesCas>
+      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+      <outputsNewCASes>false</outputsNewCASes>
+    </operationalProperties>
+  </analysisEngineMetaData>
+</taeDescription>

Propchange: uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest3.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest4.xml
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest4.xml?rev=1756914&view=auto
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest4.xml (added)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest4.xml Fri Aug 19 13:22:22 2016
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<!-- Descriptor for testing duplicated nested types. -->
+<taeDescription xmlns="http://uima.apache.org/resourceSpecifier">
+  <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
+  <primitive>true</primitive>
+  <annotatorImplementationName>org.apache.uima.analysis_engine.impl.TestAnnotator2</annotatorImplementationName>
+ 
+  <analysisEngineMetaData>
+    <name>AnnotatorWithDifferentIndexes</name>
+    <description>For testing different FS indexes.</description>
+    <version>1.0</version>
+    <vendor>The Apache Software Foundation</vendor>
+
+    <typeSystemDescription>
+      <imports>
+      	<import name="org.apache.uima.resource.metadata.impl.ImportsTypeSystemImportedByName"/>
+      	<import name="org.apache.uima.resource.metadata.impl.TypeSystemImportedByName"/>
+      </imports>
+    </typeSystemDescription>
+
+	<typePriorities>
+	  <priorityLists>
+		<priorityList>
+		  <type>TestType1</type>
+		  <type>NamedEntity</type>
+		</priorityList>
+	  </priorityLists>
+	</typePriorities>
+
+	<fsIndexCollection>
+	  <fsIndexes>
+		<fsIndexDescription>
+		  <label>AnnotationSetIndex</label>
+		  <typeName>uima.tcas.Annotation</typeName>
+		  <kind>set</kind>
+		  <keys>
+			<fsIndexKey>
+			  <featureName>begin</featureName>
+			  <comparator>standard</comparator>
+			</fsIndexKey>
+			<fsIndexKey>
+			  <featureName>end</featureName>
+			  <comparator>reverse</comparator>
+			</fsIndexKey>
+		  </keys>
+		</fsIndexDescription>
+		<fsIndexDescription>
+		  <label>Annotation Bag Index</label>
+		  <typeName>uima.tcas.Annotation</typeName>
+		  <kind>bag</kind>
+		  <keys>
+			<fsIndexKey>
+			  <featureName>begin</featureName>
+			  <comparator>standard</comparator>
+			</fsIndexKey>
+			<fsIndexKey>
+			  <featureName>end</featureName>
+			  <comparator>reverse</comparator>
+			</fsIndexKey>
+		  </keys>
+		</fsIndexDescription>
+	  </fsIndexes>
+	</fsIndexCollection>
+
+    <!-- Capabilities: Inputs and Outputs -->
+    <capabilities>
+      <capability>
+        <inputs/>
+        <outputs/>
+        <languagesSupported/>
+      </capability>
+    </capabilities>
+    <operationalProperties>
+      <modifiesCas>true</modifiesCas>
+      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+      <outputsNewCASes>false</outputsNewCASes>
+    </operationalProperties>
+  </analysisEngineMetaData>
+</taeDescription>

Propchange: uima/uimaj/trunk/uimaj-core/src/test/resources/TextAnalysisEngineImplTest/MultipleAeTest4.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: uima/uimaj/trunk/uimaj-core/src/test/resources/org/apache/uima/resource/metadata/impl/ImportsTypeSystemImportedByName.xml
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/org/apache/uima/resource/metadata/impl/ImportsTypeSystemImportedByName.xml?rev=1756914&view=auto
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/org/apache/uima/resource/metadata/impl/ImportsTypeSystemImportedByName.xml (added)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/org/apache/uima/resource/metadata/impl/ImportsTypeSystemImportedByName.xml Fri Aug 19 13:22:22 2016
@@ -0,0 +1,34 @@
+<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
+	
+  <!--
+	 ***************************************************************
+	 * Licensed to the Apache Software Foundation (ASF) under one
+	 * or more contributor license agreements.  See the NOTICE file
+	 * distributed with this work for additional information
+	 * regarding copyright ownership.  The ASF licenses this file
+	 * 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
+	 * KIND, either express or implied.  See the License for the
+	 * specific language governing permissions and limitations
+	 * under the License.
+	 ***************************************************************
+	-->
+
+
+  <name>TypeSystemWithImport</name>
+  <description>Imports TypeSystem-A</description>
+  <version>0.1</version>
+  <vendor>The Apache Software Foundation</vendor>
+  <imports>
+	<import name="org.apache.uima.resource.metadata.impl.TypeSystemImportedByName"/>
+  </imports>
+  <types>
+  </types>
+</typeSystemDescription>

Propchange: uima/uimaj/trunk/uimaj-core/src/test/resources/org/apache/uima/resource/metadata/impl/ImportsTypeSystemImportedByName.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: uima/uimaj/trunk/uimaj-core/src/test/resources/org/apache/uima/resource/metadata/impl/TypeSystemImportedByName2.xml
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/resources/org/apache/uima/resource/metadata/impl/TypeSystemImportedByName2.xml?rev=1756914&view=auto
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/resources/org/apache/uima/resource/metadata/impl/TypeSystemImportedByName2.xml (added)
+++ uima/uimaj/trunk/uimaj-core/src/test/resources/org/apache/uima/resource/metadata/impl/TypeSystemImportedByName2.xml Fri Aug 19 13:22:22 2016
@@ -0,0 +1,60 @@
+<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
+	
+        <!--
+	 ***************************************************************
+	 * Licensed to the Apache Software Foundation (ASF) under one
+	 * or more contributor license agreements.  See the NOTICE file
+	 * distributed with this work for additional information
+	 * regarding copyright ownership.  The ASF licenses this file
+	 * 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
+	 * KIND, either express or implied.  See the License for the
+	 * specific language governing permissions and limitations
+	 * under the License.
+	 ***************************************************************
+   -->
+
+
+<name>TypeSystemImportedByLocation</name>
+<description>This is for testing the import mechanism.</description>
+<version>0.1</version>
+<vendor>The Apache Software Foundation</vendor>
+<types>
+<typeDescription>
+<name>TestType1</name>
+<description>This is a test.</description>
+<supertypeName>uima.tcas.Annotation</supertypeName>
+<features>
+<featureDescription>
+<name>Foo</name>
+<description/>
+<rangeTypeName>uima.cas.String</rangeTypeName>
+</featureDescription>
+</features>
+</typeDescription>
+<typeDescription>
+<name>NamedEntity</name>
+<description>A named entity.</description>
+<supertypeName>uima.tcas.Annotation</supertypeName>
+</typeDescription>
+<typeDescription>
+<name>TestType2</name>
+<description/>
+<supertypeName>uima.cas.TOP</supertypeName>
+<features>
+<featureDescription>
+<name>FooFoo</name>
+<description/>
+<rangeTypeName>uima.cas.Integer</rangeTypeName>
+</featureDescription>
+</features>
+</typeDescription>
+</types>
+</typeSystemDescription>

Propchange: uima/uimaj/trunk/uimaj-core/src/test/resources/org/apache/uima/resource/metadata/impl/TypeSystemImportedByName2.xml
------------------------------------------------------------------------------
    svn:eol-style = native