You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by pk...@apache.org on 2013/04/29 16:09:55 UTC
svn commit: r1477088 [3/3] - in /uima/sandbox/ruta/trunk/ruta-core/src:
main/java/org/apache/uima/ruta/ main/java/org/apache/uima/ruta/action/
main/java/org/apache/uima/ruta/condition/
main/java/org/apache/uima/ruta/engine/ main/java/org/apache/uima/ru...
Copied: uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/RutaAnnotationSeeder.java (from r1477049, uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/TextMarkerAnnotationSeeder.java)
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/RutaAnnotationSeeder.java?p2=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/RutaAnnotationSeeder.java&p1=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/TextMarkerAnnotationSeeder.java&r1=1477049&r2=1477088&rev=1477088&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/TextMarkerAnnotationSeeder.java (original)
+++ uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/seed/RutaAnnotationSeeder.java Mon Apr 29 14:09:53 2013
@@ -17,13 +17,13 @@
* under the License.
*/
-package org.apache.uima.textmarker.seed;
+package org.apache.uima.ruta.seed;
import org.apache.uima.cas.CAS;
import org.apache.uima.cas.Type;
-public interface TextMarkerAnnotationSeeder {
+public interface RutaAnnotationSeeder {
Type seed(String text, CAS cas);
Copied: uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaAnnotation.java (from r1477049, uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerAnnotation.java)
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaAnnotation.java?p2=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaAnnotation.java&p1=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerAnnotation.java&r1=1477049&r2=1477088&rev=1477088&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerAnnotation.java (original)
+++ uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaAnnotation.java Mon Apr 29 14:09:53 2013
@@ -1,7 +1,7 @@
/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.textmarker.type;
+package org.apache.uima.ruta.type;
import org.apache.uima.jcas.JCas;
import org.apache.uima.jcas.JCasRegistry;
@@ -11,13 +11,13 @@ import org.apache.uima.jcas.tcas.Annotat
/**
* Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * XML source: D:/work/workspace-uima6/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/engine/InternalTypeSystem.xml
+ * XML source: D:/work/workspace-uima6/uimaj-ruta/src/main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
* @generated */
-public class TextMarkerAnnotation extends Annotation {
+public class RutaAnnotation extends Annotation {
/** @generated
* @ordered
*/
- public final static int typeIndexID = JCasRegistry.register(TextMarkerAnnotation.class);
+ public final static int typeIndexID = JCasRegistry.register(RutaAnnotation.class);
/** @generated
* @ordered
*/
@@ -27,23 +27,23 @@ public class TextMarkerAnnotation extend
/** Never called. Disable default constructor
* @generated */
- protected TextMarkerAnnotation() {/* intentionally empty block */}
+ protected RutaAnnotation() {/* intentionally empty block */}
/** Internal - constructor used by generator
* @generated */
- public TextMarkerAnnotation(int addr, TOP_Type type) {
+ public RutaAnnotation(int addr, TOP_Type type) {
super(addr, type);
readObject();
}
/** @generated */
- public TextMarkerAnnotation(JCas jcas) {
+ public RutaAnnotation(JCas jcas) {
super(jcas);
readObject();
}
/** @generated */
- public TextMarkerAnnotation(JCas jcas, int begin, int end) {
+ public RutaAnnotation(JCas jcas, int begin, int end) {
super(jcas);
setBegin(begin);
setEnd(end);
@@ -64,16 +64,16 @@ public class TextMarkerAnnotation extend
/** 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.textmarker.type.TextMarkerAnnotation");
- return jcasType.ll_cas.ll_getDoubleValue(addr, ((TextMarkerAnnotation_Type)jcasType).casFeatCode_score);}
+ if (RutaAnnotation_Type.featOkTst && ((RutaAnnotation_Type)jcasType).casFeat_score == null)
+ jcasType.jcas.throwFeatMissing("score", "org.apache.uima.ruta.type.RutaAnnotation");
+ return jcasType.ll_cas.ll_getDoubleValue(addr, ((RutaAnnotation_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.textmarker.type.TextMarkerAnnotation");
- jcasType.ll_cas.ll_setDoubleValue(addr, ((TextMarkerAnnotation_Type)jcasType).casFeatCode_score, v);}
+ if (RutaAnnotation_Type.featOkTst && ((RutaAnnotation_Type)jcasType).casFeat_score == null)
+ jcasType.jcas.throwFeatMissing("score", "org.apache.uima.ruta.type.RutaAnnotation");
+ jcasType.ll_cas.ll_setDoubleValue(addr, ((RutaAnnotation_Type)jcasType).casFeatCode_score, v);}
//*--------------*
@@ -82,16 +82,16 @@ public class TextMarkerAnnotation extend
/** 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.textmarker.type.TextMarkerAnnotation");
- return (Annotation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((TextMarkerAnnotation_Type)jcasType).casFeatCode_annotation)));}
+ if (RutaAnnotation_Type.featOkTst && ((RutaAnnotation_Type)jcasType).casFeat_annotation == null)
+ jcasType.jcas.throwFeatMissing("annotation", "org.apache.uima.ruta.type.RutaAnnotation");
+ return (Annotation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((RutaAnnotation_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.textmarker.type.TextMarkerAnnotation");
- jcasType.ll_cas.ll_setRefValue(addr, ((TextMarkerAnnotation_Type)jcasType).casFeatCode_annotation, jcasType.ll_cas.ll_getFSRef(v));}
+ if (RutaAnnotation_Type.featOkTst && ((RutaAnnotation_Type)jcasType).casFeat_annotation == null)
+ jcasType.jcas.throwFeatMissing("annotation", "org.apache.uima.ruta.type.RutaAnnotation");
+ jcasType.ll_cas.ll_setRefValue(addr, ((RutaAnnotation_Type)jcasType).casFeatCode_annotation, jcasType.ll_cas.ll_getFSRef(v));}
}
\ No newline at end of file
Copied: uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaAnnotation_Type.java (from r1477049, uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerAnnotation_Type.java)
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaAnnotation_Type.java?p2=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaAnnotation_Type.java&p1=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerAnnotation_Type.java&r1=1477049&r2=1477088&rev=1477088&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerAnnotation_Type.java (original)
+++ uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaAnnotation_Type.java Mon Apr 29 14:09:53 2013
@@ -1,6 +1,6 @@
/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.textmarker.type;
+package org.apache.uima.ruta.type;
import org.apache.uima.cas.Feature;
import org.apache.uima.cas.FeatureStructure;
@@ -16,30 +16,30 @@ import org.apache.uima.jcas.tcas.Annotat
/**
* Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
* @generated */
-public class TextMarkerAnnotation_Type extends Annotation_Type {
+public class RutaAnnotation_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 (TextMarkerAnnotation_Type.this.useExistingInstance) {
+ if (RutaAnnotation_Type.this.useExistingInstance) {
// Return eq fs instance if already created
- FeatureStructure fs = TextMarkerAnnotation_Type.this.jcas.getJfsFromCaddr(addr);
+ FeatureStructure fs = RutaAnnotation_Type.this.jcas.getJfsFromCaddr(addr);
if (null == fs) {
- fs = new TextMarkerAnnotation(addr, TextMarkerAnnotation_Type.this);
- TextMarkerAnnotation_Type.this.jcas.putJfsFromCaddr(addr, fs);
+ fs = new RutaAnnotation(addr, RutaAnnotation_Type.this);
+ RutaAnnotation_Type.this.jcas.putJfsFromCaddr(addr, fs);
return fs;
}
return fs;
- } else return new TextMarkerAnnotation(addr, TextMarkerAnnotation_Type.this);
+ } else return new RutaAnnotation(addr, RutaAnnotation_Type.this);
}
};
/** @generated */
- public final static int typeIndexID = TextMarkerAnnotation.typeIndexID;
+ public final static int typeIndexID = RutaAnnotation.typeIndexID;
/** @generated
@modifiable */
- public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.textmarker.type.TextMarkerAnnotation");
+ public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.ruta.type.RutaAnnotation");
/** @generated */
final Feature casFeat_score;
@@ -48,13 +48,13 @@ public class TextMarkerAnnotation_Type e
/** @generated */
public double getScore(int addr) {
if (featOkTst && casFeat_score == null)
- jcas.throwFeatMissing("score", "org.apache.uima.textmarker.type.TextMarkerAnnotation");
+ jcas.throwFeatMissing("score", "org.apache.uima.ruta.type.RutaAnnotation");
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.textmarker.type.TextMarkerAnnotation");
+ jcas.throwFeatMissing("score", "org.apache.uima.ruta.type.RutaAnnotation");
ll_cas.ll_setDoubleValue(addr, casFeatCode_score, v);}
@@ -66,13 +66,13 @@ public class TextMarkerAnnotation_Type e
/** @generated */
public int getAnnotation(int addr) {
if (featOkTst && casFeat_annotation == null)
- jcas.throwFeatMissing("annotation", "org.apache.uima.textmarker.type.TextMarkerAnnotation");
+ jcas.throwFeatMissing("annotation", "org.apache.uima.ruta.type.RutaAnnotation");
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.textmarker.type.TextMarkerAnnotation");
+ jcas.throwFeatMissing("annotation", "org.apache.uima.ruta.type.RutaAnnotation");
ll_cas.ll_setRefValue(addr, casFeatCode_annotation, v);}
@@ -81,7 +81,7 @@ public class TextMarkerAnnotation_Type e
/** initialize variables to correspond with Cas Type and Features
* @generated */
- public TextMarkerAnnotation_Type(JCas jcas, Type casType) {
+ public RutaAnnotation_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
Copied: uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaBasic.java (from r1477049, uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerBasic.java)
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaBasic.java?p2=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaBasic.java&p1=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerBasic.java&r1=1477049&r2=1477088&rev=1477088&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerBasic.java (original)
+++ uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaBasic.java Mon Apr 29 14:09:53 2013
@@ -1,5 +1,5 @@
/* First created by JCasGen Wed Apr 16 17:01:16 CEST 2008 */
-package org.apache.uima.textmarker.type;
+package org.apache.uima.ruta.type;
import java.util.Collections;
import java.util.HashMap;
@@ -19,9 +19,9 @@ import org.apache.uima.jcas.tcas.Annotat
/**
* Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * XML source: D:/work/workspace-uima6/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/engine/InternalTypeSystem.xml
+ * XML source: D:/work/workspace-uima6/uimaj-ruta/src/main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
* @generated */
-public class TextMarkerBasic extends Annotation {
+public class RutaBasic extends Annotation {
private static final int INITIAL_CAPACITY = 2;
@@ -245,7 +245,7 @@ public class TextMarkerBasic extends Ann
* @generated
* @ordered
*/
- public final static int typeIndexID = JCasRegistry.register(TextMarkerBasic.class);
+ public final static int typeIndexID = JCasRegistry.register(RutaBasic.class);
/**
* @generated
@@ -262,26 +262,26 @@ public class TextMarkerBasic extends Ann
*
* @generated
*/
- protected TextMarkerBasic() {/* intentionally empty block */}
+ protected RutaBasic() {/* intentionally empty block */}
/**
* Internal - constructor used by generator
*
* @generated
*/
- public TextMarkerBasic(int addr, TOP_Type type) {
+ public RutaBasic(int addr, TOP_Type type) {
super(addr, type);
readObject();
}
/** @generated */
- public TextMarkerBasic(JCas jcas) {
+ public RutaBasic(JCas jcas) {
super(jcas);
readObject();
}
/** @generated */
- public TextMarkerBasic(JCas jcas, int begin, int end) {
+ public RutaBasic(JCas jcas, int begin, int end) {
super(jcas);
setBegin(begin);
setEnd(end);
@@ -302,9 +302,9 @@ public class TextMarkerBasic extends Ann
* @generated
*/
public String getReplacement() {
- if (TextMarkerBasic_Type.featOkTst && ((TextMarkerBasic_Type)jcasType).casFeat_replacement == null)
- jcasType.jcas.throwFeatMissing("replacement", "org.apache.uima.textmarker.type.TextMarkerBasic");
- return jcasType.ll_cas.ll_getStringValue(addr, ((TextMarkerBasic_Type)jcasType).casFeatCode_replacement);}
+ if (RutaBasic_Type.featOkTst && ((RutaBasic_Type)jcasType).casFeat_replacement == null)
+ jcasType.jcas.throwFeatMissing("replacement", "org.apache.uima.ruta.type.RutaBasic");
+ return jcasType.ll_cas.ll_getStringValue(addr, ((RutaBasic_Type)jcasType).casFeatCode_replacement);}
/**
* setter for Replacement - sets
@@ -312,9 +312,9 @@ public class TextMarkerBasic extends Ann
* @generated
*/
public void setReplacement(String v) {
- if (TextMarkerBasic_Type.featOkTst && ((TextMarkerBasic_Type)jcasType).casFeat_replacement == null)
- jcasType.jcas.throwFeatMissing("replacement", "org.apache.uima.textmarker.type.TextMarkerBasic");
- jcasType.ll_cas.ll_setStringValue(addr, ((TextMarkerBasic_Type)jcasType).casFeatCode_replacement, v);}
+ if (RutaBasic_Type.featOkTst && ((RutaBasic_Type)jcasType).casFeat_replacement == null)
+ jcasType.jcas.throwFeatMissing("replacement", "org.apache.uima.ruta.type.RutaBasic");
+ jcasType.ll_cas.ll_setStringValue(addr, ((RutaBasic_Type)jcasType).casFeatCode_replacement, v);}
public Map<Type, Set<AnnotationFS>> getEndMap() {
return endMap;
}
Copied: uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaBasic_Type.java (from r1477049, uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerBasic_Type.java)
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaBasic_Type.java?p2=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaBasic_Type.java&p1=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerBasic_Type.java&r1=1477049&r2=1477088&rev=1477088&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerBasic_Type.java (original)
+++ uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaBasic_Type.java Mon Apr 29 14:09:53 2013
@@ -1,6 +1,6 @@
/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.textmarker.type;
+package org.apache.uima.ruta.type;
import org.apache.uima.cas.Feature;
import org.apache.uima.cas.FeatureStructure;
@@ -16,30 +16,30 @@ import org.apache.uima.jcas.tcas.Annotat
/**
* Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
* @generated */
-public class TextMarkerBasic_Type extends Annotation_Type {
+public class RutaBasic_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 (TextMarkerBasic_Type.this.useExistingInstance) {
+ if (RutaBasic_Type.this.useExistingInstance) {
// Return eq fs instance if already created
- FeatureStructure fs = TextMarkerBasic_Type.this.jcas.getJfsFromCaddr(addr);
+ FeatureStructure fs = RutaBasic_Type.this.jcas.getJfsFromCaddr(addr);
if (null == fs) {
- fs = new TextMarkerBasic(addr, TextMarkerBasic_Type.this);
- TextMarkerBasic_Type.this.jcas.putJfsFromCaddr(addr, fs);
+ fs = new RutaBasic(addr, RutaBasic_Type.this);
+ RutaBasic_Type.this.jcas.putJfsFromCaddr(addr, fs);
return fs;
}
return fs;
- } else return new TextMarkerBasic(addr, TextMarkerBasic_Type.this);
+ } else return new RutaBasic(addr, RutaBasic_Type.this);
}
};
/** @generated */
- public final static int typeIndexID = TextMarkerBasic.typeIndexID;
+ public final static int typeIndexID = RutaBasic.typeIndexID;
/** @generated
@modifiable */
- public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.textmarker.type.TextMarkerBasic");
+ public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.ruta.type.RutaBasic");
/** @generated */
final Feature casFeat_replacement;
@@ -48,13 +48,13 @@ public class TextMarkerBasic_Type extend
/** @generated */
public String getReplacement(int addr) {
if (featOkTst && casFeat_replacement == null)
- jcas.throwFeatMissing("replacement", "org.apache.uima.textmarker.type.TextMarkerBasic");
+ jcas.throwFeatMissing("replacement", "org.apache.uima.ruta.type.RutaBasic");
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.textmarker.type.TextMarkerBasic");
+ jcas.throwFeatMissing("replacement", "org.apache.uima.ruta.type.RutaBasic");
ll_cas.ll_setStringValue(addr, casFeatCode_replacement, v);}
@@ -63,7 +63,7 @@ public class TextMarkerBasic_Type extend
/** initialize variables to correspond with Cas Type and Features
* @generated */
- public TextMarkerBasic_Type(JCas jcas, Type casType) {
+ public RutaBasic_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
Copied: uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaColoring.java (from r1477049, uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerColoring.java)
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaColoring.java?p2=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaColoring.java&p1=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerColoring.java&r1=1477049&r2=1477088&rev=1477088&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerColoring.java (original)
+++ uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaColoring.java Mon Apr 29 14:09:53 2013
@@ -1,7 +1,7 @@
/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.textmarker.type;
+package org.apache.uima.ruta.type;
import org.apache.uima.jcas.JCas;
import org.apache.uima.jcas.JCasRegistry;
@@ -11,13 +11,13 @@ import org.apache.uima.jcas.tcas.Annotat
/**
* Updated by JCasGen Thu Jul 12 10:42:34 CEST 2012
- * XML source: D:/work/workspace-uima6/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/engine/InternalTypeSystem.xml
+ * XML source: D:/work/workspace-uima6/uimaj-ruta/src/main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
* @generated */
-public class TextMarkerColoring extends Annotation {
+public class RutaColoring extends Annotation {
/** @generated
* @ordered
*/
- public final static int typeIndexID = JCasRegistry.register(TextMarkerColoring.class);
+ public final static int typeIndexID = JCasRegistry.register(RutaColoring.class);
/** @generated
* @ordered
*/
@@ -27,23 +27,23 @@ public class TextMarkerColoring extends
/** Never called. Disable default constructor
* @generated */
- protected TextMarkerColoring() {/* intentionally empty block */}
+ protected RutaColoring() {/* intentionally empty block */}
/** Internal - constructor used by generator
* @generated */
- public TextMarkerColoring(int addr, TOP_Type type) {
+ public RutaColoring(int addr, TOP_Type type) {
super(addr, type);
readObject();
}
/** @generated */
- public TextMarkerColoring(JCas jcas) {
+ public RutaColoring(JCas jcas) {
super(jcas);
readObject();
}
/** @generated */
- public TextMarkerColoring(JCas jcas, int begin, int end) {
+ public RutaColoring(JCas jcas, int begin, int end) {
super(jcas);
setBegin(begin);
setEnd(end);
@@ -64,16 +64,16 @@ public class TextMarkerColoring extends
/** 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.textmarker.type.TextMarkerColoring");
- return jcasType.ll_cas.ll_getStringValue(addr, ((TextMarkerColoring_Type)jcasType).casFeatCode_bgColor);}
+ if (RutaColoring_Type.featOkTst && ((RutaColoring_Type)jcasType).casFeat_bgColor == null)
+ jcasType.jcas.throwFeatMissing("bgColor", "org.apache.uima.ruta.type.RutaColoring");
+ return jcasType.ll_cas.ll_getStringValue(addr, ((RutaColoring_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.textmarker.type.TextMarkerColoring");
- jcasType.ll_cas.ll_setStringValue(addr, ((TextMarkerColoring_Type)jcasType).casFeatCode_bgColor, v);}
+ if (RutaColoring_Type.featOkTst && ((RutaColoring_Type)jcasType).casFeat_bgColor == null)
+ jcasType.jcas.throwFeatMissing("bgColor", "org.apache.uima.ruta.type.RutaColoring");
+ jcasType.ll_cas.ll_setStringValue(addr, ((RutaColoring_Type)jcasType).casFeatCode_bgColor, v);}
//*--------------*
@@ -82,16 +82,16 @@ public class TextMarkerColoring extends
/** 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.textmarker.type.TextMarkerColoring");
- return jcasType.ll_cas.ll_getStringValue(addr, ((TextMarkerColoring_Type)jcasType).casFeatCode_targetType);}
+ if (RutaColoring_Type.featOkTst && ((RutaColoring_Type)jcasType).casFeat_targetType == null)
+ jcasType.jcas.throwFeatMissing("targetType", "org.apache.uima.ruta.type.RutaColoring");
+ return jcasType.ll_cas.ll_getStringValue(addr, ((RutaColoring_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.textmarker.type.TextMarkerColoring");
- jcasType.ll_cas.ll_setStringValue(addr, ((TextMarkerColoring_Type)jcasType).casFeatCode_targetType, v);}
+ if (RutaColoring_Type.featOkTst && ((RutaColoring_Type)jcasType).casFeat_targetType == null)
+ jcasType.jcas.throwFeatMissing("targetType", "org.apache.uima.ruta.type.RutaColoring");
+ jcasType.ll_cas.ll_setStringValue(addr, ((RutaColoring_Type)jcasType).casFeatCode_targetType, v);}
//*--------------*
@@ -100,16 +100,16 @@ public class TextMarkerColoring extends
/** 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.textmarker.type.TextMarkerColoring");
- return jcasType.ll_cas.ll_getStringValue(addr, ((TextMarkerColoring_Type)jcasType).casFeatCode_fgColor);}
+ if (RutaColoring_Type.featOkTst && ((RutaColoring_Type)jcasType).casFeat_fgColor == null)
+ jcasType.jcas.throwFeatMissing("fgColor", "org.apache.uima.ruta.type.RutaColoring");
+ return jcasType.ll_cas.ll_getStringValue(addr, ((RutaColoring_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.textmarker.type.TextMarkerColoring");
- jcasType.ll_cas.ll_setStringValue(addr, ((TextMarkerColoring_Type)jcasType).casFeatCode_fgColor, v);}
+ if (RutaColoring_Type.featOkTst && ((RutaColoring_Type)jcasType).casFeat_fgColor == null)
+ jcasType.jcas.throwFeatMissing("fgColor", "org.apache.uima.ruta.type.RutaColoring");
+ jcasType.ll_cas.ll_setStringValue(addr, ((RutaColoring_Type)jcasType).casFeatCode_fgColor, v);}
//*--------------*
@@ -118,16 +118,16 @@ public class TextMarkerColoring extends
/** 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.textmarker.type.TextMarkerColoring");
- return jcasType.ll_cas.ll_getBooleanValue(addr, ((TextMarkerColoring_Type)jcasType).casFeatCode_selected);}
+ if (RutaColoring_Type.featOkTst && ((RutaColoring_Type)jcasType).casFeat_selected == null)
+ jcasType.jcas.throwFeatMissing("selected", "org.apache.uima.ruta.type.RutaColoring");
+ return jcasType.ll_cas.ll_getBooleanValue(addr, ((RutaColoring_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.textmarker.type.TextMarkerColoring");
- jcasType.ll_cas.ll_setBooleanValue(addr, ((TextMarkerColoring_Type)jcasType).casFeatCode_selected, v);}
+ if (RutaColoring_Type.featOkTst && ((RutaColoring_Type)jcasType).casFeat_selected == null)
+ jcasType.jcas.throwFeatMissing("selected", "org.apache.uima.ruta.type.RutaColoring");
+ jcasType.ll_cas.ll_setBooleanValue(addr, ((RutaColoring_Type)jcasType).casFeatCode_selected, v);}
}
\ No newline at end of file
Copied: uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaColoring_Type.java (from r1477049, uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerColoring_Type.java)
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaColoring_Type.java?p2=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaColoring_Type.java&p1=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerColoring_Type.java&r1=1477049&r2=1477088&rev=1477088&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerColoring_Type.java (original)
+++ uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaColoring_Type.java Mon Apr 29 14:09:53 2013
@@ -1,6 +1,6 @@
/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.textmarker.type;
+package org.apache.uima.ruta.type;
import org.apache.uima.cas.Feature;
import org.apache.uima.cas.FeatureStructure;
@@ -16,30 +16,30 @@ import org.apache.uima.jcas.tcas.Annotat
/**
* Updated by JCasGen Thu Jul 12 10:42:34 CEST 2012
* @generated */
-public class TextMarkerColoring_Type extends Annotation_Type {
+public class RutaColoring_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 (TextMarkerColoring_Type.this.useExistingInstance) {
+ if (RutaColoring_Type.this.useExistingInstance) {
// Return eq fs instance if already created
- FeatureStructure fs = TextMarkerColoring_Type.this.jcas.getJfsFromCaddr(addr);
+ FeatureStructure fs = RutaColoring_Type.this.jcas.getJfsFromCaddr(addr);
if (null == fs) {
- fs = new TextMarkerColoring(addr, TextMarkerColoring_Type.this);
- TextMarkerColoring_Type.this.jcas.putJfsFromCaddr(addr, fs);
+ fs = new RutaColoring(addr, RutaColoring_Type.this);
+ RutaColoring_Type.this.jcas.putJfsFromCaddr(addr, fs);
return fs;
}
return fs;
- } else return new TextMarkerColoring(addr, TextMarkerColoring_Type.this);
+ } else return new RutaColoring(addr, RutaColoring_Type.this);
}
};
/** @generated */
- public final static int typeIndexID = TextMarkerColoring.typeIndexID;
+ public final static int typeIndexID = RutaColoring.typeIndexID;
/** @generated
@modifiable */
- public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.textmarker.type.TextMarkerColoring");
+ public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.ruta.type.RutaColoring");
/** @generated */
final Feature casFeat_bgColor;
@@ -48,13 +48,13 @@ public class TextMarkerColoring_Type ext
/** @generated */
public String getBgColor(int addr) {
if (featOkTst && casFeat_bgColor == null)
- jcas.throwFeatMissing("bgColor", "org.apache.uima.textmarker.type.TextMarkerColoring");
+ jcas.throwFeatMissing("bgColor", "org.apache.uima.ruta.type.RutaColoring");
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.textmarker.type.TextMarkerColoring");
+ jcas.throwFeatMissing("bgColor", "org.apache.uima.ruta.type.RutaColoring");
ll_cas.ll_setStringValue(addr, casFeatCode_bgColor, v);}
@@ -66,13 +66,13 @@ public class TextMarkerColoring_Type ext
/** @generated */
public String getTargetType(int addr) {
if (featOkTst && casFeat_targetType == null)
- jcas.throwFeatMissing("targetType", "org.apache.uima.textmarker.type.TextMarkerColoring");
+ jcas.throwFeatMissing("targetType", "org.apache.uima.ruta.type.RutaColoring");
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.textmarker.type.TextMarkerColoring");
+ jcas.throwFeatMissing("targetType", "org.apache.uima.ruta.type.RutaColoring");
ll_cas.ll_setStringValue(addr, casFeatCode_targetType, v);}
@@ -84,13 +84,13 @@ public class TextMarkerColoring_Type ext
/** @generated */
public String getFgColor(int addr) {
if (featOkTst && casFeat_fgColor == null)
- jcas.throwFeatMissing("fgColor", "org.apache.uima.textmarker.type.TextMarkerColoring");
+ jcas.throwFeatMissing("fgColor", "org.apache.uima.ruta.type.RutaColoring");
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.textmarker.type.TextMarkerColoring");
+ jcas.throwFeatMissing("fgColor", "org.apache.uima.ruta.type.RutaColoring");
ll_cas.ll_setStringValue(addr, casFeatCode_fgColor, v);}
@@ -102,13 +102,13 @@ public class TextMarkerColoring_Type ext
/** @generated */
public boolean getSelected(int addr) {
if (featOkTst && casFeat_selected == null)
- jcas.throwFeatMissing("selected", "org.apache.uima.textmarker.type.TextMarkerColoring");
+ jcas.throwFeatMissing("selected", "org.apache.uima.ruta.type.RutaColoring");
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.textmarker.type.TextMarkerColoring");
+ jcas.throwFeatMissing("selected", "org.apache.uima.ruta.type.RutaColoring");
ll_cas.ll_setBooleanValue(addr, casFeatCode_selected, v);}
@@ -117,7 +117,7 @@ public class TextMarkerColoring_Type ext
/** initialize variables to correspond with Cas Type and Features
* @generated */
- public TextMarkerColoring_Type(JCas jcas, Type casType) {
+ public RutaColoring_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
Copied: uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaFrame.java (from r1477049, uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerFrame.java)
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaFrame.java?p2=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaFrame.java&p1=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerFrame.java&r1=1477049&r2=1477088&rev=1477088&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerFrame.java (original)
+++ uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaFrame.java Mon Apr 29 14:09:53 2013
@@ -1,7 +1,7 @@
/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.textmarker.type;
+package org.apache.uima.ruta.type;
import org.apache.uima.jcas.JCas;
import org.apache.uima.jcas.JCasRegistry;
@@ -11,13 +11,13 @@ import org.apache.uima.jcas.tcas.Annotat
/**
* Updated by JCasGen Thu Jul 12 10:42:34 CEST 2012
- * XML source: D:/work/workspace-uima6/uimaj-textmarker/src/main/java/org/apache/uima/textmarker/engine/InternalTypeSystem.xml
+ * XML source: D:/work/workspace-uima6/uimaj-ruta/src/main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
* @generated */
-public class TextMarkerFrame extends Annotation {
+public class RutaFrame extends Annotation {
/** @generated
* @ordered
*/
- public final static int typeIndexID = JCasRegistry.register(TextMarkerFrame.class);
+ public final static int typeIndexID = JCasRegistry.register(RutaFrame.class);
/** @generated
* @ordered
*/
@@ -27,23 +27,23 @@ public class TextMarkerFrame extends Ann
/** Never called. Disable default constructor
* @generated */
- protected TextMarkerFrame() {/* intentionally empty block */}
+ protected RutaFrame() {/* intentionally empty block */}
/** Internal - constructor used by generator
* @generated */
- public TextMarkerFrame(int addr, TOP_Type type) {
+ public RutaFrame(int addr, TOP_Type type) {
super(addr, type);
readObject();
}
/** @generated */
- public TextMarkerFrame(JCas jcas) {
+ public RutaFrame(JCas jcas) {
super(jcas);
readObject();
}
/** @generated */
- public TextMarkerFrame(JCas jcas, int begin, int end) {
+ public RutaFrame(JCas jcas, int begin, int end) {
super(jcas);
setBegin(begin);
setEnd(end);
Copied: uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaFrame_Type.java (from r1477049, uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerFrame_Type.java)
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaFrame_Type.java?p2=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaFrame_Type.java&p1=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerFrame_Type.java&r1=1477049&r2=1477088&rev=1477088&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/TextMarkerFrame_Type.java (original)
+++ uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/type/RutaFrame_Type.java Mon Apr 29 14:09:53 2013
@@ -1,6 +1,6 @@
/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
-package org.apache.uima.textmarker.type;
+package org.apache.uima.ruta.type;
import org.apache.uima.cas.FeatureStructure;
import org.apache.uima.cas.Type;
@@ -14,36 +14,36 @@ import org.apache.uima.jcas.tcas.Annotat
/**
* Updated by JCasGen Thu Jul 12 10:42:34 CEST 2012
* @generated */
-public class TextMarkerFrame_Type extends Annotation_Type {
+public class RutaFrame_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 (TextMarkerFrame_Type.this.useExistingInstance) {
+ if (RutaFrame_Type.this.useExistingInstance) {
// Return eq fs instance if already created
- FeatureStructure fs = TextMarkerFrame_Type.this.jcas.getJfsFromCaddr(addr);
+ FeatureStructure fs = RutaFrame_Type.this.jcas.getJfsFromCaddr(addr);
if (null == fs) {
- fs = new TextMarkerFrame(addr, TextMarkerFrame_Type.this);
- TextMarkerFrame_Type.this.jcas.putJfsFromCaddr(addr, fs);
+ fs = new RutaFrame(addr, RutaFrame_Type.this);
+ RutaFrame_Type.this.jcas.putJfsFromCaddr(addr, fs);
return fs;
}
return fs;
- } else return new TextMarkerFrame(addr, TextMarkerFrame_Type.this);
+ } else return new RutaFrame(addr, RutaFrame_Type.this);
}
};
/** @generated */
- public final static int typeIndexID = TextMarkerFrame.typeIndexID;
+ public final static int typeIndexID = RutaFrame.typeIndexID;
/** @generated
@modifiable */
- public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.textmarker.type.TextMarkerFrame");
+ public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.apache.uima.ruta.type.RutaFrame");
/** initialize variables to correspond with Cas Type and Features
* @generated */
- public TextMarkerFrame_Type(JCas jcas, Type casType) {
+ public RutaFrame_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
Copied: uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/RutaVerbalizer.java (from r1477049, uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/TextMarkerVerbalizer.java)
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/RutaVerbalizer.java?p2=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/RutaVerbalizer.java&p1=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/TextMarkerVerbalizer.java&r1=1477049&r2=1477088&rev=1477088&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/TextMarkerVerbalizer.java (original)
+++ uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/verbalize/RutaVerbalizer.java Mon Apr 29 14:09:53 2013
@@ -17,26 +17,26 @@
* under the License.
*/
-package org.apache.uima.textmarker.verbalize;
+package org.apache.uima.ruta.verbalize;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.uima.cas.Type;
-import org.apache.uima.textmarker.TextMarkerBlock;
-import org.apache.uima.textmarker.TextMarkerElement;
-import org.apache.uima.textmarker.action.AbstractTextMarkerAction;
-import org.apache.uima.textmarker.condition.AbstractTextMarkerCondition;
-import org.apache.uima.textmarker.expression.TextMarkerExpression;
-import org.apache.uima.textmarker.extensions.ITextMarkerExtension;
-import org.apache.uima.textmarker.rule.ComposedRuleElement;
-import org.apache.uima.textmarker.rule.RuleElement;
-import org.apache.uima.textmarker.rule.TextMarkerRuleElement;
+import org.apache.uima.ruta.RutaBlock;
+import org.apache.uima.ruta.RutaElement;
+import org.apache.uima.ruta.action.AbstractRutaAction;
+import org.apache.uima.ruta.condition.AbstractRutaCondition;
+import org.apache.uima.ruta.expression.RutaExpression;
+import org.apache.uima.ruta.extensions.IRutaExtension;
+import org.apache.uima.ruta.rule.ComposedRuleElement;
+import org.apache.uima.ruta.rule.RuleElement;
+import org.apache.uima.ruta.rule.RutaRuleElement;
-public class TextMarkerVerbalizer {
+public class RutaVerbalizer {
- private Map<Class<?>, ITextMarkerExtension> externalVerbalizers = new HashMap<Class<?>, ITextMarkerExtension>();
+ private Map<Class<?>, IRutaExtension> externalVerbalizers = new HashMap<Class<?>, IRutaExtension>();
private ActionVerbalizer actionVerbalizer;
@@ -48,7 +48,7 @@ public class TextMarkerVerbalizer {
private VerbalizerUtils verbalizerUtils;
- public TextMarkerVerbalizer() {
+ public RutaVerbalizer() {
super();
actionVerbalizer = new ActionVerbalizer(this);
conditionVerbalizer = new ConditionVerbalizer(this);
@@ -57,39 +57,39 @@ public class TextMarkerVerbalizer {
verbalizerUtils = new VerbalizerUtils(this);
}
- public void addExternalVerbalizers(ITextMarkerExtension verbalizer) {
+ public void addExternalVerbalizers(IRutaExtension verbalizer) {
Class<?>[] extensions = verbalizer.extensions();
for (Class<?> eachClass : extensions) {
externalVerbalizers.put(eachClass, verbalizer);
}
}
- public String verbalize(TextMarkerElement element) {
+ public String verbalize(RutaElement element) {
if (externalVerbalizers.keySet().contains(element.getClass())) {
return externalVerbalizers.get(element.getClass()).verbalize(element, this);
- } else if (element instanceof AbstractTextMarkerAction) {
- return actionVerbalizer.verbalize((AbstractTextMarkerAction) element);
- } else if (element instanceof AbstractTextMarkerCondition) {
- return conditionVerbalizer.verbalize((AbstractTextMarkerCondition) element);
- } else if (element instanceof TextMarkerExpression) {
- return expressionVerbalizer.verbalize((TextMarkerExpression) element);
+ } else if (element instanceof AbstractRutaAction) {
+ return actionVerbalizer.verbalize((AbstractRutaAction) element);
+ } else if (element instanceof AbstractRutaCondition) {
+ return conditionVerbalizer.verbalize((AbstractRutaCondition) element);
+ } else if (element instanceof RutaExpression) {
+ return expressionVerbalizer.verbalize((RutaExpression) element);
} else {
return scriptVerbalizer.verbalize(element);
}
}
- public String verbalizeName(TextMarkerElement element) {
+ public String verbalizeName(RutaElement element) {
if (externalVerbalizers.keySet().contains(element.getClass())) {
return externalVerbalizers.get(element.getClass()).verbalizeName(element);
- } else if (element instanceof AbstractTextMarkerAction) {
- return actionVerbalizer.verbalizeName((AbstractTextMarkerAction) element);
- } else if (element instanceof AbstractTextMarkerCondition) {
- return conditionVerbalizer.verbalizeName((AbstractTextMarkerCondition) element);
+ } else if (element instanceof AbstractRutaAction) {
+ return actionVerbalizer.verbalizeName((AbstractRutaAction) element);
+ } else if (element instanceof AbstractRutaCondition) {
+ return conditionVerbalizer.verbalizeName((AbstractRutaCondition) element);
}
return element.getClass().getSimpleName();
}
- public String verbalize(TextMarkerBlock block, boolean withElements) {
+ public String verbalize(RutaBlock block, boolean withElements) {
return scriptVerbalizer.verbalizeBlock(block, withElements);
}
@@ -113,11 +113,11 @@ public class TextMarkerVerbalizer {
return verbalizerUtils.verbalizeTypeList(list);
}
- public String verbalizeExpressionList(List<? extends TextMarkerExpression> list) {
+ public String verbalizeExpressionList(List<? extends RutaExpression> list) {
return verbalizerUtils.verbalizeExpressionList(list);
}
- public String verbalizeMatcher(TextMarkerRuleElement tmre) {
+ public String verbalizeMatcher(RutaRuleElement tmre) {
return scriptVerbalizer.verbalizeMatcher(tmre);
}
Copied: uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/RutaInferenceVisitor.java (from r1477049, uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/TextMarkerInferenceVisitor.java)
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/RutaInferenceVisitor.java?p2=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/RutaInferenceVisitor.java&p1=uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/TextMarkerInferenceVisitor.java&r1=1477049&r2=1477088&rev=1477088&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/TextMarkerInferenceVisitor.java (original)
+++ uima/sandbox/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/visitor/RutaInferenceVisitor.java Mon Apr 29 14:09:53 2013
@@ -17,25 +17,25 @@
* under the License.
*/
-package org.apache.uima.textmarker.visitor;
+package org.apache.uima.ruta.visitor;
import java.util.List;
import org.apache.uima.cas.text.AnnotationFS;
-import org.apache.uima.textmarker.ScriptApply;
-import org.apache.uima.textmarker.TextMarkerElement;
-import org.apache.uima.textmarker.TextMarkerStream;
-import org.apache.uima.textmarker.rule.AbstractRule;
-import org.apache.uima.textmarker.rule.AbstractRuleMatch;
+import org.apache.uima.ruta.ScriptApply;
+import org.apache.uima.ruta.RutaElement;
+import org.apache.uima.ruta.RutaStream;
+import org.apache.uima.ruta.rule.AbstractRule;
+import org.apache.uima.ruta.rule.AbstractRuleMatch;
-public interface TextMarkerInferenceVisitor {
+public interface RutaInferenceVisitor {
- void beginVisit(TextMarkerElement element, ScriptApply result);
+ void beginVisit(RutaElement element, ScriptApply result);
- void endVisit(TextMarkerElement element, ScriptApply result);
+ void endVisit(RutaElement element, ScriptApply result);
- void finished(TextMarkerStream stream, List<TextMarkerInferenceVisitor> visitors);
+ void finished(RutaStream stream, List<RutaInferenceVisitor> visitors);
void annotationAdded(AnnotationFS annotation, AbstractRuleMatch<? extends AbstractRule> creator);
Copied: uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RutaTestUtils.java (from r1477049, uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/TextMarkerTestUtils.java)
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RutaTestUtils.java?p2=uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RutaTestUtils.java&p1=uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/TextMarkerTestUtils.java&r1=1477049&r2=1477088&rev=1477088&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/TextMarkerTestUtils.java (original)
+++ uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/RutaTestUtils.java Mon Apr 29 14:09:53 2013
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.uima.textmarker;
+package org.apache.uima.ruta;
import java.io.File;
import java.io.IOException;
@@ -41,13 +41,13 @@ import org.apache.uima.resource.Resource
import org.apache.uima.resource.ResourceSpecifier;
import org.apache.uima.resource.metadata.TypeDescription;
import org.apache.uima.resource.metadata.TypeSystemDescription;
-import org.apache.uima.textmarker.engine.TextMarkerEngine;
+import org.apache.uima.ruta.engine.RutaEngine;
import org.apache.uima.util.CasCreationUtils;
import org.apache.uima.util.FileUtils;
import org.apache.uima.util.InvalidXMLException;
import org.apache.uima.util.XMLInputSource;
-public class TextMarkerTestUtils {
+public class RutaTestUtils {
public static class TestFeature {
public String name;
@@ -98,19 +98,19 @@ public class TextMarkerTestUtils {
String resourceDirName, CAS cas) throws URISyntaxException, IOException,
InvalidXMLException, ResourceInitializationException, AnalysisEngineProcessException,
ResourceConfigurationException {
- URL ruleURL = TextMarkerTestUtils.class.getClassLoader().getResource(ruleFileName);
+ URL ruleURL = RutaTestUtils.class.getClassLoader().getResource(ruleFileName);
File ruleFile = new File(ruleURL.toURI());
- URL textURL = TextMarkerTestUtils.class.getClassLoader().getResource(textFileName);
+ URL textURL = RutaTestUtils.class.getClassLoader().getResource(textFileName);
File textFile = new File(textURL.toURI());
File resourceFile = null;
if (resourceDirName != null) {
- URL resourceURL = TextMarkerTestUtils.class.getClassLoader().getResource(resourceDirName);
+ URL resourceURL = RutaTestUtils.class.getClassLoader().getResource(resourceDirName);
resourceFile = new File(resourceURL.toURI());
}
- URL url = TextMarkerEngine.class.getClassLoader().getResource("BasicEngine.xml");
+ URL url = RutaEngine.class.getClassLoader().getResource("BasicEngine.xml");
if (url == null) {
- url = TextMarkerTestUtils.class.getClassLoader().getResource(
- "org/apache/uima/textmarker/TestEngine.xml");
+ url = RutaTestUtils.class.getClassLoader().getResource(
+ "org/apache/uima/ruta/TestEngine.xml");
}
XMLInputSource in = new XMLInputSource(url);
ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);
@@ -142,17 +142,17 @@ public class TextMarkerTestUtils {
aed.getAnalysisEngineMetaData().setTypeSystem(mergeTypeSystems);
AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);
- ae.setConfigParameterValue(TextMarkerEngine.SCRIPT_PATHS, new String[] { ruleFile
+ ae.setConfigParameterValue(RutaEngine.SCRIPT_PATHS, new String[] { ruleFile
.getParentFile().getPath() });
String name = ruleFile.getName();
if (name.endsWith(".tm")) {
name = name.substring(0, name.length() - 3);
}
- ae.setConfigParameterValue(TextMarkerEngine.MAIN_SCRIPT, name);
- ae.setConfigParameterValue(TextMarkerEngine.DYNAMIC_ANCHORING, dynamicAnchoring);
- ae.setConfigParameterValue(TextMarkerEngine.SIMPLE_GREEDY_FOR_COMPOSED, simpleGreedyForComposed);
+ ae.setConfigParameterValue(RutaEngine.MAIN_SCRIPT, name);
+ ae.setConfigParameterValue(RutaEngine.DYNAMIC_ANCHORING, dynamicAnchoring);
+ ae.setConfigParameterValue(RutaEngine.SIMPLE_GREEDY_FOR_COMPOSED, simpleGreedyForComposed);
if (resourceFile != null) {
- ae.setConfigParameterValue(TextMarkerEngine.RESOURCE_PATHS,
+ ae.setConfigParameterValue(RutaEngine.RESOURCE_PATHS,
new String[] { resourceFile.getPath() });
}
Copied: uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/RutaModifierTest.java (from r1477049, uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/TextMarkerModifierTest.java)
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/RutaModifierTest.java?p2=uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/RutaModifierTest.java&p1=uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/TextMarkerModifierTest.java&r1=1477049&r2=1477088&rev=1477088&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/TextMarkerModifierTest.java (original)
+++ uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/RutaModifierTest.java Mon Apr 29 14:09:53 2013
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.uima.textmarker.engine;
+package org.apache.uima.ruta.engine;
import static org.junit.Assert.assertEquals;
@@ -31,12 +31,12 @@ import org.apache.uima.analysis_engine.A
import org.apache.uima.cas.CAS;
import org.apache.uima.resource.ResourceSpecifier;
import org.apache.uima.resource.metadata.TypeSystemDescription;
-import org.apache.uima.textmarker.TextMarkerTestUtils;
+import org.apache.uima.ruta.RutaTestUtils;
import org.apache.uima.util.CasCreationUtils;
import org.apache.uima.util.XMLInputSource;
import org.junit.Test;
-public class TextMarkerModifierTest {
+public class RutaModifierTest {
@Test
public void test() throws Exception {
@@ -44,7 +44,7 @@ public class TextMarkerModifierTest {
URL url = HtmlAnnotator.class.getClassLoader().getResource("Modifier.xml");
if (url == null) {
url = HtmlAnnotator.class.getClassLoader().getResource(
- "org/apache/uima/textmarker/engine/Modifier.xml");
+ "org/apache/uima/ruta/engine/Modifier.xml");
}
XMLInputSource in = new XMLInputSource(url);
ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);
@@ -52,22 +52,22 @@ public class TextMarkerModifierTest {
TypeSystemDescription basicTypeSystem = aed.getAnalysisEngineMetaData().getTypeSystem();
for (int i = 1; i <= 20; i++) {
- basicTypeSystem.addType(TextMarkerTestUtils.TYPE + i, "Type for Testing", "uima.tcas.Annotation");
+ basicTypeSystem.addType(RutaTestUtils.TYPE + i, "Type for Testing", "uima.tcas.Annotation");
}
Collection<TypeSystemDescription> tsds = new ArrayList<TypeSystemDescription>();
tsds.add(basicTypeSystem);
TypeSystemDescription mergeTypeSystems = CasCreationUtils.mergeTypeSystems(tsds);
aed.getAnalysisEngineMetaData().setTypeSystem(mergeTypeSystems);
AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(aed);
- ae.setConfigParameterValue(TextMarkerModifier.OUTPUT_LOCATION, "");
+ ae.setConfigParameterValue(RutaModifier.OUTPUT_LOCATION, "");
String viewName = "modified_for_testing";
- ae.setConfigParameterValue(TextMarkerModifier.OUTPUT_VIEW, viewName);
+ ae.setConfigParameterValue(RutaModifier.OUTPUT_VIEW, viewName);
ae.reconfigure();
String scriptName = this.getClass().getSimpleName();
CAS cas = null;
try {
- cas = TextMarkerTestUtils.process(namespace + "/" + scriptName + ".tm", namespace + "/test.html", 50);
+ cas = RutaTestUtils.process(namespace + "/" + scriptName + ".tm", namespace + "/test.html", 50);
} catch (Exception e) {
e.printStackTrace();
assert (false);
Copied: uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/RutaTest.java (from r1477049, uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/TextMarkerTest.java)
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/RutaTest.java?p2=uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/RutaTest.java&p1=uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/TextMarkerTest.java&r1=1477049&r2=1477088&rev=1477088&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/TextMarkerTest.java (original)
+++ uima/sandbox/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/engine/RutaTest.java Mon Apr 29 14:09:53 2013
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.uima.textmarker.engine;
+package org.apache.uima.ruta.engine;
import static org.junit.Assert.assertEquals;
@@ -31,44 +31,44 @@ import org.apache.uima.cas.text.Annotati
import org.apache.uima.resource.metadata.FsIndexDescription;
import org.apache.uima.resource.metadata.TypePriorities;
import org.apache.uima.resource.metadata.TypeSystemDescription;
-import org.apache.uima.textmarker.TextMarkerTestUtils;
+import org.apache.uima.ruta.RutaTestUtils;
import org.apache.uima.util.CasCreationUtils;
import org.apache.uima.util.XMLInputSource;
import org.junit.Test;
-public class TextMarkerTest {
+public class RutaTest {
@Test
public void test() throws Exception {
- URL typePrioritiesUrl = TextMarkerTestUtils.class.getResource("TypePriorities.xml");
- URL tsUrl = TextMarkerTestUtils.class.getResource("BasicTypeSystem.xml");
+ URL typePrioritiesUrl = RutaTestUtils.class.getResource("TypePriorities.xml");
+ URL tsUrl = RutaTestUtils.class.getResource("BasicTypeSystem.xml");
Object descriptor = UIMAFramework.getXMLParser().parse(new XMLInputSource(tsUrl));
TypeSystemDescription tsDesc = (TypeSystemDescription) descriptor;
- tsDesc.addType("uima.textmarker.T1", "", "uima.tcas.Annotation");
- tsDesc.addType("uima.textmarker.T2", "", "uima.tcas.Annotation");
- tsDesc.addType("uima.textmarker.T3", "", "uima.tcas.Annotation");
+ tsDesc.addType("uima.ruta.T1", "", "uima.tcas.Annotation");
+ tsDesc.addType("uima.ruta.T2", "", "uima.tcas.Annotation");
+ tsDesc.addType("uima.ruta.T3", "", "uima.tcas.Annotation");
tsDesc.resolveImports();
TypePriorities typePriorities = UIMAFramework.getXMLParser().parseTypePriorities(new XMLInputSource(typePrioritiesUrl));
CAS cas = CasCreationUtils.createCas(tsDesc, typePriorities, new FsIndexDescription[0]);
cas.setDocumentText("Some document.");
- TextMarker.apply(cas, "CW{-> MARK(T1)} SW;");
+ Ruta.apply(cas, "CW{-> MARK(T1)} SW;");
AnnotationIndex<AnnotationFS> ai = null;
FSIterator<AnnotationFS> iterator = null;
- ai = cas.getAnnotationIndex(cas.getTypeSystem().getType("uima.textmarker.T1"));
+ ai = cas.getAnnotationIndex(cas.getTypeSystem().getType("uima.ruta.T1"));
iterator = ai.iterator();
assertEquals(1, ai.size());
assertEquals("Some", iterator.next().getCoveredText());
- TextMarker.apply(cas, "T1 SW{-> MARK(T2)};");
- ai = cas.getAnnotationIndex(cas.getTypeSystem().getType("uima.textmarker.T2"));
+ Ruta.apply(cas, "T1 SW{-> MARK(T2)};");
+ ai = cas.getAnnotationIndex(cas.getTypeSystem().getType("uima.ruta.T2"));
iterator = ai.iterator();
assertEquals(1, ai.size());
assertEquals("document", iterator.next().getCoveredText());
- TextMarker.apply(cas, "T1{-> MARK(T3,1,2,3)} T2 PERIOD;");
- ai = cas.getAnnotationIndex(cas.getTypeSystem().getType("uima.textmarker.T3"));
+ Ruta.apply(cas, "T1{-> MARK(T3,1,2,3)} T2 PERIOD;");
+ ai = cas.getAnnotationIndex(cas.getTypeSystem().getType("uima.ruta.T3"));
iterator = ai.iterator();
assertEquals(1, ai.size());
assertEquals("Some document.", iterator.next().getCoveredText());