You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by tw...@apache.org on 2006/12/22 14:07:36 UTC

svn commit: r489645 - in /incubator/uima/uimaj/trunk/uimaj-core/src/test: java/org/apache/uima/cas/test/ resources/CASTests/desc/

Author: twgoetz
Date: Fri Dec 22 05:07:36 2006
New Revision: 489645

URL: http://svn.apache.org/viewvc?view=rev&rev=489645
Log:
Jira UIMA-136: fix test case that breaks maven build

https://issues.apache.org/jira/browse/UIMA-136

Added:
    incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/StringSubtypeAnnotation.java
    incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/StringSubtypeAnnotation_Type.java
Removed:
    incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/TestAnnotation.java
    incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/TestAnnotation_Type.java
Modified:
    incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/StringSubtypeTest.java
    incubator/uima/uimaj/trunk/uimaj-core/src/test/resources/CASTests/desc/StringSubtypeTest.xml

Added: incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/StringSubtypeAnnotation.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/StringSubtypeAnnotation.java?view=auto&rev=489645
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/StringSubtypeAnnotation.java (added)
+++ incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/StringSubtypeAnnotation.java Fri Dec 22 05:07:36 2006
@@ -0,0 +1,79 @@
+
+
+/* First created by JCasGen Fri Dec 22 14:02:31 CET 2006 */
+package org.apache.uima.cas.test;
+
+import org.apache.uima.jcas.impl.JCas; 
+import org.apache.uima.jcas.cas.TOP_Type;
+
+import org.apache.uima.jcas.tcas.Annotation;
+
+
+/** 
+ * Updated by JCasGen Fri Dec 22 14:02:31 CET 2006
+ * XML source: C:/code/trunk/uimaj-core/src/test/resources/CASTests/desc/StringSubtypeTest.xml
+ * @generated */
+public class StringSubtypeAnnotation extends Annotation {
+  /** @generated
+   * @ordered 
+   */
+  public final static int typeIndexID = JCas.getNextIndex();
+  /** @generated
+   * @ordered 
+   */
+  public final static int type = typeIndexID;
+  /** @generated  */
+  public              int getTypeIndexID() {return typeIndexID;}
+ 
+  /** Never called.  Disable default constructor
+   * @generated */
+  protected StringSubtypeAnnotation() {}
+    
+  /** Internal - constructor used by generator 
+   * @generated */
+  public StringSubtypeAnnotation(int addr, TOP_Type type) {
+    super(addr, type);
+    readObject();
+  }
+  
+  /** @generated */
+  public StringSubtypeAnnotation(JCas jcas) {
+    super(jcas);
+    readObject();   
+  } 
+  
+  /** @generated */
+  public StringSubtypeAnnotation(JCas jcas, int begin, int end) {
+    super(jcas);
+    setBegin(begin);
+    setEnd(end);
+    readObject();
+  }   
+
+  /** <!-- begin-user-doc -->
+    * Write your own initialization here
+    * <!-- end-user-doc -->
+  @generated modifiable */
+  private void readObject() {}
+     
+ 
+    
+  //*--------------*
+  //* Feature: stringSetFeature
+
+  /** getter for stringSetFeature - gets 
+   * @generated */
+  public String getStringSetFeature() {
+    if (StringSubtypeAnnotation_Type.featOkTst && ((StringSubtypeAnnotation_Type)jcasType).casFeat_stringSetFeature == null)
+      JCas.throwFeatMissing("stringSetFeature", "org.apache.uima.cas.test.StringSubtypeAnnotation");
+    return jcasType.ll_cas.ll_getStringValue(addr, ((StringSubtypeAnnotation_Type)jcasType).casFeatCode_stringSetFeature);}
+    
+  /** setter for stringSetFeature - sets  
+   * @generated */
+  public void setStringSetFeature(String v) {
+    if (StringSubtypeAnnotation_Type.featOkTst && ((StringSubtypeAnnotation_Type)jcasType).casFeat_stringSetFeature == null)
+      JCas.throwFeatMissing("stringSetFeature", "org.apache.uima.cas.test.StringSubtypeAnnotation");
+    jcasType.ll_cas.ll_setStringValue(addr, ((StringSubtypeAnnotation_Type)jcasType).casFeatCode_stringSetFeature, v);}    
+  }
+
+    
\ No newline at end of file

Added: incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/StringSubtypeAnnotation_Type.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/StringSubtypeAnnotation_Type.java?view=auto&rev=489645
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/StringSubtypeAnnotation_Type.java (added)
+++ incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/StringSubtypeAnnotation_Type.java Fri Dec 22 05:07:36 2006
@@ -0,0 +1,77 @@
+
+/* First created by JCasGen Fri Dec 22 14:02:31 CET 2006 */
+package org.apache.uima.cas.test;
+
+import org.apache.uima.jcas.impl.JCas;
+import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.FSGenerator;
+import org.apache.uima.cas.FeatureStructure;
+import org.apache.uima.cas.impl.TypeImpl;
+import org.apache.uima.cas.Type;
+import org.apache.uima.cas.impl.FeatureImpl;
+import org.apache.uima.cas.Feature;
+import org.apache.uima.jcas.tcas.Annotation_Type;
+
+/** 
+ * Updated by JCasGen Fri Dec 22 14:02:31 CET 2006
+ * @generated */
+public class StringSubtypeAnnotation_Type extends Annotation_Type {
+  /** @generated */
+  protected FSGenerator getFSGenerator() {return fsGenerator;}
+  /** @generated */
+  private final FSGenerator fsGenerator = 
+    new FSGenerator() {
+      public FeatureStructure createFS(int addr, CASImpl cas) {
+  			 if (StringSubtypeAnnotation_Type.this.useExistingInstance) {
+  			   // Return eq fs instance if already created
+  		     FeatureStructure fs = StringSubtypeAnnotation_Type.this.jcas.getJfsFromCaddr(addr);
+  		     if (null == fs) {
+  		       fs = new StringSubtypeAnnotation(addr, StringSubtypeAnnotation_Type.this);
+  			   StringSubtypeAnnotation_Type.this.jcas.putJfsFromCaddr(addr, fs);
+  			   return fs;
+  		     }
+  		     return fs;
+        } else return new StringSubtypeAnnotation(addr, StringSubtypeAnnotation_Type.this);
+  	  }
+    };
+  /** @generated */
+  public final static int typeIndexID = StringSubtypeAnnotation.typeIndexID;
+  /** @generated 
+     @modifiable */
+  public final static boolean featOkTst = JCas.getFeatOkTst("org.apache.uima.cas.test.StringSubtypeAnnotation");
+ 
+  /** @generated */
+  final Feature casFeat_stringSetFeature;
+  /** @generated */
+  final int     casFeatCode_stringSetFeature;
+  /** @generated */ 
+  public String getStringSetFeature(int addr) {
+        if (featOkTst && casFeat_stringSetFeature == null)
+      JCas.throwFeatMissing("stringSetFeature", "org.apache.uima.cas.test.StringSubtypeAnnotation");
+    return ll_cas.ll_getStringValue(addr, casFeatCode_stringSetFeature);
+  }
+  /** @generated */    
+  public void setStringSetFeature(int addr, String v) {
+        if (featOkTst && casFeat_stringSetFeature == null)
+      JCas.throwFeatMissing("stringSetFeature", "org.apache.uima.cas.test.StringSubtypeAnnotation");
+    ll_cas.ll_setStringValue(addr, casFeatCode_stringSetFeature, v);}
+    
+  
+
+
+  /** initialize variables to correspond with Cas Type and Features
+	* @generated */
+  public StringSubtypeAnnotation_Type(JCas jcas, Type casType) {
+    super(jcas, casType);
+    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
+
+ 
+    casFeat_stringSetFeature = jcas.getRequiredFeatureDE(casType, "stringSetFeature", "org.apache.uima.cas.test.StringSubtype", featOkTst);
+    casFeatCode_stringSetFeature  = (null == casFeat_stringSetFeature) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_stringSetFeature).getCode();
+
+  }
+}
+
+
+
+    
\ No newline at end of file

Modified: incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/StringSubtypeTest.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/StringSubtypeTest.java?view=diff&rev=489645&r1=489644&r2=489645
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/StringSubtypeTest.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/StringSubtypeTest.java Fri Dec 22 05:07:36 2006
@@ -52,7 +52,7 @@
 
   private static final String undefinedValue = "dd";
 
-  private static final String annotationTypeName = "org.apache.uima.cas.test.TestAnnotation";
+  private static final String annotationTypeName = "org.apache.uima.cas.test.StringSubtypeAnnotation";
 
   private static final String stringSetFeatureName = "stringSetFeature";
 
@@ -88,7 +88,7 @@
   }
 
   public void testJcas() {
-    TestAnnotation annot = new TestAnnotation(this.jcas);
+    StringSubtypeAnnotation annot = new StringSubtypeAnnotation(this.jcas);
     annot.setStringSetFeature(definedValue1);
     annot.setStringSetFeature(definedValue2);
     annot.setStringSetFeature(definedValue3);

Modified: incubator/uima/uimaj/trunk/uimaj-core/src/test/resources/CASTests/desc/StringSubtypeTest.xml
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-core/src/test/resources/CASTests/desc/StringSubtypeTest.xml?view=diff&rev=489645&r1=489644&r2=489645
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-core/src/test/resources/CASTests/desc/StringSubtypeTest.xml (original)
+++ incubator/uima/uimaj/trunk/uimaj-core/src/test/resources/CASTests/desc/StringSubtypeTest.xml Fri Dec 22 05:07:36 2006
@@ -39,7 +39,7 @@
 		<typeSystemDescription>
 			<types>
 				<typeDescription>
-					<name>org.apache.uima.cas.test.TestAnnotation</name>
+					<name>org.apache.uima.cas.test.StringSubtypeAnnotation</name>
 					<supertypeName>uima.tcas.Annotation</supertypeName>
 					<features>
 						<featureDescription>