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 2009/09/30 17:48:40 UTC

svn commit: r820308 - in /incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor: ./ src/main/java/org/apache/uima/tools/cfe/ src/main/java/org/apache/uima/tools/cfe/config/ src/main/java/org/apache/uima/tools/cfe/config/impl/ src/test/java/org/apac...

Author: schor
Date: Wed Sep 30 15:48:40 2009
New Revision: 820308

URL: http://svn.apache.org/viewvc?rev=820308&view=rev
Log:
UIMA-1065 Fix the base code which was preventing the test case from working :-).  Fix the test case to make the PersonTitle annotator produce results (set language = en and add example.PersonTitle to output capability spec).  Add compare of output result, and clean up the temp files to the test case.  Add required use of SourceDocumentInformation.  Still need update of docs.  Also fix bug in CFEConfig.xml.

Added:
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/examples/
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/examples/SourceDocumentInformation.java
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/examples/SourceDocumentInformation_Type.java
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/testDataRef.txt.fve
Modified:
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/pom.xml
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/main/java/org/apache/uima/tools/cfe/UIMAFeatureConsumer.java
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/main/java/org/apache/uima/tools/cfe/config/ConfigPackage.java
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/main/java/org/apache/uima/tools/cfe/config/impl/ConfigFactoryImpl.java
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/tools/cfe/test/CFEtest.java
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/CFEConfig.xml
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/PersonTitlePlusFeatureExtraction.xml
    incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/UIMAFeatureConsumer.xml

Modified: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/pom.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/pom.xml?rev=820308&r1=820307&r2=820308&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/pom.xml (original)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/pom.xml Wed Sep 30 15:48:40 2009
@@ -99,7 +99,11 @@
       <artifactId>uimaj-examples</artifactId>
       <scope>test</scope>
     </dependency> 
-
+    <dependency>
+      <groupId>org.apache.uima</groupId>
+      <artifactId>uimaj-document-annotation</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>

Modified: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/main/java/org/apache/uima/tools/cfe/UIMAFeatureConsumer.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/main/java/org/apache/uima/tools/cfe/UIMAFeatureConsumer.java?rev=820308&r1=820307&r2=820308&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/main/java/org/apache/uima/tools/cfe/UIMAFeatureConsumer.java (original)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/main/java/org/apache/uima/tools/cfe/UIMAFeatureConsumer.java Wed Sep 30 15:48:40 2009
@@ -90,6 +90,7 @@
             for (Iterator<ComparableArray> it = m_uimaFM.m_featureImages.keySet().iterator(); it.hasNext();) {
                 fos.write((m_uimaFM.m_featureImages.get(it.next()) + "\n").getBytes());
             }
+            fos.close();
         } 
         catch (Exception e) {
             throw new ResourceProcessException(e);

Modified: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/main/java/org/apache/uima/tools/cfe/config/ConfigPackage.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/main/java/org/apache/uima/tools/cfe/config/ConfigPackage.java?rev=820308&r1=820307&r2=820308&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/main/java/org/apache/uima/tools/cfe/config/ConfigPackage.java (original)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/main/java/org/apache/uima/tools/cfe/config/ConfigPackage.java Wed Sep 30 15:48:40 2009
@@ -61,7 +61,7 @@
    * <!-- end-user-doc -->
      * @generated
      */
-  String eNS_URI = "http://www.apache.org/uima/cfe/config";
+  String eNS_URI = "http://www.apache.org/uima/tools/cfe/config";
 
   /**
      * The package namespace name.

Modified: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/main/java/org/apache/uima/tools/cfe/config/impl/ConfigFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/main/java/org/apache/uima/tools/cfe/config/impl/ConfigFactoryImpl.java?rev=820308&r1=820307&r2=820308&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/main/java/org/apache/uima/tools/cfe/config/impl/ConfigFactoryImpl.java (original)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/main/java/org/apache/uima/tools/cfe/config/impl/ConfigFactoryImpl.java Wed Sep 30 15:48:40 2009
@@ -63,7 +63,7 @@
   {
         try
         {
-            ConfigFactory theConfigFactory = (ConfigFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.apache.org/uima/cfe/config"); 
+            ConfigFactory theConfigFactory = (ConfigFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.apache.org/uima/tools/cfe/config"); 
             if (theConfigFactory != null)
             {
                 return theConfigFactory;

Added: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/examples/SourceDocumentInformation.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/examples/SourceDocumentInformation.java?rev=820308&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/examples/SourceDocumentInformation.java (added)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/examples/SourceDocumentInformation.java Wed Sep 30 15:48:40 2009
@@ -0,0 +1,134 @@
+
+
+/* First created by JCasGen Wed Sep 30 00:32:34 EDT 2009 */
+package org.apache.uima.examples;
+
+import org.apache.uima.jcas.JCas; 
+import org.apache.uima.jcas.JCasRegistry;
+import org.apache.uima.jcas.cas.TOP_Type;
+
+import org.apache.uima.jcas.tcas.Annotation;
+
+
+/** Stores detailed information about the original source document from which the current CAS was initialized. All information (like size) refers to the source document and not to the document in the CAS which may be converted and filtered by a CAS Initializer. For example this information will be written to the Semantic Search index so that the original document contents can be retrieved by queries.
+ * Updated by JCasGen Wed Sep 30 00:32:34 EDT 2009
+ * XML source: C:/a/Eclipse/apache/ConfigurableFeatureExtractor/src/test/resources/UIMAFeatureConsumer.xml
+ * @generated */
+public class SourceDocumentInformation extends Annotation {
+  /** @generated
+   * @ordered 
+   */
+  public final static int typeIndexID = JCasRegistry.register(SourceDocumentInformation.class);
+  /** @generated
+   * @ordered 
+   */
+  public final static int type = typeIndexID;
+  /** @generated  */
+  public              int getTypeIndexID() {return typeIndexID;}
+ 
+  /** Never called.  Disable default constructor
+   * @generated */
+  protected SourceDocumentInformation() {}
+    
+  /** Internal - constructor used by generator 
+   * @generated */
+  public SourceDocumentInformation(int addr, TOP_Type type) {
+    super(addr, type);
+    readObject();
+  }
+  
+  /** @generated */
+  public SourceDocumentInformation(JCas jcas) {
+    super(jcas);
+    readObject();   
+  } 
+
+  /** @generated */  
+  public SourceDocumentInformation(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: uri
+
+  /** getter for uri - gets URI of document. (For example, file:///MyDirectory/myFile.txt for a simple file or http://incubator.apache.org/uima/index.html for content from a web source.)
+   * @generated */
+  public String getUri() {
+    if (SourceDocumentInformation_Type.featOkTst && ((SourceDocumentInformation_Type)jcasType).casFeat_uri == null)
+      jcasType.jcas.throwFeatMissing("uri", "org.apache.uima.examples.SourceDocumentInformation");
+    return jcasType.ll_cas.ll_getStringValue(addr, ((SourceDocumentInformation_Type)jcasType).casFeatCode_uri);}
+    
+  /** setter for uri - sets URI of document. (For example, file:///MyDirectory/myFile.txt for a simple file or http://incubator.apache.org/uima/index.html for content from a web source.) 
+   * @generated */
+  public void setUri(String v) {
+    if (SourceDocumentInformation_Type.featOkTst && ((SourceDocumentInformation_Type)jcasType).casFeat_uri == null)
+      jcasType.jcas.throwFeatMissing("uri", "org.apache.uima.examples.SourceDocumentInformation");
+    jcasType.ll_cas.ll_setStringValue(addr, ((SourceDocumentInformation_Type)jcasType).casFeatCode_uri, v);}    
+   
+    
+  //*--------------*
+  //* Feature: offsetInSource
+
+  /** getter for offsetInSource - gets Byte offset of the start of document content within original source file or other input source. Only used if the CAS document was retrieved from an source where one physical source file contained several conceptual documents. Zero otherwise.
+   * @generated */
+  public int getOffsetInSource() {
+    if (SourceDocumentInformation_Type.featOkTst && ((SourceDocumentInformation_Type)jcasType).casFeat_offsetInSource == null)
+      jcasType.jcas.throwFeatMissing("offsetInSource", "org.apache.uima.examples.SourceDocumentInformation");
+    return jcasType.ll_cas.ll_getIntValue(addr, ((SourceDocumentInformation_Type)jcasType).casFeatCode_offsetInSource);}
+    
+  /** setter for offsetInSource - sets Byte offset of the start of document content within original source file or other input source. Only used if the CAS document was retrieved from an source where one physical source file contained several conceptual documents. Zero otherwise. 
+   * @generated */
+  public void setOffsetInSource(int v) {
+    if (SourceDocumentInformation_Type.featOkTst && ((SourceDocumentInformation_Type)jcasType).casFeat_offsetInSource == null)
+      jcasType.jcas.throwFeatMissing("offsetInSource", "org.apache.uima.examples.SourceDocumentInformation");
+    jcasType.ll_cas.ll_setIntValue(addr, ((SourceDocumentInformation_Type)jcasType).casFeatCode_offsetInSource, v);}    
+   
+    
+  //*--------------*
+  //* Feature: documentSize
+
+  /** getter for documentSize - gets Size of original document in bytes before processing by CAS Initializer. Either absolute file size of size within file or other source.
+   * @generated */
+  public int getDocumentSize() {
+    if (SourceDocumentInformation_Type.featOkTst && ((SourceDocumentInformation_Type)jcasType).casFeat_documentSize == null)
+      jcasType.jcas.throwFeatMissing("documentSize", "org.apache.uima.examples.SourceDocumentInformation");
+    return jcasType.ll_cas.ll_getIntValue(addr, ((SourceDocumentInformation_Type)jcasType).casFeatCode_documentSize);}
+    
+  /** setter for documentSize - sets Size of original document in bytes before processing by CAS Initializer. Either absolute file size of size within file or other source. 
+   * @generated */
+  public void setDocumentSize(int v) {
+    if (SourceDocumentInformation_Type.featOkTst && ((SourceDocumentInformation_Type)jcasType).casFeat_documentSize == null)
+      jcasType.jcas.throwFeatMissing("documentSize", "org.apache.uima.examples.SourceDocumentInformation");
+    jcasType.ll_cas.ll_setIntValue(addr, ((SourceDocumentInformation_Type)jcasType).casFeatCode_documentSize, v);}    
+   
+    
+  //*--------------*
+  //* Feature: lastSegment
+
+  /** getter for lastSegment - gets For a CAS that represents a segment of a larger source document, this flag indicates whether this CAS is the final segment of the source document.  This is useful for downstream components that want to take some action after having seen all of the segments of a particular source document.
+   * @generated */
+  public boolean getLastSegment() {
+    if (SourceDocumentInformation_Type.featOkTst && ((SourceDocumentInformation_Type)jcasType).casFeat_lastSegment == null)
+      jcasType.jcas.throwFeatMissing("lastSegment", "org.apache.uima.examples.SourceDocumentInformation");
+    return jcasType.ll_cas.ll_getBooleanValue(addr, ((SourceDocumentInformation_Type)jcasType).casFeatCode_lastSegment);}
+    
+  /** setter for lastSegment - sets For a CAS that represents a segment of a larger source document, this flag indicates whether this CAS is the final segment of the source document.  This is useful for downstream components that want to take some action after having seen all of the segments of a particular source document. 
+   * @generated */
+  public void setLastSegment(boolean v) {
+    if (SourceDocumentInformation_Type.featOkTst && ((SourceDocumentInformation_Type)jcasType).casFeat_lastSegment == null)
+      jcasType.jcas.throwFeatMissing("lastSegment", "org.apache.uima.examples.SourceDocumentInformation");
+    jcasType.ll_cas.ll_setBooleanValue(addr, ((SourceDocumentInformation_Type)jcasType).casFeatCode_lastSegment, v);}    
+  }
+
+    
\ No newline at end of file

Added: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/examples/SourceDocumentInformation_Type.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/examples/SourceDocumentInformation_Type.java?rev=820308&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/examples/SourceDocumentInformation_Type.java (added)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/examples/SourceDocumentInformation_Type.java Wed Sep 30 15:48:40 2009
@@ -0,0 +1,145 @@
+
+/* First created by JCasGen Wed Sep 30 00:32:34 EDT 2009 */
+package org.apache.uima.examples;
+
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
+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;
+
+/** Stores detailed information about the original source document from which the current CAS was initialized. All information (like size) refers to the source document and not to the document in the CAS which may be converted and filtered by a CAS Initializer. For example this information will be written to the Semantic Search index so that the original document contents can be retrieved by queries.
+ * Updated by JCasGen Wed Sep 30 00:32:34 EDT 2009
+ * @generated */
+public class SourceDocumentInformation_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 (SourceDocumentInformation_Type.this.useExistingInstance) {
+  			   // Return eq fs instance if already created
+  		     FeatureStructure fs = SourceDocumentInformation_Type.this.jcas.getJfsFromCaddr(addr);
+  		     if (null == fs) {
+  		       fs = new SourceDocumentInformation(addr, SourceDocumentInformation_Type.this);
+  			   SourceDocumentInformation_Type.this.jcas.putJfsFromCaddr(addr, fs);
+  			   return fs;
+  		     }
+  		     return fs;
+        } else return new SourceDocumentInformation(addr, SourceDocumentInformation_Type.this);
+  	  }
+    };
+  /** @generated */
+  public final static int typeIndexID = SourceDocumentInformation.typeIndexID;
+  /** @generated 
+     @modifiable */
+  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.examples.SourceDocumentInformation");
+ 
+  /** @generated */
+  final Feature casFeat_uri;
+  /** @generated */
+  final int     casFeatCode_uri;
+  /** @generated */ 
+  public String getUri(int addr) {
+        if (featOkTst && casFeat_uri == null)
+      jcas.throwFeatMissing("uri", "org.apache.uima.examples.SourceDocumentInformation");
+    return ll_cas.ll_getStringValue(addr, casFeatCode_uri);
+  }
+  /** @generated */    
+  public void setUri(int addr, String v) {
+        if (featOkTst && casFeat_uri == null)
+      jcas.throwFeatMissing("uri", "org.apache.uima.examples.SourceDocumentInformation");
+    ll_cas.ll_setStringValue(addr, casFeatCode_uri, v);}
+    
+  
+ 
+  /** @generated */
+  final Feature casFeat_offsetInSource;
+  /** @generated */
+  final int     casFeatCode_offsetInSource;
+  /** @generated */ 
+  public int getOffsetInSource(int addr) {
+        if (featOkTst && casFeat_offsetInSource == null)
+      jcas.throwFeatMissing("offsetInSource", "org.apache.uima.examples.SourceDocumentInformation");
+    return ll_cas.ll_getIntValue(addr, casFeatCode_offsetInSource);
+  }
+  /** @generated */    
+  public void setOffsetInSource(int addr, int v) {
+        if (featOkTst && casFeat_offsetInSource == null)
+      jcas.throwFeatMissing("offsetInSource", "org.apache.uima.examples.SourceDocumentInformation");
+    ll_cas.ll_setIntValue(addr, casFeatCode_offsetInSource, v);}
+    
+  
+ 
+  /** @generated */
+  final Feature casFeat_documentSize;
+  /** @generated */
+  final int     casFeatCode_documentSize;
+  /** @generated */ 
+  public int getDocumentSize(int addr) {
+        if (featOkTst && casFeat_documentSize == null)
+      jcas.throwFeatMissing("documentSize", "org.apache.uima.examples.SourceDocumentInformation");
+    return ll_cas.ll_getIntValue(addr, casFeatCode_documentSize);
+  }
+  /** @generated */    
+  public void setDocumentSize(int addr, int v) {
+        if (featOkTst && casFeat_documentSize == null)
+      jcas.throwFeatMissing("documentSize", "org.apache.uima.examples.SourceDocumentInformation");
+    ll_cas.ll_setIntValue(addr, casFeatCode_documentSize, v);}
+    
+  
+ 
+  /** @generated */
+  final Feature casFeat_lastSegment;
+  /** @generated */
+  final int     casFeatCode_lastSegment;
+  /** @generated */ 
+  public boolean getLastSegment(int addr) {
+        if (featOkTst && casFeat_lastSegment == null)
+      jcas.throwFeatMissing("lastSegment", "org.apache.uima.examples.SourceDocumentInformation");
+    return ll_cas.ll_getBooleanValue(addr, casFeatCode_lastSegment);
+  }
+  /** @generated */    
+  public void setLastSegment(int addr, boolean v) {
+        if (featOkTst && casFeat_lastSegment == null)
+      jcas.throwFeatMissing("lastSegment", "org.apache.uima.examples.SourceDocumentInformation");
+    ll_cas.ll_setBooleanValue(addr, casFeatCode_lastSegment, v);}
+    
+  
+
+
+
+  /** initialize variables to correspond with Cas Type and Features
+	* @generated */
+  public SourceDocumentInformation_Type(JCas jcas, Type casType) {
+    super(jcas, casType);
+    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
+
+ 
+    casFeat_uri = jcas.getRequiredFeatureDE(casType, "uri", "uima.cas.String", featOkTst);
+    casFeatCode_uri  = (null == casFeat_uri) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_uri).getCode();
+
+ 
+    casFeat_offsetInSource = jcas.getRequiredFeatureDE(casType, "offsetInSource", "uima.cas.Integer", featOkTst);
+    casFeatCode_offsetInSource  = (null == casFeat_offsetInSource) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_offsetInSource).getCode();
+
+ 
+    casFeat_documentSize = jcas.getRequiredFeatureDE(casType, "documentSize", "uima.cas.Integer", featOkTst);
+    casFeatCode_documentSize  = (null == casFeat_documentSize) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_documentSize).getCode();
+
+ 
+    casFeat_lastSegment = jcas.getRequiredFeatureDE(casType, "lastSegment", "uima.cas.Boolean", featOkTst);
+    casFeatCode_lastSegment  = (null == casFeat_lastSegment) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_lastSegment).getCode();
+
+  }
+}
+
+
+
+    
\ No newline at end of file

Modified: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/tools/cfe/test/CFEtest.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/tools/cfe/test/CFEtest.java?rev=820308&r1=820307&r2=820308&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/tools/cfe/test/CFEtest.java (original)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/java/org/apache/uima/tools/cfe/test/CFEtest.java Wed Sep 30 15:48:40 2009
@@ -36,6 +36,7 @@
 import org.apache.uima.analysis_engine.metadata.FixedFlow;
 import org.apache.uima.analysis_engine.metadata.SofaMapping;
 import org.apache.uima.cas.CAS;
+import org.apache.uima.examples.SourceDocumentInformation;
 import org.apache.uima.pear.tools.PackageBrowser;
 import org.apache.uima.pear.tools.PackageInstaller;
 import org.apache.uima.pear.util.FileUtil;
@@ -44,6 +45,7 @@
 import org.apache.uima.resource.metadata.ConfigurationParameter;
 import org.apache.uima.resource.metadata.Import;
 import org.apache.uima.resource.metadata.MetaDataObject;
+import org.apache.uima.test.junit_extension.FileCompare;
 import org.apache.uima.test.junit_extension.JUnitExtension;
 import org.apache.uima.util.FileUtils;
 import org.apache.uima.util.XMLInputSource;
@@ -95,8 +97,21 @@
     ae.setConfigParameterValue("ConfigurationFile", configFile.getAbsolutePath());
     ae.reconfigure();
     CAS cas = ae.newCAS();
-    String document = FileUtils.file2String(JUnitExtension.getFile("someTestData.txt"));
+    File docFile = JUnitExtension.getFile("testData.txt");
+    String document = FileUtils.file2String(docFile);
     cas.setDocumentText(document);
-    ae.process(cas);    
+    cas.setDocumentLanguage("en");
+    
+    SourceDocumentInformation sdi_ann = new SourceDocumentInformation(cas.getJCas(), 0, document.length());
+    sdi_ann.setUri(docFile.toURI().toString());
+    sdi_ann.addToIndexes();
+    ae.process(cas); 
+    
+    File outFile = new File("tempTestOut/testData.txt.fve");
+    File outFileRef = JUnitExtension.getFile("testDataRef.txt.fve");
+    
+    assertTrue(FileCompare.compare(outFile, outFileRef));
+    outFile.delete();
+    new File("tempTestOut").delete();
   }
 }

Modified: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/CFEConfig.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/CFEConfig.xml?rev=820308&r1=820307&r2=820308&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/CFEConfig.xml (original)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/CFEConfig.xml Wed Sep 30 15:48:40 2009
@@ -20,7 +20,7 @@
    ***************************************************************
    -->
   <tns:CFEConfig xmlns:tns="http://www.apache.org/uima/tools/cfe/config" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.apache.org/uima/tools/cfe/config CFEConfig.xsd ">
-  <tns:targetAnnotations className="Military_Person" enclosingAnnotation="uima.tt.DocumentAnnotation">
+  <tns:targetAnnotations className="Military_Person" enclosingAnnotation="org.apache.uima.jcas.tcas.DocumentAnnotation">
     <tns:targetAnnotationMatcher annotationTypeName="example.PersonTitle">
       <tns:groupFeatureMatchers>
         <tns:featureMatchers featurePath="Kind">

Modified: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/PersonTitlePlusFeatureExtraction.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/PersonTitlePlusFeatureExtraction.xml?rev=820308&r1=820307&r2=820308&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/PersonTitlePlusFeatureExtraction.xml (original)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/PersonTitlePlusFeatureExtraction.xml Wed Sep 30 15:48:40 2009
@@ -77,8 +77,12 @@
     <capabilities>
       <capability>
         <inputs/>
-        <outputs/>
-        <languagesSupported/>
+        <outputs>
+          <type allAnnotatorFeatures="true">example.PersonTitle</type>
+        </outputs>
+        <languagesSupported>
+          <language>en</language>
+        </languagesSupported>
       </capability>
     </capabilities>
     <operationalProperties>

Modified: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/UIMAFeatureConsumer.xml
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/UIMAFeatureConsumer.xml?rev=820308&r1=820307&r2=820308&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/UIMAFeatureConsumer.xml (original)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/UIMAFeatureConsumer.xml Wed Sep 30 15:48:40 2009
@@ -1,22 +1,4 @@
 <?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.    
--->  
 <casConsumerDescription xmlns="http://uima.apache.org/resourceSpecifier">
   <frameworkImplementation>org.apache.uima.java</frameworkImplementation>
   <implementationName>org.apache.uima.tools.cfe.UIMAFeatureConsumer</implementationName>
@@ -68,7 +50,11 @@
         </value>
       </nameValuePair>
     </configurationParameterSettings>
-    <typeSystemDescription/>
+    <typeSystemDescription>
+      <imports>
+        <import name="org.apache.uima.examples.SourceDocumentInformation"/>
+      </imports>
+    </typeSystemDescription>
     <typePriorities/>
     <fsIndexCollection/>
     <capabilities>

Added: incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/testDataRef.txt.fve
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/testDataRef.txt.fve?rev=820308&view=auto
==============================================================================
--- incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/testDataRef.txt.fve (added)
+++ incubator/uima/sandbox/trunk/ConfigurableFeatureExtractor/src/test/resources/testDataRef.txt.fve Wed Sep 30 15:48:40 2009
@@ -0,0 +1,2 @@
+Military_Person|43|47|col.
+Military_Person|58|63|capt.