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

svn commit: r1672739 - /uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/impl/XmiCasDeserializerTest.java

Author: schor
Date: Fri Apr 10 19:54:26 2015
New Revision: 1672739

URL: http://svn.apache.org/r1672739
Log:
no Jira - add (and correct one case of) generic type info in 1 test case - no functional change

Modified:
    uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/impl/XmiCasDeserializerTest.java

Modified: uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/impl/XmiCasDeserializerTest.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/impl/XmiCasDeserializerTest.java?rev=1672739&r1=1672738&r2=1672739&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/impl/XmiCasDeserializerTest.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/impl/XmiCasDeserializerTest.java Fri Apr 10 19:54:26 2015
@@ -883,7 +883,7 @@ public class XmiCasDeserializerTest exte
     deserialize(newSerCasMerged, cas, serSharedData, false, -1);
     
     //check covered text of annotations
-    FSIterator iter = cas.getAnnotationIndex().iterator();
+    FSIterator<AnnotationFS> iter = cas.getAnnotationIndex().iterator();
     while (iter.hasNext()) {
       AnnotationFS annot = (AnnotationFS)iter.next();
       assertEquals(cas.getDocumentText().substring(
@@ -893,7 +893,7 @@ public class XmiCasDeserializerTest exte
     iter = cas.getAnnotationIndex(ownerType).iterator();
     while (iter.hasNext()) {
       AnnotationFS
-      annot = (AnnotationFS)iter.next();
+      annot = iter.next();
       String componentId = annot.getStringValue(componentIdFeat);
       if ("XCasDeserializerTest".equals(componentId)) {
         FeatureStructure targetRelArgs = annot.getFeatureValue(argsFeat);
@@ -968,7 +968,7 @@ public class XmiCasDeserializerTest exte
 	  
 	  //create Marker, add/modify fs and serialize in delta xmi format.
 	  Marker marker = cas2.createMarker();
-	  FSIndex cas2tIndex = cas2.getAnnotationIndex();
+	  FSIndex<AnnotationFS> cas2tIndex = cas2.getAnnotationIndex();
 	  
 	  //create an annotation and add to index
 	  AnnotationFS cas2newAnnot = cas2.createAnnotation(cas2.getAnnotationType(), 6, 8);
@@ -976,7 +976,7 @@ public class XmiCasDeserializerTest exte
 	  assertTrue(cas2tIndex.size() == 4); // prev annots and this new one
 	  
 	  //modify an existing annotation
-	  Iterator<FeatureStructure> tIndexIter = cas2tIndex.iterator();
+	  Iterator<AnnotationFS> tIndexIter = cas2tIndex.iterator();
 	  AnnotationFS docAnnot = (AnnotationFS) tIndexIter.next(); //doc annot
 	  //delete from index
 	  AnnotationFS delAnnot = (AnnotationFS) tIndexIter.next(); //annot
@@ -1030,7 +1030,7 @@ public class XmiCasDeserializerTest exte
       
       //create Marker, add/modify fs and serialize in delta xmi format.
       Marker marker = cas2.createMarker();
-      FSIndex cas2tIndex = cas2.getAnnotationIndex();
+      FSIndex<AnnotationFS> cas2tIndex = cas2.getAnnotationIndex();
       
       //create an annotation and add to index
       AnnotationFS cas2newAnnot = cas2.createAnnotation(cas2.getAnnotationType(), 6, 8);
@@ -1038,7 +1038,7 @@ public class XmiCasDeserializerTest exte
       assertTrue(cas2tIndex.size() == 4); // prev annots and this new one
       
       //modify language feature
-      Iterator<FeatureStructure> tIndexIter = cas2tIndex.iterator();
+      Iterator<AnnotationFS> tIndexIter = cas2tIndex.iterator();
       AnnotationFS docAnnot = (AnnotationFS) tIndexIter.next();
       Feature languageF = cas2.getDocumentAnnotation().getType().getFeatureByBaseName(CAS.FEATURE_BASE_NAME_LANGUAGE);
       docAnnot.setStringValue(languageF, "en");
@@ -1136,7 +1136,7 @@ public class XmiCasDeserializerTest exte
 	      
 	      //create Marker, add/modify fs and serialize in delta xmi format.
 	      Marker marker = cas2.createMarker();
-	      FSIndex cas2tIndex = cas2.getAnnotationIndex();
+	      FSIndex<AnnotationFS> cas2tIndex = cas2.getAnnotationIndex();
 	      
 	      // serialize cas2 in delta format 
 	      String deltaxml1 = serialize(cas2, sharedData2, marker);
@@ -1167,7 +1167,7 @@ public class XmiCasDeserializerTest exte
       cas1.getIndexRepository().addFS(anAnnot1);
       AnnotationFS anAnnot2 = cas1.createAnnotation(cas1.getAnnotationType(), 5, 10);
       cas1.getIndexRepository().addFS(anAnnot2);
-      FSIndex tIndex = cas1.getAnnotationIndex();
+      FSIndex<AnnotationFS> tIndex = cas1.getAnnotationIndex();
       assertTrue(tIndex.size() == 3); //doc annot plus 2 annots
       
       //serialize complete  
@@ -1182,7 +1182,7 @@ public class XmiCasDeserializerTest exte
       
       //create Marker, add/modify fs and serialize in delta xmi format.
       Marker marker = cas2.createMarker();
-      FSIndex cas2tIndex = cas2.getAnnotationIndex();
+      FSIndex<AnnotationFS> cas2tIndex = cas2.getAnnotationIndex();
       
       //create an annotation and add to index
       AnnotationFS cas2newAnnot = cas2.createAnnotation(cas2.getAnnotationType(), 6, 8);
@@ -1190,7 +1190,7 @@ public class XmiCasDeserializerTest exte
       assertTrue(cas2tIndex.size() == 4); // prev annots and this new one
       
       //modify language feature
-      Iterator<FeatureStructure> tIndexIter = cas2tIndex.iterator();
+      Iterator<AnnotationFS> tIndexIter = cas2tIndex.iterator();
       AnnotationFS docAnnot = (AnnotationFS) tIndexIter.next();
       
       //delete annotation from index    
@@ -1264,7 +1264,7 @@ public class XmiCasDeserializerTest exte
       cas1.getIndexRepository().addFS(anAnnot3);
       AnnotationFS anAnnot4 = cas1.createAnnotation(cas1.getAnnotationType(), 15, 30);
       cas1.getIndexRepository().addFS(anAnnot4);
-      FSIndex tIndex = cas1.getAnnotationIndex();
+      FSIndex<AnnotationFS> tIndex = cas1.getAnnotationIndex();
       assertTrue(tIndex.size() == 5); //doc annot plus 4 annots
       
       FeatureStructure entityFS = cas1.createFS(entityType);
@@ -1318,7 +1318,7 @@ public class XmiCasDeserializerTest exte
       //=======================================================================
       //create Marker, add/modify fs and serialize in delta xmi format.
       Marker marker = cas2.createMarker();
-      FSIndex cas2tIndex = cas2.getAnnotationIndex();
+      FSIndex<AnnotationFS> cas2tIndex = cas2.getAnnotationIndex();
       CAS cas2preexistingView = cas2.getView("preexistingView");
       FSIndex cas2personIndex = cas2preexistingView.getAnnotationIndex(personType);
       FSIndex cas2orgIndex = cas2preexistingView.getAnnotationIndex(orgType);
@@ -1339,7 +1339,7 @@ public class XmiCasDeserializerTest exte
       assertTrue(cas2view1Index.size() == 2); //document annot and this annot
       
       //modify an existing annotation
-      Iterator<FeatureStructure> tIndexIter = cas2tIndex.iterator();
+      Iterator<AnnotationFS> tIndexIter = cas2tIndex.iterator();
       AnnotationFS docAnnot = (AnnotationFS) tIndexIter.next(); //doc annot
       AnnotationFS modAnnot1 = (AnnotationFS) tIndexIter.next();
       AnnotationFS delAnnot = (AnnotationFS)  tIndexIter.next();