You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by jo...@apache.org on 2011/08/01 17:25:50 UTC

svn commit: r1152824 [11/21] - in /uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker: ./ action/ batch/ condition/ engine/ kernel/ kernel/constraint/ kernel/expression/ kernel/expression/bool...

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerAnnotation.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerAnnotation.java?rev=1152824&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerAnnotation.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerAnnotation.java Mon Aug  1 15:24:44 2011
@@ -0,0 +1,122 @@
+/* First created by JCasGen Wed Apr 16 17:07:18 CEST 2008 */
+package org.apache.uima.tm.textmarker.kernel.type;
+
+import java.util.List;
+
+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;
+
+/** 
+ * Updated by JCasGen Tue Jan 25 09:29:36 CET 2011
+ * XML source: D:/work/workspace-tm/org.apache.uima.tm.textmarker.engine/desc/InternalTypeSystem.xml
+ * @generated */
+public class TextMarkerAnnotation extends Annotation {
+
+  public TextMarkerAnnotation(String type2, List<TextMarkerBasic> list) {
+  }
+
+  public List<TextMarkerBasic> getAssociatedSymbols() {
+    return null;
+  }
+
+  /**
+   * @generated
+   * @ordered
+   */
+  public final static int typeIndexID = JCasRegistry.register(TextMarkerAnnotation.class);
+
+  /**
+   * @generated
+   * @ordered
+   */
+  public final static int type = typeIndexID;
+
+  /** @generated */
+  @Override
+  public int getTypeIndexID() {return typeIndexID;}
+ 
+  /**
+   * Never called. Disable default constructor
+   * 
+   * @generated
+   */
+  protected TextMarkerAnnotation() {}
+    
+  /**
+   * Internal - constructor used by generator
+   * 
+   * @generated
+   */
+  public TextMarkerAnnotation(int addr, TOP_Type type) {
+    super(addr, type);
+    readObject();
+  }
+  
+  /** @generated */
+  public TextMarkerAnnotation(JCas jcas) {
+    super(jcas);
+    readObject();   
+  } 
+
+  /** @generated */
+  public TextMarkerAnnotation(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: Score
+
+  /**
+   * getter for Score - gets
+   * 
+   * @generated
+   */
+  public double getScore() {
+    if (TextMarkerAnnotation_Type.featOkTst && ((TextMarkerAnnotation_Type)jcasType).casFeat_score == null)
+      jcasType.jcas.throwFeatMissing("score", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerAnnotation");
+    return jcasType.ll_cas.ll_getDoubleValue(addr, ((TextMarkerAnnotation_Type)jcasType).casFeatCode_score);}
+    
+  /**
+   * setter for Score - sets
+   * 
+   * @generated
+   */
+  public void setScore(double v) {
+    if (TextMarkerAnnotation_Type.featOkTst && ((TextMarkerAnnotation_Type)jcasType).casFeat_score == null)
+      jcasType.jcas.throwFeatMissing("score", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerAnnotation");
+    jcasType.ll_cas.ll_setDoubleValue(addr, ((TextMarkerAnnotation_Type)jcasType).casFeatCode_score, v);}    
+   
+    
+  // *--------------*
+  // * Feature: Annotation
+
+  /**
+   * getter for Annotation - gets
+   * 
+   * @generated
+   */
+  public Annotation getAnnotation() {
+    if (TextMarkerAnnotation_Type.featOkTst && ((TextMarkerAnnotation_Type)jcasType).casFeat_annotation == null)
+      jcasType.jcas.throwFeatMissing("annotation", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerAnnotation");
+    return (Annotation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((TextMarkerAnnotation_Type)jcasType).casFeatCode_annotation)));}
+    
+  /**
+   * setter for Annotation - sets
+   * 
+   * @generated
+   */
+  public void setAnnotation(Annotation v) {
+    if (TextMarkerAnnotation_Type.featOkTst && ((TextMarkerAnnotation_Type)jcasType).casFeat_annotation == null)
+      jcasType.jcas.throwFeatMissing("annotation", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerAnnotation");
+    jcasType.ll_cas.ll_setRefValue(addr, ((TextMarkerAnnotation_Type)jcasType).casFeatCode_annotation, jcasType.ll_cas.ll_getFSRef(v));}    
+  }

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerAnnotation.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerAnnotation.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerAnnotation_Type.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerAnnotation_Type.java?rev=1152824&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerAnnotation_Type.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerAnnotation_Type.java Mon Aug  1 15:24:44 2011
@@ -0,0 +1,104 @@
+/* First created by JCasGen Wed Apr 16 17:07:18 CEST 2008 */
+package org.apache.uima.tm.textmarker.kernel.type;
+
+import org.apache.uima.cas.Feature;
+import org.apache.uima.cas.FeatureStructure;
+import org.apache.uima.cas.Type;
+import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.FSGenerator;
+import org.apache.uima.cas.impl.FeatureImpl;
+import org.apache.uima.cas.impl.TypeImpl;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
+import org.apache.uima.jcas.tcas.Annotation_Type;
+
+/** 
+ * Updated by JCasGen Tue Jan 25 09:29:36 CET 2011
+ * @generated */
+public class TextMarkerAnnotation_Type extends Annotation_Type {
+  /** @generated */
+  @Override
+  protected FSGenerator getFSGenerator() {return fsGenerator;}
+  /** @generated */
+  private final FSGenerator fsGenerator = 
+    new FSGenerator() {
+      public FeatureStructure createFS(int addr, CASImpl cas) {
+  			 if (TextMarkerAnnotation_Type.this.useExistingInstance) {
+  			   // Return eq fs instance if already created
+  		     FeatureStructure fs = TextMarkerAnnotation_Type.this.jcas.getJfsFromCaddr(addr);
+  		     if (null == fs) {
+  		       fs = new TextMarkerAnnotation(addr, TextMarkerAnnotation_Type.this);
+  			   TextMarkerAnnotation_Type.this.jcas.putJfsFromCaddr(addr, fs);
+  			   return fs;
+  		     }
+  		     return fs;
+        } else return new TextMarkerAnnotation(addr, TextMarkerAnnotation_Type.this);
+  	  }
+    };
+
+  /** @generated */
+  public final static int typeIndexID = TextMarkerAnnotation.typeIndexID;
+
+  /**
+   * @generated
+   * @modifiable
+   */
+  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.tm.textmarker.kernel.type.TextMarkerAnnotation");
+
+  /** @generated */
+  final Feature casFeat_score;
+  /** @generated */
+  final int     casFeatCode_score;
+  /** @generated */
+  public double getScore(int addr) {
+        if (featOkTst && casFeat_score == null)
+      jcas.throwFeatMissing("score", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerAnnotation");
+    return ll_cas.ll_getDoubleValue(addr, casFeatCode_score);
+  }
+  /** @generated */
+  public void setScore(int addr, double v) {
+        if (featOkTst && casFeat_score == null)
+      jcas.throwFeatMissing("score", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerAnnotation");
+    ll_cas.ll_setDoubleValue(addr, casFeatCode_score, v);}
+    
+  
+ 
+  /** @generated */
+  final Feature casFeat_annotation;
+  /** @generated */
+  final int     casFeatCode_annotation;
+  /** @generated */
+  public int getAnnotation(int addr) {
+        if (featOkTst && casFeat_annotation == null)
+      jcas.throwFeatMissing("annotation", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerAnnotation");
+    return ll_cas.ll_getRefValue(addr, casFeatCode_annotation);
+  }
+  /** @generated */
+  public void setAnnotation(int addr, int v) {
+        if (featOkTst && casFeat_annotation == null)
+      jcas.throwFeatMissing("annotation", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerAnnotation");
+    ll_cas.ll_setRefValue(addr, casFeatCode_annotation, v);}
+    
+  
+
+
+
+  /**
+   * initialize variables to correspond with Cas Type and Features
+   * 
+   * @generated
+   */
+  public TextMarkerAnnotation_Type(JCas jcas, Type casType) {
+    super(jcas, casType);
+    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
+
+ 
+    casFeat_score = jcas.getRequiredFeatureDE(casType, "score", "uima.cas.Double", featOkTst);
+    casFeatCode_score  = (null == casFeat_score) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_score).getCode();
+
+ 
+    casFeat_annotation = jcas.getRequiredFeatureDE(casType, "annotation", "uima.tcas.Annotation", featOkTst);
+    casFeatCode_annotation  = (null == casFeat_annotation) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_annotation).getCode();
+
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerAnnotation_Type.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerAnnotation_Type.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerBasic.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerBasic.java?rev=1152824&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerBasic.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerBasic.java Mon Aug  1 15:24:44 2011
@@ -0,0 +1,153 @@
+/* First created by JCasGen Wed Apr 16 17:01:16 CEST 2008 */
+package org.apache.uima.tm.textmarker.kernel.type;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.uima.cas.text.AnnotationFS;
+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;
+
+/** 
+ * Updated by JCasGen Tue Jan 25 09:29:36 CET 2011
+ * XML source: D:/work/workspace-tm/org.apache.uima.tm.textmarker.engine/desc/InternalTypeSystem.xml
+ * @generated */
+public class TextMarkerBasic extends Annotation {
+
+  private Set<String> partOf = new HashSet<String>(20);
+
+  private Map<String, AnnotationFS> typeMap = new HashMap<String, AnnotationFS>(7);
+
+  private Map<String, AnnotationFS> instanceMap = new HashMap<String, AnnotationFS>(10);
+
+  public Map<String, String> tags = new HashMap<String, String>(20);
+
+  public void setTags(Map<String, String> tags) {
+    this.tags = new HashMap<String, String>(tags);
+  }
+
+  public Map<String, String> getTags() {
+    return tags;
+  }
+
+  public void setAnnotation(String name, AnnotationFS annotation, boolean instance) {
+    if (instance) {
+      typeMap.put(name, annotation);
+      instanceMap.put(name, annotation);
+    } else if (!instanceMap.containsKey(name)) {
+      typeMap.put(name, annotation);
+    }
+  }
+
+  public void removeAnnotation(String name, boolean instance) {
+    if (instance && instanceMap.containsKey(name)) {
+      typeMap.remove(name);
+      instanceMap.remove(name);
+    } else if (!instance && !instanceMap.containsKey(name)) {
+      typeMap.remove(name);
+    }
+  }
+
+  public void addPartOf(String type) {
+    partOf.add(type);
+  }
+
+  public void removePartOf(String type) {
+    partOf.remove(type);
+  }
+
+  public boolean isAnchorOf(String name) {
+    return typeMap.containsKey(name);
+  }
+
+  public AnnotationFS getType(String name) {
+    return typeMap.get(name);
+  }
+
+  public boolean isPartOf(String name) {
+    return partOf.contains(name);
+  }
+
+  /**
+   * @generated
+   * @ordered
+   */
+  public final static int typeIndexID = JCasRegistry.register(TextMarkerBasic.class);
+
+  /**
+   * @generated
+   * @ordered
+   */
+  public final static int type = typeIndexID;
+
+  /** @generated */
+  @Override
+  public int getTypeIndexID() {return typeIndexID;}
+ 
+  /**
+   * Never called. Disable default constructor
+   * 
+   * @generated
+   */
+  protected TextMarkerBasic() {}
+    
+  /**
+   * Internal - constructor used by generator
+   * 
+   * @generated
+   */
+  public TextMarkerBasic(int addr, TOP_Type type) {
+    super(addr, type);
+    readObject();
+  }
+  
+  /** @generated */
+  public TextMarkerBasic(JCas jcas) {
+    super(jcas);
+    readObject();   
+  } 
+
+  /** @generated */
+  public TextMarkerBasic(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: Replacement
+
+  /**
+   * getter for Replacement - gets
+   * 
+   * @generated
+   */
+  public String getReplacement() {
+    if (TextMarkerBasic_Type.featOkTst && ((TextMarkerBasic_Type)jcasType).casFeat_replacement == null)
+      jcasType.jcas.throwFeatMissing("replacement", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerBasic");
+    return jcasType.ll_cas.ll_getStringValue(addr, ((TextMarkerBasic_Type)jcasType).casFeatCode_replacement);}
+    
+  /**
+   * setter for Replacement - sets
+   * 
+   * @generated
+   */
+  public void setReplacement(String v) {
+    if (TextMarkerBasic_Type.featOkTst && ((TextMarkerBasic_Type)jcasType).casFeat_replacement == null)
+      jcasType.jcas.throwFeatMissing("replacement", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerBasic");
+    jcasType.ll_cas.ll_setStringValue(addr, ((TextMarkerBasic_Type)jcasType).casFeatCode_replacement, v);}    
+    public Collection<AnnotationFS> getAnchors() {
+    return typeMap.values();
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerBasic.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerBasic.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerBasic_Type.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerBasic_Type.java?rev=1152824&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerBasic_Type.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerBasic_Type.java Mon Aug  1 15:24:44 2011
@@ -0,0 +1,82 @@
+/* First created by JCasGen Wed Apr 16 17:01:16 CEST 2008 */
+package org.apache.uima.tm.textmarker.kernel.type;
+
+import org.apache.uima.cas.Feature;
+import org.apache.uima.cas.FeatureStructure;
+import org.apache.uima.cas.Type;
+import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.FSGenerator;
+import org.apache.uima.cas.impl.FeatureImpl;
+import org.apache.uima.cas.impl.TypeImpl;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
+import org.apache.uima.jcas.tcas.Annotation_Type;
+
+/** 
+ * Updated by JCasGen Tue Jan 25 09:29:36 CET 2011
+ * @generated */
+public class TextMarkerBasic_Type extends Annotation_Type {
+  /** @generated */
+  @Override
+  protected FSGenerator getFSGenerator() {return fsGenerator;}
+  /** @generated */
+  private final FSGenerator fsGenerator = 
+    new FSGenerator() {
+      public FeatureStructure createFS(int addr, CASImpl cas) {
+  			 if (TextMarkerBasic_Type.this.useExistingInstance) {
+  			   // Return eq fs instance if already created
+  		     FeatureStructure fs = TextMarkerBasic_Type.this.jcas.getJfsFromCaddr(addr);
+  		     if (null == fs) {
+  		       fs = new TextMarkerBasic(addr, TextMarkerBasic_Type.this);
+  			   TextMarkerBasic_Type.this.jcas.putJfsFromCaddr(addr, fs);
+  			   return fs;
+  		     }
+  		     return fs;
+        } else return new TextMarkerBasic(addr, TextMarkerBasic_Type.this);
+  	  }
+    };
+
+  /** @generated */
+  public final static int typeIndexID = TextMarkerBasic.typeIndexID;
+
+  /**
+   * @generated
+   * @modifiable
+   */
+  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.tm.textmarker.kernel.type.TextMarkerBasic");
+
+  /** @generated */
+  final Feature casFeat_replacement;
+  /** @generated */
+  final int     casFeatCode_replacement;
+  /** @generated */
+  public String getReplacement(int addr) {
+        if (featOkTst && casFeat_replacement == null)
+      jcas.throwFeatMissing("replacement", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerBasic");
+    return ll_cas.ll_getStringValue(addr, casFeatCode_replacement);
+  }
+  /** @generated */
+  public void setReplacement(int addr, String v) {
+        if (featOkTst && casFeat_replacement == null)
+      jcas.throwFeatMissing("replacement", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerBasic");
+    ll_cas.ll_setStringValue(addr, casFeatCode_replacement, v);}
+    
+  
+
+
+
+  /**
+   * initialize variables to correspond with Cas Type and Features
+   * 
+   * @generated
+   */
+  public TextMarkerBasic_Type(JCas jcas, Type casType) {
+    super(jcas, casType);
+    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
+
+ 
+    casFeat_replacement = jcas.getRequiredFeatureDE(casType, "replacement", "uima.cas.String", featOkTst);
+    casFeatCode_replacement  = (null == casFeat_replacement) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_replacement).getCode();
+
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerBasic_Type.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerBasic_Type.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerColoring.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerColoring.java?rev=1152824&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerColoring.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerColoring.java Mon Aug  1 15:24:44 2011
@@ -0,0 +1,145 @@
+/* First created by JCasGen Wed Jul 23 16:50:38 CEST 2008 */
+package org.apache.uima.tm.textmarker.kernel.type;
+
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
+import org.apache.uima.jcas.cas.TOP;
+import org.apache.uima.jcas.cas.TOP_Type;
+
+import org.apache.uima.jcas.tcas.Annotation;
+
+
+/** 
+ * Updated by JCasGen Tue Jan 25 09:29:36 CET 2011
+ * XML source: D:/work/workspace-tm/org.apache.uima.tm.textmarker.engine/desc/InternalTypeSystem.xml
+ * @generated */
+public class TextMarkerColoring extends Annotation {
+  /**
+   * @generated
+   * @ordered
+   */
+  public final static int typeIndexID = JCasRegistry.register(TextMarkerColoring.class);
+
+  /**
+   * @generated
+   * @ordered
+   */
+  public final static int type = typeIndexID;
+
+  /** @generated */
+  @Override
+  public int getTypeIndexID() {return typeIndexID;}
+ 
+  /**
+   * Never called. Disable default constructor
+   * 
+   * @generated
+   */
+  protected TextMarkerColoring() {}
+    
+  /**
+   * Internal - constructor used by generator
+   * 
+   * @generated
+   */
+  public TextMarkerColoring(int addr, TOP_Type type) {
+    super(addr, type);
+    readObject();
+  }
+  
+  /** @generated */
+  public TextMarkerColoring(JCas jcas) {
+    super(jcas);
+    readObject();   
+  } 
+
+  /** @generated */  
+  public TextMarkerColoring(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: bgColor
+
+  /** getter for bgColor - gets 
+   * @generated */
+  public String getBgColor() {
+    if (TextMarkerColoring_Type.featOkTst && ((TextMarkerColoring_Type)jcasType).casFeat_bgColor == null)
+      jcasType.jcas.throwFeatMissing("bgColor", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerColoring");
+    return jcasType.ll_cas.ll_getStringValue(addr, ((TextMarkerColoring_Type)jcasType).casFeatCode_bgColor);}
+    
+  /** setter for bgColor - sets  
+   * @generated */
+  public void setBgColor(String v) {
+    if (TextMarkerColoring_Type.featOkTst && ((TextMarkerColoring_Type)jcasType).casFeat_bgColor == null)
+      jcasType.jcas.throwFeatMissing("bgColor", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerColoring");
+    jcasType.ll_cas.ll_setStringValue(addr, ((TextMarkerColoring_Type)jcasType).casFeatCode_bgColor, v);}    
+   
+    
+  // *--------------*
+  // * Feature: TargetType
+
+  /**
+   * getter for TargetType - gets
+   * 
+   * @generated
+   */
+  public String getTargetType() {
+    if (TextMarkerColoring_Type.featOkTst && ((TextMarkerColoring_Type)jcasType).casFeat_targetType == null)
+      jcasType.jcas.throwFeatMissing("targetType", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerColoring");
+    return jcasType.ll_cas.ll_getStringValue(addr, ((TextMarkerColoring_Type)jcasType).casFeatCode_targetType);}
+    
+  /**
+   * setter for TargetType - sets
+   * 
+   * @generated
+   */
+  public void setTargetType(String v) {
+    if (TextMarkerColoring_Type.featOkTst && ((TextMarkerColoring_Type)jcasType).casFeat_targetType == null)
+      jcasType.jcas.throwFeatMissing("targetType", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerColoring");
+    jcasType.ll_cas.ll_setStringValue(addr, ((TextMarkerColoring_Type)jcasType).casFeatCode_targetType, v);}    
+   
+    
+  //*--------------*
+  //* Feature: fgColor
+
+  /** getter for fgColor - gets 
+   * @generated */
+  public String getFgColor() {
+    if (TextMarkerColoring_Type.featOkTst && ((TextMarkerColoring_Type)jcasType).casFeat_fgColor == null)
+      jcasType.jcas.throwFeatMissing("fgColor", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerColoring");
+    return jcasType.ll_cas.ll_getStringValue(addr, ((TextMarkerColoring_Type)jcasType).casFeatCode_fgColor);}
+    
+  /** setter for fgColor - sets  
+   * @generated */
+  public void setFgColor(String v) {
+    if (TextMarkerColoring_Type.featOkTst && ((TextMarkerColoring_Type)jcasType).casFeat_fgColor == null)
+      jcasType.jcas.throwFeatMissing("fgColor", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerColoring");
+    jcasType.ll_cas.ll_setStringValue(addr, ((TextMarkerColoring_Type)jcasType).casFeatCode_fgColor, v);}    
+   
+    
+  //*--------------*
+  //* Feature: selected
+
+  /** getter for selected - gets 
+   * @generated */
+  public boolean getSelected() {
+    if (TextMarkerColoring_Type.featOkTst && ((TextMarkerColoring_Type)jcasType).casFeat_selected == null)
+      jcasType.jcas.throwFeatMissing("selected", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerColoring");
+    return jcasType.ll_cas.ll_getBooleanValue(addr, ((TextMarkerColoring_Type)jcasType).casFeatCode_selected);}
+    
+  /** setter for selected - sets  
+   * @generated */
+  public void setSelected(boolean v) {
+    if (TextMarkerColoring_Type.featOkTst && ((TextMarkerColoring_Type)jcasType).casFeat_selected == null)
+      jcasType.jcas.throwFeatMissing("selected", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerColoring");
+    jcasType.ll_cas.ll_setBooleanValue(addr, ((TextMarkerColoring_Type)jcasType).casFeatCode_selected, v);}    
+  }

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerColoring.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerColoring.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerColoring_Type.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerColoring_Type.java?rev=1152824&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerColoring_Type.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerColoring_Type.java Mon Aug  1 15:24:44 2011
@@ -0,0 +1,150 @@
+/* First created by JCasGen Wed Jul 23 16:50:38 CEST 2008 */
+package org.apache.uima.tm.textmarker.kernel.type;
+
+import org.apache.uima.cas.Feature;
+import org.apache.uima.jcas.tcas.Annotation_Type;
+
+import org.apache.uima.cas.FeatureStructure;
+import org.apache.uima.cas.Type;
+import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.FSGenerator;
+import org.apache.uima.cas.impl.FeatureImpl;
+import org.apache.uima.cas.impl.TypeImpl;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
+import org.apache.uima.jcas.cas.TOP_Type;
+
+/** 
+ * Updated by JCasGen Tue Jan 25 09:29:36 CET 2011
+ * @generated */
+public class TextMarkerColoring_Type extends Annotation_Type {
+  /** @generated */
+  @Override
+  protected FSGenerator getFSGenerator() {return fsGenerator;}
+  /** @generated */
+  private final FSGenerator fsGenerator = 
+    new FSGenerator() {
+      public FeatureStructure createFS(int addr, CASImpl cas) {
+  			 if (TextMarkerColoring_Type.this.useExistingInstance) {
+  			   // Return eq fs instance if already created
+  		     FeatureStructure fs = TextMarkerColoring_Type.this.jcas.getJfsFromCaddr(addr);
+  		     if (null == fs) {
+  		       fs = new TextMarkerColoring(addr, TextMarkerColoring_Type.this);
+  			   TextMarkerColoring_Type.this.jcas.putJfsFromCaddr(addr, fs);
+  			   return fs;
+  		     }
+  		     return fs;
+        } else return new TextMarkerColoring(addr, TextMarkerColoring_Type.this);
+  	  }
+    };
+
+  /** @generated */
+  public final static int typeIndexID = TextMarkerColoring.typeIndexID;
+
+  /**
+   * @generated
+   * @modifiable
+   */
+  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.tm.textmarker.kernel.type.TextMarkerColoring");
+
+  /** @generated */
+  final Feature casFeat_bgColor;
+  /** @generated */
+  final int     casFeatCode_bgColor;
+  /** @generated */ 
+  public String getBgColor(int addr) {
+        if (featOkTst && casFeat_bgColor == null)
+      jcas.throwFeatMissing("bgColor", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerColoring");
+    return ll_cas.ll_getStringValue(addr, casFeatCode_bgColor);
+  }
+  /** @generated */    
+  public void setBgColor(int addr, String v) {
+        if (featOkTst && casFeat_bgColor == null)
+      jcas.throwFeatMissing("bgColor", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerColoring");
+    ll_cas.ll_setStringValue(addr, casFeatCode_bgColor, v);}
+    
+  
+ 
+  /** @generated */
+  final Feature casFeat_targetType;
+  /** @generated */
+  final int     casFeatCode_targetType;
+  /** @generated */
+  public String getTargetType(int addr) {
+        if (featOkTst && casFeat_targetType == null)
+      jcas.throwFeatMissing("targetType", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerColoring");
+    return ll_cas.ll_getStringValue(addr, casFeatCode_targetType);
+  }
+  /** @generated */
+  public void setTargetType(int addr, String v) {
+        if (featOkTst && casFeat_targetType == null)
+      jcas.throwFeatMissing("targetType", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerColoring");
+    ll_cas.ll_setStringValue(addr, casFeatCode_targetType, v);}
+    
+  
+ 
+  /** @generated */
+  final Feature casFeat_fgColor;
+  /** @generated */
+  final int     casFeatCode_fgColor;
+  /** @generated */ 
+  public String getFgColor(int addr) {
+        if (featOkTst && casFeat_fgColor == null)
+      jcas.throwFeatMissing("fgColor", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerColoring");
+    return ll_cas.ll_getStringValue(addr, casFeatCode_fgColor);
+  }
+  /** @generated */    
+  public void setFgColor(int addr, String v) {
+        if (featOkTst && casFeat_fgColor == null)
+      jcas.throwFeatMissing("fgColor", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerColoring");
+    ll_cas.ll_setStringValue(addr, casFeatCode_fgColor, v);}
+    
+  
+ 
+  /** @generated */
+  final Feature casFeat_selected;
+  /** @generated */
+  final int     casFeatCode_selected;
+  /** @generated */ 
+  public boolean getSelected(int addr) {
+        if (featOkTst && casFeat_selected == null)
+      jcas.throwFeatMissing("selected", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerColoring");
+    return ll_cas.ll_getBooleanValue(addr, casFeatCode_selected);
+  }
+  /** @generated */    
+  public void setSelected(int addr, boolean v) {
+        if (featOkTst && casFeat_selected == null)
+      jcas.throwFeatMissing("selected", "org.apache.uima.tm.textmarker.kernel.type.TextMarkerColoring");
+    ll_cas.ll_setBooleanValue(addr, casFeatCode_selected, v);}
+    
+  
+
+
+
+  /**
+   * initialize variables to correspond with Cas Type and Features
+   * 
+   * @generated
+   */
+  public TextMarkerColoring_Type(JCas jcas, Type casType) {
+    super(jcas, casType);
+    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
+
+ 
+    casFeat_bgColor = jcas.getRequiredFeatureDE(casType, "bgColor", "uima.cas.String", featOkTst);
+    casFeatCode_bgColor  = (null == casFeat_bgColor) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_bgColor).getCode();
+
+ 
+    casFeat_targetType = jcas.getRequiredFeatureDE(casType, "targetType", "uima.cas.String", featOkTst);
+    casFeatCode_targetType  = (null == casFeat_targetType) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_targetType).getCode();
+
+ 
+    casFeat_fgColor = jcas.getRequiredFeatureDE(casType, "fgColor", "uima.cas.String", featOkTst);
+    casFeatCode_fgColor  = (null == casFeat_fgColor) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_fgColor).getCode();
+
+ 
+    casFeat_selected = jcas.getRequiredFeatureDE(casType, "selected", "uima.cas.Boolean", featOkTst);
+    casFeatCode_selected  = (null == casFeat_selected) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_selected).getCode();
+
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerColoring_Type.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerColoring_Type.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerFrame.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerFrame.java?rev=1152824&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerFrame.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerFrame.java Mon Aug  1 15:24:44 2011
@@ -0,0 +1,67 @@
+
+/* First created by JCasGen Thu Sep 03 16:30:49 CEST 2009 */
+package org.apache.uima.tm.textmarker.kernel.type;
+
+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;
+
+/** 
+ * Updated by JCasGen Tue Jan 25 09:29:36 CET 2011
+ * XML source: D:/work/workspace-tm/org.apache.uima.tm.textmarker.engine/desc/InternalTypeSystem.xml
+ * @generated */
+public class TextMarkerFrame extends Annotation {
+  /**
+   * @generated
+   * @ordered
+   */
+  public final static int typeIndexID = JCasRegistry.register(TextMarkerFrame.class);
+
+  /**
+   * @generated
+   * @ordered
+   */
+  public final static int type = typeIndexID;
+
+  /** @generated */
+  @Override
+  public int getTypeIndexID() {return typeIndexID;}
+ 
+  /**
+   * Never called. Disable default constructor
+   * 
+   * @generated
+   */
+  protected TextMarkerFrame() {}
+    
+  /**
+   * Internal - constructor used by generator
+   * 
+   * @generated
+   */
+  public TextMarkerFrame(int addr, TOP_Type type) {
+    super(addr, type);
+    readObject();
+  }
+  
+  /** @generated */
+  public TextMarkerFrame(JCas jcas) {
+    super(jcas);
+    readObject();   
+  } 
+
+  /** @generated */
+  public TextMarkerFrame(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() {
+  }
+
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerFrame.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerFrame.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerFrame_Type.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerFrame_Type.java?rev=1152824&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerFrame_Type.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerFrame_Type.java Mon Aug  1 15:24:44 2011
@@ -0,0 +1,56 @@
+/* First created by JCasGen Thu Sep 03 16:30:49 CEST 2009 */
+package org.apache.uima.tm.textmarker.kernel.type;
+
+import org.apache.uima.cas.FeatureStructure;
+import org.apache.uima.cas.Type;
+import org.apache.uima.cas.impl.CASImpl;
+import org.apache.uima.cas.impl.FSGenerator;
+import org.apache.uima.cas.impl.TypeImpl;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
+import org.apache.uima.jcas.tcas.Annotation_Type;
+
+/** 
+ * Updated by JCasGen Tue Jan 25 09:29:36 CET 2011
+ * @generated */
+public class TextMarkerFrame_Type extends Annotation_Type {
+  /** @generated */
+  @Override
+  protected FSGenerator getFSGenerator() {return fsGenerator;}
+  /** @generated */
+  private final FSGenerator fsGenerator = 
+    new FSGenerator() {
+      public FeatureStructure createFS(int addr, CASImpl cas) {
+  			 if (TextMarkerFrame_Type.this.useExistingInstance) {
+  			   // Return eq fs instance if already created
+  		     FeatureStructure fs = TextMarkerFrame_Type.this.jcas.getJfsFromCaddr(addr);
+  		     if (null == fs) {
+  		       fs = new TextMarkerFrame(addr, TextMarkerFrame_Type.this);
+  			   TextMarkerFrame_Type.this.jcas.putJfsFromCaddr(addr, fs);
+  			   return fs;
+  		     }
+  		     return fs;
+        } else return new TextMarkerFrame(addr, TextMarkerFrame_Type.this);
+  	  }
+    };
+
+  /** @generated */
+  public final static int typeIndexID = TextMarkerFrame.typeIndexID;
+
+  /**
+   * @generated
+   * @modifiable
+   */
+  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.tm.textmarker.kernel.type.TextMarkerFrame");
+
+  /**
+   * initialize variables to correspond with Cas Type and Features
+   * 
+   * @generated
+   */
+  public TextMarkerFrame_Type(JCas jcas, Type casType) {
+    super(jcas, casType);
+    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
+
+  }
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerFrame_Type.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TextMarkerFrame_Type.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TruePositive.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TruePositive.java?rev=1152824&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TruePositive.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TruePositive.java Mon Aug  1 15:24:44 2011
@@ -0,0 +1,61 @@
+
+
+/* First created by JCasGen Thu Feb 04 16:30:47 CET 2010 */
+package org.apache.uima.tm.textmarker.kernel.type;
+
+import org.apache.uima.jcas.JCas; 
+import org.apache.uima.jcas.JCasRegistry;
+import org.apache.uima.jcas.cas.TOP_Type;
+
+
+
+/** 
+ * Updated by JCasGen Tue Jan 25 09:29:36 CET 2011
+ * XML source: D:/work/workspace-tm/org.apache.uima.tm.textmarker.engine/desc/InternalTypeSystem.xml
+ * @generated */
+public class TruePositive extends EvalAnnotation {
+  /** @generated
+   * @ordered 
+   */
+  public final static int typeIndexID = JCasRegistry.register(TruePositive.class);
+  /** @generated
+   * @ordered 
+   */
+  public final static int type = typeIndexID;
+  /** @generated  */
+  public              int getTypeIndexID() {return typeIndexID;}
+ 
+  /** Never called.  Disable default constructor
+   * @generated */
+  protected TruePositive() {}
+    
+  /** Internal - constructor used by generator 
+   * @generated */
+  public TruePositive(int addr, TOP_Type type) {
+    super(addr, type);
+    readObject();
+  }
+  
+  /** @generated */
+  public TruePositive(JCas jcas) {
+    super(jcas);
+    readObject();   
+  } 
+
+  /** @generated */  
+  public TruePositive(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() {}
+     
+}
+
+    
\ No newline at end of file

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TruePositive.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TruePositive.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TruePositive_Type.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TruePositive_Type.java?rev=1152824&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TruePositive_Type.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TruePositive_Type.java Mon Aug  1 15:24:44 2011
@@ -0,0 +1,54 @@
+
+/* First created by JCasGen Thu Feb 04 16:30:47 CET 2010 */
+package org.apache.uima.tm.textmarker.kernel.type;
+
+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;
+
+/** 
+ * Updated by JCasGen Tue Jan 25 09:29:36 CET 2011
+ * @generated */
+public class TruePositive_Type extends EvalAnnotation_Type {
+  /** @generated */
+  protected FSGenerator getFSGenerator() {return fsGenerator;}
+  /** @generated */
+  private final FSGenerator fsGenerator = 
+    new FSGenerator() {
+      public FeatureStructure createFS(int addr, CASImpl cas) {
+  			 if (TruePositive_Type.this.useExistingInstance) {
+  			   // Return eq fs instance if already created
+  		     FeatureStructure fs = TruePositive_Type.this.jcas.getJfsFromCaddr(addr);
+  		     if (null == fs) {
+  		       fs = new TruePositive(addr, TruePositive_Type.this);
+  			   TruePositive_Type.this.jcas.putJfsFromCaddr(addr, fs);
+  			   return fs;
+  		     }
+  		     return fs;
+        } else return new TruePositive(addr, TruePositive_Type.this);
+  	  }
+    };
+  /** @generated */
+  public final static int typeIndexID = TruePositive.typeIndexID;
+  /** @generated 
+     @modifiable */
+  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.tm.textmarker.kernel.type.TruePositive");
+
+
+
+  /** initialize variables to correspond with Cas Type and Features
+	* @generated */
+  public TruePositive_Type(JCas jcas, Type casType) {
+    super(jcas, casType);
+    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
+
+  }
+}
+
+
+
+    
\ No newline at end of file

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TruePositive_Type.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/type/TruePositive_Type.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/DebugInfoCollectorVisitor.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/DebugInfoCollectorVisitor.java?rev=1152824&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/DebugInfoCollectorVisitor.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/DebugInfoCollectorVisitor.java Mon Aug  1 15:24:44 2011
@@ -0,0 +1,170 @@
+package org.apache.uima.tm.textmarker.kernel.visitor;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Stack;
+
+import org.apache.uima.tm.textmarker.kernel.BlockApply;
+import org.apache.uima.tm.textmarker.kernel.ScriptApply;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerBlock;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerElement;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerModule;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerStatement;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerStream;
+import org.apache.uima.tm.textmarker.kernel.rule.RuleApply;
+import org.apache.uima.tm.textmarker.kernel.rule.TextMarkerRule;
+import org.apache.uima.tm.textmarker.kernel.type.DebugScriptApply;
+import org.apache.uima.tm.textmarker.verbalize.TextMarkerVerbalizer;
+
+
+public class DebugInfoCollectorVisitor implements TextMarkerInferenceVisitor {
+
+  private boolean createDebugInfo;
+
+  private List<String> ids;
+
+  private DebugInfoFactory debugFactory;
+
+  private boolean withMatches;
+
+  private ScriptApply rootApply;
+
+  private Map<TextMarkerStatement, Stack<ScriptApply>> applies;
+
+  private Stack<TextMarkerElement> callStack;
+
+  public DebugInfoCollectorVisitor(boolean createDebugInfo, boolean withMatches, List<String> ids,
+          TextMarkerVerbalizer verbalizer) {
+    super();
+    this.createDebugInfo = createDebugInfo;
+    this.withMatches = withMatches;
+    this.ids = ids;
+
+    debugFactory = new DebugInfoFactory(verbalizer);
+    applies = new HashMap<TextMarkerStatement, Stack<ScriptApply>>();
+    callStack = new Stack<TextMarkerElement>();
+  }
+
+  public DebugInfoCollectorVisitor(boolean createDebugInfo) {
+    super();
+    this.createDebugInfo = createDebugInfo;
+    this.ids = new ArrayList<String>();
+  }
+
+  public boolean isCreateDebugInfo() {
+    return createDebugInfo;
+  }
+
+  public boolean createDebugInfo(TextMarkerRule rule) {
+    return createDebugInfo || ids.contains("" + rule.getId());
+  }
+
+  public void beginVisit(TextMarkerElement element, ScriptApply result) {
+    if (element instanceof TextMarkerStatement) {
+      callStack.push(element);
+      TextMarkerStatement stmt = (TextMarkerStatement) element;
+      Stack<ScriptApply> stack = applies.get(stmt);
+      if (stack == null) {
+        stack = new Stack<ScriptApply>();
+        applies.put(stmt, stack);
+      }
+      stack.push(result);
+      applies.put(stmt, stack);
+      if (result instanceof RuleApply) {
+        RuleApply ra = (RuleApply) result;
+        ra.setAcceptMatches(ra.isAcceptMatches() || withMatches);
+      }
+    }
+  }
+
+  public void endVisit(TextMarkerElement element, ScriptApply result) {
+    // TODO create UIMA stuff here not later -> save memory!
+    if (element instanceof TextMarkerStatement) {
+      TextMarkerStatement stmt = (TextMarkerStatement) element;
+      TextMarkerBlock parent = stmt.getParent();
+      Stack<ScriptApply> stack = applies.get(stmt);
+      if (stack == null) {
+        stack = new Stack<ScriptApply>();
+        applies.put(stmt, stack);
+      }
+      // replace
+      if (!stack.isEmpty()) {
+        stack.pop();
+      }
+      stack.push(result);
+      applies.put(stmt, stack);
+      if (parent != null) {
+        Stack<ScriptApply> parentStack = applies.get(parent);
+        if (parentStack != null && !parentStack.isEmpty()) {
+          ScriptApply parentApply = parentStack.peek();
+          if (parentApply instanceof BlockApply) {
+            BlockApply blockApply = (BlockApply) parentApply;
+            if (element instanceof TextMarkerRule && parent.getRule().equals(element)
+                    && result instanceof RuleApply) {
+              blockApply.setRuleApply((RuleApply) result);
+
+              // } else {
+              // blockApply.add(result);
+              // }
+
+            } else if (stack.size() == 1) {
+              if (callStack.size() > 1) {
+                // TODO hotfixed
+                TextMarkerElement tme = callStack.get(callStack.size() - 2);
+                if (tme.equals(parent)
+                // || tme.equals(element)
+                ) {
+                  blockApply.add(result);
+                } else {
+                  // System.out.println();
+                  // TODO too many blocks added
+                }
+              } else {
+                blockApply.add(result);
+
+              }
+            } else {
+              // TODO refactor !!! ... really!!!!
+              TextMarkerElement tme = callStack.get(callStack.size() - 2);
+              if (tme.equals(parent)
+              // || tme.equals(element)
+              ) {
+                blockApply.add(result);
+              } else {
+                // System.out.println();
+                // TODO too many blocks added
+              }
+            }
+          }
+        }
+      }
+      stack.pop();
+      callStack.pop();
+    }
+    if (element instanceof TextMarkerModule) {
+      rootApply = result;
+    }
+  }
+
+  public void finished(TextMarkerStream stream, List<TextMarkerInferenceVisitor> visitors) {
+    if (createDebugInfo) {
+      Map<TextMarkerElement, Long> timeInfo = getTimeInfo(visitors);
+
+      DebugScriptApply debugScriptApply = debugFactory.createDebugScriptApply(rootApply, stream,
+              false, withMatches, timeInfo);
+      debugScriptApply.addToIndexes();
+    }
+  }
+
+  private Map<TextMarkerElement, Long> getTimeInfo(List<TextMarkerInferenceVisitor> visitors) {
+    for (TextMarkerInferenceVisitor each : visitors) {
+      if (each instanceof TimeProfilerVisitor) {
+        return ((TimeProfilerVisitor) each).getTimeInfo();
+      }
+    }
+    return null;
+  }
+
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/DebugInfoCollectorVisitor.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/DebugInfoCollectorVisitor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/DebugInfoFactory.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/DebugInfoFactory.java?rev=1152824&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/DebugInfoFactory.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/DebugInfoFactory.java Mon Aug  1 15:24:44 2011
@@ -0,0 +1,291 @@
+package org.apache.uima.tm.textmarker.kernel.visitor;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.uima.cas.text.AnnotationFS;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.cas.FSArray;
+import org.apache.uima.tm.textmarker.kernel.BlockApply;
+import org.apache.uima.tm.textmarker.kernel.ScriptApply;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerBlock;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerElement;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerStream;
+import org.apache.uima.tm.textmarker.kernel.rule.EvaluatedCondition;
+import org.apache.uima.tm.textmarker.kernel.rule.RuleApply;
+import org.apache.uima.tm.textmarker.kernel.rule.RuleElement;
+import org.apache.uima.tm.textmarker.kernel.rule.RuleElementMatch;
+import org.apache.uima.tm.textmarker.kernel.rule.RuleMatch;
+import org.apache.uima.tm.textmarker.kernel.rule.TextMarkerMatcher;
+import org.apache.uima.tm.textmarker.kernel.type.DebugBlockApply;
+import org.apache.uima.tm.textmarker.kernel.type.DebugEvaluatedCondition;
+import org.apache.uima.tm.textmarker.kernel.type.DebugFailedRuleMatch;
+import org.apache.uima.tm.textmarker.kernel.type.DebugMatchedRuleMatch;
+import org.apache.uima.tm.textmarker.kernel.type.DebugRuleApply;
+import org.apache.uima.tm.textmarker.kernel.type.DebugRuleElementMatch;
+import org.apache.uima.tm.textmarker.kernel.type.DebugRuleElementMatches;
+import org.apache.uima.tm.textmarker.kernel.type.DebugRuleMatch;
+import org.apache.uima.tm.textmarker.kernel.type.DebugScriptApply;
+import org.apache.uima.tm.textmarker.utils.UIMAUtils;
+import org.apache.uima.tm.textmarker.verbalize.TextMarkerVerbalizer;
+
+
+public class DebugInfoFactory {
+
+  private TextMarkerVerbalizer verbalizer;
+
+  public DebugInfoFactory(TextMarkerVerbalizer verbalizer) {
+    super();
+    this.verbalizer = verbalizer;
+  }
+
+  public DebugBlockApply createDummyBlockApply(RuleMatch ruleMatch, TextMarkerStream stream,
+          boolean addToIndex, boolean withMatches, Map<TextMarkerElement, Long> timeInfo) {
+    JCas cas = stream.getJCas();
+    DebugBlockApply dba = new DebugBlockApply(cas);
+    AnnotationFS matchedAnnotation = ruleMatch.getMatchedAnnotation(stream, null);
+    dba.setElement(matchedAnnotation.getCoveredText());
+    dba.setBegin(matchedAnnotation.getBegin());
+    dba.setEnd(matchedAnnotation.getEnd());
+    return dba;
+  }
+
+  public DebugBlockApply createDebugBlockApply(BlockApply blockApply, TextMarkerStream stream,
+          boolean addToIndex, boolean withMatches, Map<TextMarkerElement, Long> timeInfo) {
+    JCas cas = stream.getJCas();
+    DebugBlockApply dba = new DebugBlockApply(cas);
+    List<DebugScriptApply> innerApply = new ArrayList<DebugScriptApply>();
+    // TODO refactor and remove counting hotfix
+    int applied = blockApply.getRuleApply().getApplied();
+    if (applied > 1) {
+      List<ScriptApply> innerApplies = blockApply.getInnerApplies();
+      List<List<ScriptApply>> loops = new ArrayList<List<ScriptApply>>();
+      for (int i = 0; i < applied; i++) {
+        loops.add(new ArrayList<ScriptApply>());
+      }
+      int counter = 0;
+      int size = innerApplies.size();
+      int parts = size / applied;
+      for (ScriptApply each : innerApplies) {
+        int listIndex = Math.max(0, counter / parts);
+        List<ScriptApply> list = loops.get(listIndex);
+        list.add(each);
+        counter++;
+      }
+      counter = 0;
+      for (List<ScriptApply> list : loops) {
+        RuleMatch ruleMatch = blockApply.getRuleApply().getList().get(counter);
+        DebugBlockApply dummyBlockApply = createDummyBlockApply(ruleMatch, stream, addToIndex,
+                withMatches, timeInfo);
+        List<DebugRuleMatch> ruleMatches = new ArrayList<DebugRuleMatch>();
+        ruleMatches.add(createDebugRuleMatch(ruleMatch, stream, addToIndex, withMatches, timeInfo));
+        dummyBlockApply.setApplied(1);
+        dummyBlockApply.setTried(1);
+        dummyBlockApply.setRules(UIMAUtils.toFSArray(cas, ruleMatches));
+        List<DebugScriptApply> innerInnerApply = new ArrayList<DebugScriptApply>();
+        for (ScriptApply each : list) {
+          DebugScriptApply eachInnerInner = createDebugScriptApply(each, stream, addToIndex,
+                  withMatches, timeInfo);
+          innerInnerApply.add(eachInnerInner);
+        }
+        dummyBlockApply.setInnerApply(UIMAUtils.toFSArray(cas, innerInnerApply));
+        innerApply.add(dummyBlockApply);
+        counter++;
+      }
+      dba.setInnerApply(UIMAUtils.toFSArray(cas, innerApply));
+      dba.setElement(verbalizer.verbalize((TextMarkerBlock) blockApply.getElement(), false));
+      DebugRuleApply ruleApply = createDebugRuleApply(blockApply.getRuleApply(), stream,
+              addToIndex, withMatches, timeInfo);
+      dba.setApplied(ruleApply.getApplied());
+      dba.setTried(ruleApply.getTried());
+      dba.setRules(ruleApply.getRules());
+      dba.setBegin(ruleApply.getBegin());
+      dba.setEnd(ruleApply.getEnd());
+      if (timeInfo != null) {
+        long time = timeInfo.get(blockApply.getElement());
+        dba.setTime(time);
+      }
+      if (addToIndex)
+        dba.addToIndexes();
+      return dba;
+    } else {
+
+      for (ScriptApply each : blockApply.getInnerApplies()) {
+        innerApply.add(createDebugScriptApply(each, stream, addToIndex, withMatches, timeInfo));
+      }
+      dba.setInnerApply(UIMAUtils.toFSArray(cas, innerApply));
+      dba.setElement(verbalizer.verbalize((TextMarkerBlock) blockApply.getElement(), false));
+      DebugRuleApply ruleApply = createDebugRuleApply(blockApply.getRuleApply(), stream,
+              addToIndex, withMatches, timeInfo);
+      dba.setApplied(ruleApply.getApplied());
+      dba.setTried(ruleApply.getTried());
+      dba.setRules(ruleApply.getRules());
+      dba.setBegin(ruleApply.getBegin());
+      dba.setEnd(ruleApply.getEnd());
+      if (timeInfo != null) {
+        long time = timeInfo.get(blockApply.getElement());
+        dba.setTime(time);
+      }
+      if (addToIndex)
+        dba.addToIndexes();
+      return dba;
+    }
+  }
+
+  public DebugRuleApply createDebugRuleApply(RuleApply ruleApply, TextMarkerStream stream,
+          boolean addToIndex, boolean withMatches, Map<TextMarkerElement, Long> timeInfo) {
+    JCas cas = stream.getJCas();
+    DebugRuleApply dra = new DebugRuleApply(cas);
+    List<DebugRuleMatch> ruleMatches = new ArrayList<DebugRuleMatch>();
+    int begin = Integer.MAX_VALUE;
+    int end = 0;
+    if (withMatches) {
+      for (RuleMatch match : ruleApply.getList()) {
+        DebugRuleMatch debugRuleMatch = createDebugRuleMatch(match, stream, addToIndex,
+                withMatches, timeInfo);
+        begin = Math.min(begin, debugRuleMatch.getBegin());
+        end = Math.max(end, debugRuleMatch.getEnd());
+        ruleMatches.add(debugRuleMatch);
+      }
+    }
+    if (begin >= end) {
+      begin = end;
+    }
+    dra.setRules(UIMAUtils.toFSArray(cas, ruleMatches));
+    dra.setElement(verbalizer.verbalize(ruleApply.getElement()));
+    dra.setApplied(ruleApply.getApplied());
+    dra.setTried(ruleApply.getTried());
+    dra.setBegin(begin);
+    dra.setEnd(end);
+    if (timeInfo != null) {
+      long time = timeInfo.get(ruleApply.getElement());
+      dra.setTime(time);
+    }
+    if (addToIndex)
+      dra.addToIndexes();
+    return dra;
+  }
+
+  public DebugRuleMatch createDebugRuleMatch(RuleMatch match, TextMarkerStream stream,
+          boolean addToIndex, boolean withMatches, Map<TextMarkerElement, Long> timeInfo) {
+    JCas cas = stream.getJCas();
+    DebugRuleMatch drm = null;
+    if (match.matched()) {
+      drm = new DebugMatchedRuleMatch(cas);
+    } else {
+      drm = new DebugFailedRuleMatch(cas);
+    }
+    List<DebugRuleElementMatches> ruleMatches = new ArrayList<DebugRuleElementMatches>();
+    for (RuleElement re : match.getMatchInfos().keySet()) {
+      List<RuleElementMatch> rems = match.getMatchInfos().get(re);
+      ruleMatches.add(createDebugRuleElementMatches(re, rems, stream, addToIndex));
+    }
+    drm.setElements(UIMAUtils.toFSArray(cas, ruleMatches));
+    drm.setMatched(match.matched());
+    if (match.matched()) {
+      List<DebugScriptApply> delegates = new ArrayList<DebugScriptApply>();
+      for (ScriptApply rem : match.getDelegateApply().values()) {
+        delegates.add(createDebugScriptApply(rem, stream, addToIndex, withMatches, timeInfo));
+      }
+      drm.setDelegates(UIMAUtils.toFSArray(cas, delegates));
+    }
+    if (timeInfo != null) {
+      long time = timeInfo.get(match.getRule());
+      drm.setTime(time);
+    }
+    AnnotationFS matchedAnnotation = match.getMatchedAnnotation(stream, null);
+    if (matchedAnnotation != null) {
+      drm.setBegin(matchedAnnotation.getBegin());
+      drm.setEnd(matchedAnnotation.getEnd());
+      if (addToIndex || withMatches)
+        drm.addToIndexes();
+    }
+    return drm;
+  }
+
+  public DebugRuleElementMatches createDebugRuleElementMatches(RuleElement re,
+          List<RuleElementMatch> rems, TextMarkerStream stream, boolean addToIndex) {
+    JCas cas = stream.getJCas();
+    DebugRuleElementMatches drems = new DebugRuleElementMatches(cas);
+    drems.setElement(verbalizer.verbalize(re));
+    List<DebugRuleElementMatch> remList = new ArrayList<DebugRuleElementMatch>();
+
+    for (RuleElementMatch each : rems) {
+      remList.add(createDebugRuleElementMatch(each, stream, addToIndex));
+    }
+    drems.setMatches(UIMAUtils.toFSArray(cas, remList));
+    if (addToIndex)
+      drems.addToIndexes();
+    return drems;
+  }
+
+  public DebugRuleElementMatch createDebugRuleElementMatch(RuleElementMatch rem,
+          TextMarkerStream stream, boolean addToIndex) {
+    JCas cas = stream.getJCas();
+    DebugRuleElementMatch drem = new DebugRuleElementMatch(cas);
+
+    DebugEvaluatedCondition base = new DebugEvaluatedCondition(cas);
+    base.setValue(rem.isBaseConditionMatched());
+
+    TextMarkerMatcher matcher = rem.getRuleElement().getMatcher();
+    String baseString = verbalizer.verbalize(matcher.getExpression());
+    base.setElement(baseString);
+    drem.setBaseCondition(base);
+    drem.setConditions(createEvaluatedConditions(rem, stream, addToIndex));
+    List<AnnotationFS> annotations = rem.getTextsMatched();
+    if (!annotations.isEmpty()) {
+      drem.setBegin(annotations.get(0).getBegin());
+      drem.setEnd(annotations.get(annotations.size() - 1).getEnd());
+    }
+    if (addToIndex)
+      drem.addToIndexes();
+    return drem;
+  }
+
+  private FSArray createEvaluatedConditions(RuleElementMatch rem, TextMarkerStream stream,
+          boolean addToIndex) {
+    JCas cas = stream.getJCas();
+    List<DebugEvaluatedCondition> ecs = new ArrayList<DebugEvaluatedCondition>();
+    if (rem.getConditions() != null) {
+      for (EvaluatedCondition each : rem.getConditions()) {
+        DebugEvaluatedCondition ec = new DebugEvaluatedCondition(cas);
+        ec.setValue(each.isValue());
+        ec.setElement(verbalizer.verbalize(each.getCondition()));
+        ec.setConditions(createEvaluatedConditions(each, stream, addToIndex));
+        ecs.add(ec);
+      }
+    }
+    FSArray result = UIMAUtils.toFSArray(cas, ecs);
+    return result;
+  }
+
+  private FSArray createEvaluatedConditions(EvaluatedCondition eval, TextMarkerStream stream,
+          boolean addToIndex) {
+    JCas cas = stream.getJCas();
+    List<DebugEvaluatedCondition> ecs = new ArrayList<DebugEvaluatedCondition>();
+    for (EvaluatedCondition each : eval.getConditions()) {
+      DebugEvaluatedCondition ec = new DebugEvaluatedCondition(cas);
+      ec.setValue(each.isValue());
+      ec.setElement(verbalizer.verbalize(each.getCondition()));
+      ec.setConditions(createEvaluatedConditions(each, stream, addToIndex));
+      ecs.add(ec);
+    }
+    FSArray result = UIMAUtils.toFSArray(cas, ecs);
+    return result;
+  }
+
+  public DebugScriptApply createDebugScriptApply(ScriptApply apply, TextMarkerStream stream,
+          boolean addToIndex, boolean withMatches, Map<TextMarkerElement, Long> timeInfo) {
+    DebugScriptApply debug = null;
+    if (apply instanceof BlockApply) {
+      debug = createDebugBlockApply((BlockApply) apply, stream, addToIndex, withMatches, timeInfo);
+    } else if (apply instanceof RuleApply) {
+      debug = createDebugRuleApply((RuleApply) apply, stream, addToIndex, withMatches, timeInfo);
+    }
+    if (addToIndex)
+      debug.addToIndexes();
+    return debug;
+  }
+
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/DebugInfoFactory.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/DebugInfoFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/InferenceCrowd.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/InferenceCrowd.java?rev=1152824&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/InferenceCrowd.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/InferenceCrowd.java Mon Aug  1 15:24:44 2011
@@ -0,0 +1,41 @@
+package org.apache.uima.tm.textmarker.kernel.visitor;
+
+import java.util.List;
+
+import org.apache.uima.tm.textmarker.kernel.ScriptApply;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerElement;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerStream;
+
+
+public class InferenceCrowd implements TextMarkerInferenceVisitor {
+
+  private final List<TextMarkerInferenceVisitor> visitors;
+
+  public InferenceCrowd(List<TextMarkerInferenceVisitor> visitors) {
+    super();
+    this.visitors = visitors;
+  }
+
+  public void beginVisit(TextMarkerElement element, ScriptApply result) {
+    for (TextMarkerInferenceVisitor each : visitors) {
+      each.beginVisit(element, result);
+    }
+  }
+
+  public void endVisit(TextMarkerElement element, ScriptApply result) {
+    for (TextMarkerInferenceVisitor each : visitors) {
+      each.endVisit(element, result);
+    }
+  }
+
+  public void finished(TextMarkerStream stream) {
+    for (TextMarkerInferenceVisitor each : visitors) {
+      each.finished(stream, visitors);
+    }
+  }
+
+  public void finished(TextMarkerStream stream, List<TextMarkerInferenceVisitor> visitors) {
+    finished(stream);
+  }
+
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/InferenceCrowd.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/InferenceCrowd.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/StatisticsVisitor.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/StatisticsVisitor.java?rev=1152824&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/StatisticsVisitor.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/StatisticsVisitor.java Mon Aug  1 15:24:44 2011
@@ -0,0 +1,182 @@
+package org.apache.uima.tm.textmarker.kernel.visitor;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.uima.cas.Feature;
+import org.apache.uima.cas.FeatureStructure;
+import org.apache.uima.cas.Type;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.cas.DoubleArray;
+import org.apache.uima.jcas.cas.IntegerArray;
+import org.apache.uima.jcas.cas.StringArray;
+import org.apache.uima.tm.textmarker.action.AbstractTextMarkerAction;
+import org.apache.uima.tm.textmarker.condition.AbstractTextMarkerCondition;
+import org.apache.uima.tm.textmarker.kernel.ScriptApply;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerElement;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerStream;
+import org.apache.uima.tm.textmarker.kernel.type.Statistics;
+import org.apache.uima.tm.textmarker.utils.UIMAUtils;
+import org.apache.uima.tm.textmarker.verbalize.TextMarkerVerbalizer;
+
+
+public class StatisticsVisitor implements TextMarkerInferenceVisitor {
+
+  private Map<String, Long> conditionTime;
+
+  private Map<String, Long> actionTime;
+
+  private Map<String, Integer> conditionAmount;
+
+  private Map<String, Integer> actionAmount;
+
+  private Map<String, Long> conditionDelta;
+
+  private Map<String, Long> actionDelta;
+
+  private TextMarkerVerbalizer verbalizer;
+
+  public StatisticsVisitor(TextMarkerVerbalizer verbalizer) {
+    super();
+    this.verbalizer = verbalizer;
+    conditionTime = new HashMap<String, Long>();
+    actionTime = new HashMap<String, Long>();
+    conditionAmount = new HashMap<String, Integer>();
+    actionAmount = new HashMap<String, Integer>();
+    conditionDelta = new HashMap<String, Long>();
+    actionDelta = new HashMap<String, Long>();
+  }
+
+  public void beginVisit(TextMarkerElement element, ScriptApply result) {
+    if (element instanceof AbstractTextMarkerCondition) {
+      AbstractTextMarkerCondition c = (AbstractTextMarkerCondition) element;
+      String name = verbalizer.verbalizeName(c);
+      Integer amount = conditionAmount.get(name);
+      if (amount == null)
+        amount = 0;
+      amount++;
+      conditionAmount.put(name, amount);
+      conditionDelta.put(name, System.currentTimeMillis());
+    } else if (element instanceof AbstractTextMarkerAction) {
+      AbstractTextMarkerAction a = (AbstractTextMarkerAction) element;
+      String name = verbalizer.verbalizeName(a);
+      Integer amount = actionAmount.get(name);
+      if (amount == null)
+        amount = 0;
+      amount++;
+      actionAmount.put(name, amount);
+      actionDelta.put(name, System.currentTimeMillis());
+    }
+  }
+
+  public void endVisit(TextMarkerElement element, ScriptApply result) {
+    if (element instanceof AbstractTextMarkerCondition) {
+      AbstractTextMarkerCondition c = (AbstractTextMarkerCondition) element;
+      String name = verbalizer.verbalizeName(c);
+      Long start = conditionDelta.get(name);
+      long delta = System.currentTimeMillis() - start;
+      Long total = conditionTime.get(name);
+      if (total == null)
+        total = 0L;
+      total += delta;
+      conditionTime.put(name, total);
+    } else if (element instanceof AbstractTextMarkerAction) {
+      AbstractTextMarkerAction a = (AbstractTextMarkerAction) element;
+      String name = verbalizer.verbalizeName(a);
+      Long start = actionDelta.get(name);
+      long delta = System.currentTimeMillis() - start;
+      Long total = actionTime.get(name);
+      if (total == null)
+        total = 0L;
+      total += delta;
+      actionTime.put(name, total);
+    }
+  }
+
+  public void finished(TextMarkerStream stream, List<TextMarkerInferenceVisitor> visitors) {
+    List<String> names = new ArrayList<String>();
+    List<Double> totals = new ArrayList<Double>();
+    List<Integer> amounts = new ArrayList<Integer>();
+    List<Double> parts = new ArrayList<Double>();
+    for (String each : conditionTime.keySet()) {
+      double total = conditionTime.get(each);
+      double amount = conditionAmount.get(each);
+      double part = total / amount;
+      part *= 10000;
+      part = Math.round(part);
+      part /= 10000;
+      names.add(each);
+      totals.add(total);
+      amounts.add((int) amount);
+      parts.add(part);
+    }
+
+    for (String each : actionTime.keySet()) {
+      double total = actionTime.get(each);
+      double amount = actionAmount.get(each);
+      double part = total / amount;
+      part *= 10000;
+      part = Math.round(part);
+      part /= 10000;
+      // System.out.println(each + " : " + total + "ms / " + amount + " = " + part + "ms");
+      names.add(each);
+      totals.add(total);
+      amounts.add((int) amount);
+      parts.add(part);
+    }
+    JCas jCas = stream.getJCas();
+    StringArray nameArray = UIMAUtils.toStringArray(jCas, names.toArray(new String[] {}));
+    DoubleArray totalArray = UIMAUtils.toDoubleArray(jCas, getDoubleArray(totals));
+    IntegerArray amountArray = UIMAUtils.toIntegerArray(jCas, getIntegerArray(amounts));
+    DoubleArray partArray = UIMAUtils.toDoubleArray(jCas, getDoubleArray(parts));
+
+    Type type = jCas.getCasType(Statistics.type);
+    Feature fname = type.getFeatureByBaseName("name");
+    Feature ftotal = type.getFeatureByBaseName("total");
+    Feature famount = type.getFeatureByBaseName("amount");
+    Feature fparts = type.getFeatureByBaseName("part");
+    FeatureStructure fs = jCas.getCas().createFS(type);
+    fs.setFeatureValue(fname, nameArray);
+    fs.setFeatureValue(ftotal, totalArray);
+    fs.setFeatureValue(famount, amountArray);
+    fs.setFeatureValue(fparts, partArray);
+    jCas.getCas().addFsToIndexes(fs);
+  }
+
+  private int[] getIntegerArray(List<Integer> array) {
+    int[] result = new int[array.size()];
+    int i = 0;
+    for (Integer each : array) {
+      result[i++] = each;
+    }
+    return result;
+  }
+
+  private double[] getDoubleArray(List<Double> array) {
+    double[] result = new double[array.size()];
+    int i = 0;
+    for (Double each : array) {
+      result[i++] = each;
+    }
+    return result;
+  }
+
+  public Map<String, Long> getConditionTime() {
+    return conditionTime;
+  }
+
+  public Map<String, Long> getActionTime() {
+    return actionTime;
+  }
+
+  public Map<String, Integer> getConditionAmount() {
+    return conditionAmount;
+  }
+
+  public Map<String, Integer> getActionAmount() {
+    return actionAmount;
+  }
+
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/StatisticsVisitor.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/StatisticsVisitor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/TextMarkerInferenceVisitor.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/TextMarkerInferenceVisitor.java?rev=1152824&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/TextMarkerInferenceVisitor.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/TextMarkerInferenceVisitor.java Mon Aug  1 15:24:44 2011
@@ -0,0 +1,18 @@
+package org.apache.uima.tm.textmarker.kernel.visitor;
+
+import java.util.List;
+
+import org.apache.uima.tm.textmarker.kernel.ScriptApply;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerElement;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerStream;
+
+
+public interface TextMarkerInferenceVisitor {
+
+  void beginVisit(TextMarkerElement element, ScriptApply result);
+
+  void endVisit(TextMarkerElement element, ScriptApply result);
+
+  void finished(TextMarkerStream stream, List<TextMarkerInferenceVisitor> visitors);
+
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/TextMarkerInferenceVisitor.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/TextMarkerInferenceVisitor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/TimeProfilerVisitor.java
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/TimeProfilerVisitor.java?rev=1152824&view=auto
==============================================================================
--- uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/TimeProfilerVisitor.java (added)
+++ uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/TimeProfilerVisitor.java Mon Aug  1 15:24:44 2011
@@ -0,0 +1,39 @@
+package org.apache.uima.tm.textmarker.kernel.visitor;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.uima.tm.textmarker.kernel.ScriptApply;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerElement;
+import org.apache.uima.tm.textmarker.kernel.TextMarkerStream;
+
+
+public class TimeProfilerVisitor implements TextMarkerInferenceVisitor {
+
+  private Map<TextMarkerElement, Long> timeInfo;
+
+  public TimeProfilerVisitor() {
+    super();
+    timeInfo = new HashMap<TextMarkerElement, Long>();
+  }
+
+  public void beginVisit(TextMarkerElement element, ScriptApply result) {
+    getTimeInfo().put(element, System.currentTimeMillis());
+  }
+
+  public void endVisit(TextMarkerElement element, ScriptApply result) {
+    Long start = getTimeInfo().get(element);
+    long value = System.currentTimeMillis() - start;
+    getTimeInfo().put(element, value);
+  }
+
+  public void finished(TextMarkerStream stream, List<TextMarkerInferenceVisitor> visitors) {
+    // others do the work
+  }
+
+  public Map<TextMarkerElement, Long> getTimeInfo() {
+    return timeInfo;
+  }
+
+}

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/TimeProfilerVisitor.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: uima/sandbox/trunk/TextMarker/org.apache.uima.tm.textmarker.engine/src/main/java/org/apache/uima/tm/textmarker/kernel/visitor/TimeProfilerVisitor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain