Author: tommaso
Date: Sun Aug 21 12:47:50 2011
New Revision: 1159976

URL: http://svn.apache.org/viewvc?rev=1159976&view=rev
Log:
[CLEREZZA-625] - a Clerezza-UIMA TypeSystem to use in semantic web applications 
using UIMA for text mining

Added:
    
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/
    
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseAnnotation.java
    
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseAnnotation_Type.java
    
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseEntity.java
    
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseEntity_Type.java
    
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/annotator/
    
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/annotator/DummyWikipediaEntityAnnotator.java
    
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ClerezzaTypeSystemTest.java
    
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/
    
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntity.java
    
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntityAnnotation.java
    
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntityAnnotation_Type.java
    
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntity_Type.java
    
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/resources/ClerezzaTestTypeSystemDescriptor.xml
    
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/resources/SampleWikipediaAEDescriptor.xml

Added: 
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseAnnotation.java
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseAnnotation.java?rev=1159976&view=auto
==============================================================================
--- 
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseAnnotation.java
 (added)
+++ 
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseAnnotation.java
 Sun Aug 21 12:47:50 2011
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* First created by JCasGen Wed Jul 06 14:49:10 CEST 2011 */
+package org.apache.clerezza.uima.utils.ts;
+
+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 Sun Aug 21 14:41:29 CEST 2011
+ * XML source: 
/Users/tommasoteofili/Documents/workspaces/clerezza_workspace/trunk/parent/uima/uima.utils/src/main/resources/META-INF/ClerezzaUIMATypeSystemDescriptor.xml
+ * @generated */
+public class ClerezzaBaseAnnotation extends Annotation {
+  /**
+   * @generated
+   * @ordered
+   */
+  public final static int typeIndexID = 
JCasRegistry.register(ClerezzaBaseAnnotation.class);
+
+  /**
+   * @generated
+   * @ordered
+   */
+  public final static int type = typeIndexID;
+
+  /** @generated */
+  public int getTypeIndexID() {return typeIndexID;}
+ 
+  /**
+   * Never called. Disable default constructor
+   * 
+   * @generated
+   */
+  protected ClerezzaBaseAnnotation() {}
+    
+  /**
+   * Internal - constructor used by generator
+   * 
+   * @generated
+   */
+  public ClerezzaBaseAnnotation(int addr, TOP_Type type) {
+    super(addr, type);
+    readObject();
+  }
+  
+  /** @generated */
+  public ClerezzaBaseAnnotation(JCas jcas) {
+    super(jcas);
+    readObject();   
+  } 
+
+  /** @generated */
+  public ClerezzaBaseAnnotation(JCas jcas, int begin, int end) {
+    super(jcas);
+    setBegin(begin);
+    setEnd(end);
+    readObject();
+  }   
+
+  /** <!-- begin-user-doc --> Write your own initialization here <!-- 
end-user-doc -->
+  @generated modifiable */
+  private void readObject() {
+  }
+
+  // *--------------*
+  // * Feature: uri
+
+  /**
+   * getter for uri - gets
+   * 
+   * @generated
+   */
+  public String getUri() {
+    if (ClerezzaBaseAnnotation_Type.featOkTst && 
((ClerezzaBaseAnnotation_Type)jcasType).casFeat_uri == null)
+      jcasType.jcas.throwFeatMissing("uri", 
"org.apache.clerezza.uima.utils.ts.ClerezzaBaseAnnotation");
+    return jcasType.ll_cas.ll_getStringValue(addr, 
((ClerezzaBaseAnnotation_Type)jcasType).casFeatCode_uri);}
+    
+  /**
+   * setter for uri - sets
+   * 
+   * @generated
+   */
+  public void setUri(String v) {
+    if (ClerezzaBaseAnnotation_Type.featOkTst && 
((ClerezzaBaseAnnotation_Type)jcasType).casFeat_uri == null)
+      jcasType.jcas.throwFeatMissing("uri", 
"org.apache.clerezza.uima.utils.ts.ClerezzaBaseAnnotation");
+    jcasType.ll_cas.ll_setStringValue(addr, 
((ClerezzaBaseAnnotation_Type)jcasType).casFeatCode_uri, v);}    
+  }

Added: 
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseAnnotation_Type.java
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseAnnotation_Type.java?rev=1159976&view=auto
==============================================================================
--- 
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseAnnotation_Type.java
 (added)
+++ 
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseAnnotation_Type.java
 Sun Aug 21 12:47:50 2011
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* First created by JCasGen Wed Jul 06 14:49:10 CEST 2011 */
+package org.apache.clerezza.uima.utils.ts;
+
+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 Sun Aug 21 14:41:29 CEST 2011
+ * @generated */
+public class ClerezzaBaseAnnotation_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 
(ClerezzaBaseAnnotation_Type.this.useExistingInstance) {
+                          // Return eq fs instance if already created
+                    FeatureStructure fs = 
ClerezzaBaseAnnotation_Type.this.jcas.getJfsFromCaddr(addr);
+                    if (null == fs) {
+                      fs = new ClerezzaBaseAnnotation(addr, 
ClerezzaBaseAnnotation_Type.this);
+                          
ClerezzaBaseAnnotation_Type.this.jcas.putJfsFromCaddr(addr, fs);
+                          return fs;
+                    }
+                    return fs;
+        } else return new ClerezzaBaseAnnotation(addr, 
ClerezzaBaseAnnotation_Type.this);
+         }
+    };
+
+  /** @generated */
+  public final static int typeIndexID = ClerezzaBaseAnnotation.typeIndexID;
+
+  /**
+   * @generated
+   * @modifiable
+   */
+  public final static boolean featOkTst = 
JCasRegistry.getFeatOkTst("org.apache.clerezza.uima.utils.ts.ClerezzaBaseAnnotation");
+
+  /** @generated */
+  final Feature casFeat_uri;
+
+  /** @generated */
+  final int casFeatCode_uri;
+
+  /** @generated */
+  public String getUri(int addr) {
+        if (featOkTst && casFeat_uri == null)
+      jcas.throwFeatMissing("uri", 
"org.apache.clerezza.uima.utils.ts.ClerezzaBaseAnnotation");
+    return ll_cas.ll_getStringValue(addr, casFeatCode_uri);
+  }
+  /** @generated */
+  public void setUri(int addr, String v) {
+        if (featOkTst && casFeat_uri == null)
+      jcas.throwFeatMissing("uri", 
"org.apache.clerezza.uima.utils.ts.ClerezzaBaseAnnotation");
+    ll_cas.ll_setStringValue(addr, casFeatCode_uri, v);}
+    
+  
+
+
+
+  /**
+   * initialize variables to correspond with Cas Type and Features
+   * 
+   * @generated
+   */
+  public ClerezzaBaseAnnotation_Type(JCas jcas, Type casType) {
+    super(jcas, casType);
+    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, 
getFSGenerator());
+
+ 
+    casFeat_uri = jcas.getRequiredFeatureDE(casType, "uri", "uima.cas.String", 
featOkTst);
+    casFeatCode_uri  = (null == casFeat_uri) ? JCas.INVALID_FEATURE_CODE : 
((FeatureImpl)casFeat_uri).getCode();
+
+  }
+}

Added: 
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseEntity.java
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseEntity.java?rev=1159976&view=auto
==============================================================================
--- 
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseEntity.java
 (added)
+++ 
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseEntity.java
 Sun Aug 21 12:47:50 2011
@@ -0,0 +1,141 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* First created by JCasGen Wed Jul 06 14:49:10 CEST 2011 */
+package org.apache.clerezza.uima.utils.ts;
+
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
+import org.apache.uima.jcas.cas.FSList;
+import org.apache.uima.jcas.cas.TOP;
+import org.apache.uima.jcas.cas.TOP_Type;
+
+/** 
+ * Updated by JCasGen Sun Aug 21 14:41:29 CEST 2011
+ * XML source: 
/Users/tommasoteofili/Documents/workspaces/clerezza_workspace/trunk/parent/uima/uima.utils/src/main/resources/META-INF/ClerezzaUIMATypeSystemDescriptor.xml
+ * @generated */
+public class ClerezzaBaseEntity extends TOP {
+  /**
+   * @generated
+   * @ordered
+   */
+  public final static int typeIndexID = 
JCasRegistry.register(ClerezzaBaseEntity.class);
+
+  /**
+   * @generated
+   * @ordered
+   */
+  public final static int type = typeIndexID;
+
+  /** @generated */
+  public int getTypeIndexID() {return typeIndexID;}
+ 
+  /**
+   * Never called. Disable default constructor
+   * 
+   * @generated
+   */
+  protected ClerezzaBaseEntity() {}
+    
+  /**
+   * Internal - constructor used by generator
+   * 
+   * @generated
+   */
+  public ClerezzaBaseEntity(int addr, TOP_Type type) {
+    super(addr, type);
+    readObject();
+  }
+  
+  /** @generated */
+  public ClerezzaBaseEntity(JCas jcas) {
+    super(jcas);
+    readObject();   
+  } 
+
+  /** <!-- begin-user-doc --> Write your own initialization here <!-- 
end-user-doc -->
+  @generated modifiable */
+  private void readObject() {
+  }
+
+  // *--------------*
+  // * Feature: uri
+
+  /**
+   * getter for uri - gets
+   * 
+   * @generated
+   */
+  public String getUri() {
+    if (ClerezzaBaseEntity_Type.featOkTst && 
((ClerezzaBaseEntity_Type)jcasType).casFeat_uri == null)
+      jcasType.jcas.throwFeatMissing("uri", 
"org.apache.clerezza.uima.utils.ts.ClerezzaBaseEntity");
+    return jcasType.ll_cas.ll_getStringValue(addr, 
((ClerezzaBaseEntity_Type)jcasType).casFeatCode_uri);}
+    
+  /**
+   * setter for uri - sets
+   * 
+   * @generated
+   */
+  public void setUri(String v) {
+    if (ClerezzaBaseEntity_Type.featOkTst && 
((ClerezzaBaseEntity_Type)jcasType).casFeat_uri == null)
+      jcasType.jcas.throwFeatMissing("uri", 
"org.apache.clerezza.uima.utils.ts.ClerezzaBaseEntity");
+    jcasType.ll_cas.ll_setStringValue(addr, 
((ClerezzaBaseEntity_Type)jcasType).casFeatCode_uri, v);}    
+   
+    
+  // *--------------*
+  // * Feature: references
+
+  /**
+   * getter for references - gets
+   * 
+   * @generated
+   */
+  public FSList getReferences() {
+    if (ClerezzaBaseEntity_Type.featOkTst && 
((ClerezzaBaseEntity_Type)jcasType).casFeat_references == null)
+      jcasType.jcas.throwFeatMissing("references", 
"org.apache.clerezza.uima.utils.ts.ClerezzaBaseEntity");
+    return 
(FSList)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, 
((ClerezzaBaseEntity_Type)jcasType).casFeatCode_references)));}
+    
+  /**
+   * setter for references - sets
+   * 
+   * @generated
+   */
+  public void setReferences(FSList v) {
+    if (ClerezzaBaseEntity_Type.featOkTst && 
((ClerezzaBaseEntity_Type)jcasType).casFeat_references == null)
+      jcasType.jcas.throwFeatMissing("references", 
"org.apache.clerezza.uima.utils.ts.ClerezzaBaseEntity");
+    jcasType.ll_cas.ll_setRefValue(addr, 
((ClerezzaBaseEntity_Type)jcasType).casFeatCode_references, 
jcasType.ll_cas.ll_getFSRef(v));}    
+   
+    
+  //*--------------*
+  //* Feature: label
+
+  /** getter for label - gets 
+   * @generated */
+  public String getLabel() {
+    if (ClerezzaBaseEntity_Type.featOkTst && 
((ClerezzaBaseEntity_Type)jcasType).casFeat_label == null)
+      jcasType.jcas.throwFeatMissing("label", 
"org.apache.clerezza.uima.utils.ts.ClerezzaBaseEntity");
+    return jcasType.ll_cas.ll_getStringValue(addr, 
((ClerezzaBaseEntity_Type)jcasType).casFeatCode_label);}
+    
+  /** setter for label - sets  
+   * @generated */
+  public void setLabel(String v) {
+    if (ClerezzaBaseEntity_Type.featOkTst && 
((ClerezzaBaseEntity_Type)jcasType).casFeat_label == null)
+      jcasType.jcas.throwFeatMissing("label", 
"org.apache.clerezza.uima.utils.ts.ClerezzaBaseEntity");
+    jcasType.ll_cas.ll_setStringValue(addr, ((ClerezzaBaseEntity_Type) 
jcasType).casFeatCode_label, v);}
+  }

Added: 
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseEntity_Type.java
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseEntity_Type.java?rev=1159976&view=auto
==============================================================================
--- 
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseEntity_Type.java
 (added)
+++ 
incubator/clerezza/trunk/parent/uima/uima.utils/src/main/java/org/apache/clerezza/uima/utils/ts/ClerezzaBaseEntity_Type.java
 Sun Aug 21 12:47:50 2011
@@ -0,0 +1,148 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* First created by JCasGen Wed Jul 06 14:49:10 CEST 2011 */
+package org.apache.clerezza.uima.utils.ts;
+
+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.cas.TOP_Type;
+
+/** 
+ * Updated by JCasGen Sun Aug 21 14:41:29 CEST 2011
+ * @generated */
+public class ClerezzaBaseEntity_Type extends TOP_Type {
+  /** @generated */
+  protected FSGenerator getFSGenerator() {return fsGenerator;}
+  /** @generated */
+  private final FSGenerator fsGenerator = 
+    new FSGenerator() {
+      public FeatureStructure createFS(int addr, CASImpl cas) {
+                        if (ClerezzaBaseEntity_Type.this.useExistingInstance) {
+                          // Return eq fs instance if already created
+                    FeatureStructure fs = 
ClerezzaBaseEntity_Type.this.jcas.getJfsFromCaddr(addr);
+                    if (null == fs) {
+                      fs = new ClerezzaBaseEntity(addr, 
ClerezzaBaseEntity_Type.this);
+                          
ClerezzaBaseEntity_Type.this.jcas.putJfsFromCaddr(addr, fs);
+                          return fs;
+                    }
+                    return fs;
+        } else return new ClerezzaBaseEntity(addr, 
ClerezzaBaseEntity_Type.this);
+         }
+    };
+
+  /** @generated */
+  public final static int typeIndexID = ClerezzaBaseEntity.typeIndexID;
+
+  /**
+   * @generated
+   * @modifiable
+   */
+  public final static boolean featOkTst = 
JCasRegistry.getFeatOkTst("org.apache.clerezza.uima.utils.ts.ClerezzaBaseEntity");
+
+  /** @generated */
+  final Feature casFeat_uri;
+
+  /** @generated */
+  final int casFeatCode_uri;
+
+  /** @generated */
+  public String getUri(int addr) {
+        if (featOkTst && casFeat_uri == null)
+      jcas.throwFeatMissing("uri", 
"org.apache.clerezza.uima.utils.ts.ClerezzaBaseEntity");
+    return ll_cas.ll_getStringValue(addr, casFeatCode_uri);
+  }
+  /** @generated */
+  public void setUri(int addr, String v) {
+        if (featOkTst && casFeat_uri == null)
+      jcas.throwFeatMissing("uri", 
"org.apache.clerezza.uima.utils.ts.ClerezzaBaseEntity");
+    ll_cas.ll_setStringValue(addr, casFeatCode_uri, v);}
+    
+  
+ 
+  /** @generated */
+  final Feature casFeat_references;
+
+  /** @generated */
+  final int casFeatCode_references;
+
+  /** @generated */
+  public int getReferences(int addr) {
+        if (featOkTst && casFeat_references == null)
+      jcas.throwFeatMissing("references", 
"org.apache.clerezza.uima.utils.ts.ClerezzaBaseEntity");
+    return ll_cas.ll_getRefValue(addr, casFeatCode_references);
+  }
+  /** @generated */
+  public void setReferences(int addr, int v) {
+        if (featOkTst && casFeat_references == null)
+      jcas.throwFeatMissing("references", 
"org.apache.clerezza.uima.utils.ts.ClerezzaBaseEntity");
+    ll_cas.ll_setRefValue(addr, casFeatCode_references, v);}
+    
+  
+ 
+  /** @generated */
+  final Feature casFeat_label;
+  /** @generated */
+  final int     casFeatCode_label;
+  /** @generated */ 
+  public String getLabel(int addr) {
+        if (featOkTst && casFeat_label == null)
+      jcas.throwFeatMissing("label", 
"org.apache.clerezza.uima.utils.ts.ClerezzaBaseEntity");
+    return ll_cas.ll_getStringValue(addr, casFeatCode_label);
+  }
+  /** @generated */    
+  public void setLabel(int addr, String v) {
+        if (featOkTst && casFeat_label == null)
+      jcas.throwFeatMissing("label", 
"org.apache.clerezza.uima.utils.ts.ClerezzaBaseEntity");
+    ll_cas.ll_setStringValue(addr, casFeatCode_label, v);}
+    
+  
+
+
+
+  /**
+   * initialize variables to correspond with Cas Type and Features
+   * 
+   * @generated
+   */
+  public ClerezzaBaseEntity_Type(JCas jcas, Type casType) {
+    super(jcas, casType);
+    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, 
getFSGenerator());
+
+ 
+    casFeat_uri = jcas.getRequiredFeatureDE(casType, "uri", "uima.cas.String", 
featOkTst);
+    casFeatCode_uri  = (null == casFeat_uri) ? JCas.INVALID_FEATURE_CODE : 
((FeatureImpl)casFeat_uri).getCode();
+
+ 
+    casFeat_references = jcas.getRequiredFeatureDE(casType, "references", 
"uima.cas.FSList", featOkTst);
+    casFeatCode_references  = (null == casFeat_references) ? 
JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_references).getCode();
+
+ 
+    casFeat_label = jcas.getRequiredFeatureDE(casType, "label", 
"uima.cas.String", featOkTst);
+    casFeatCode_label  = (null == casFeat_label) ? JCas.INVALID_FEATURE_CODE : 
((FeatureImpl)casFeat_label).getCode();
+
+  }
+}

Added: 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/annotator/DummyWikipediaEntityAnnotator.java
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/annotator/DummyWikipediaEntityAnnotator.java?rev=1159976&view=auto
==============================================================================
--- 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/annotator/DummyWikipediaEntityAnnotator.java
 (added)
+++ 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/annotator/DummyWikipediaEntityAnnotator.java
 Sun Aug 21 12:47:50 2011
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.clerezza.uima.annotator;
+
+import org.apache.clerezza.uima.utils.ts.WikipediaEntity;
+import org.apache.clerezza.uima.utils.ts.WikipediaEntityAnnotation;
+import org.apache.uima.analysis_component.JCasAnnotator_ImplBase;
+import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.cas.FSList;
+import org.apache.uima.jcas.cas.NonEmptyFSList;
+
+public class DummyWikipediaEntityAnnotator extends JCasAnnotator_ImplBase {
+
+  @Override
+  public void process(JCas jcas) throws AnalysisEngineProcessException {
+    WikipediaEntity wikipediaEntity = new WikipediaEntity(jcas);
+    wikipediaEntity.setUri("http://en.wikipedia.org/wiki/STS-135";);
+    wikipediaEntity.setName("STS-135");
+    FSList stsAnnotationsList = findSTSAnnotations(jcas);
+    wikipediaEntity.setReferences(stsAnnotationsList);
+    wikipediaEntity.addToIndexes();
+
+  }
+
+  private FSList findSTSAnnotations(JCas jcas) {
+    NonEmptyFSList annotations = new NonEmptyFSList(jcas);
+    WikipediaEntityAnnotation annotation = new WikipediaEntityAnnotation(jcas);
+    annotation.setBegin(0);
+    annotation.setEnd(1);
+    annotation.setUri("http://somesite.org/#STS135cit1";);
+    annotation.addToIndexes();
+    annotations.setHead(annotation);
+    return annotations;
+  }
+
+}

Added: 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ClerezzaTypeSystemTest.java
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ClerezzaTypeSystemTest.java?rev=1159976&view=auto
==============================================================================
--- 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ClerezzaTypeSystemTest.java
 (added)
+++ 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ClerezzaTypeSystemTest.java
 Sun Aug 21 12:47:50 2011
@@ -0,0 +1,59 @@
+package org.apache.clerezza.uima.utils;
+
+import org.apache.clerezza.uima.utils.ts.WikipediaEntityAnnotation;
+import org.apache.uima.UIMAFramework;
+import org.apache.uima.cas.CAS;
+import org.apache.uima.cas.FSIterator;
+import org.apache.uima.cas.FeatureStructure;
+import org.apache.uima.cas.Type;
+import org.apache.uima.cas.text.AnnotationIndex;
+import org.apache.uima.jcas.cas.FSList;
+import org.apache.uima.jcas.tcas.Annotation;
+import org.apache.uima.resource.metadata.TypeSystemDescription;
+import org.apache.uima.test.junit_extension.AnnotatorTester;
+import org.apache.uima.util.XMLInputSource;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class ClerezzaTypeSystemTest {
+
+  @Test
+  public void parsingTest() {
+    try {
+      TypeSystemDescription tsd = 
UIMAFramework.getXMLParser().parseTypeSystemDescription(
+              new 
XMLInputSource(getClass().getResource("/ClerezzaTestTypeSystemDescriptor.xml")));
+      assertNotNull(tsd);
+      
assertNotNull(tsd.getType("org.apache.clerezza.uima.utils.ts.WikipediaEntity"));
+      
assertNotNull(tsd.getType("org.apache.clerezza.uima.utils.ts.WikipediaEntityAnnotation"));
+    } catch (Exception e) {
+      fail(e.getLocalizedMessage());
+    }
+  }
+
+  @Test
+  public void dummyTypeSystemWithAnnotatorTest() {
+    try {
+      CAS cas = 
AnnotatorTester.performTest("src/test/resources/SampleWikipediaAEDescriptor.xml",
+              "this is useless", null);
+      assertNotNull(cas);
+      /* check annotations */
+      AnnotationIndex<Annotation> annotationIndex = 
cas.getJCas().getAnnotationIndex(
+              WikipediaEntityAnnotation.type);
+      assertNotNull(annotationIndex);
+      assertTrue(annotationIndex.size() == 1);
+      /* check entities */
+      Type type = 
cas.getTypeSystem().getType("org.apache.clerezza.uima.utils.ts.WikipediaEntity");
+      FSIterator<FeatureStructure> entities = 
cas.getJCas().getIndexRepository()
+              .getAllIndexedFS(type);
+      assertTrue(entities.hasNext());
+      while (entities.hasNext()) {
+        FSList references = (FSList) entities.next().getFeatureValue(
+                type.getFeatureByBaseName("references"));
+        assertNotNull(references.getNthElement(0));
+      }
+    } catch (Exception e) {
+      fail(e.getLocalizedMessage());
+    }
+  }
+}

Added: 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntity.java
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntity.java?rev=1159976&view=auto
==============================================================================
--- 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntity.java
 (added)
+++ 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntity.java
 Sun Aug 21 12:47:50 2011
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* First created by JCasGen Thu Jul 21 16:48:14 CEST 2011 */
+package org.apache.clerezza.uima.utils.ts;
+
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
+import org.apache.uima.jcas.cas.TOP_Type;
+
+
+
+/** an Entity from Wikipedia
+ * Updated by JCasGen Thu Jul 21 16:48:14 CEST 2011
+ * XML source: 
/Users/tommasoteofili/Documents/workspaces/clerezza_workspace/trunk/parent/uima/uima.utils/src/test/resources/ClerezzaTestTypeSystemDescriptor.xml
+ * @generated */
+public class WikipediaEntity extends ClerezzaBaseEntity {
+  /** @generated
+   * @ordered 
+   */
+  public final static int typeIndexID = 
JCasRegistry.register(WikipediaEntity.class);
+  /** @generated
+   * @ordered 
+   */
+  public final static int type = typeIndexID;
+  /** @generated  */
+  public              int getTypeIndexID() {return typeIndexID;}
+ 
+  /** Never called.  Disable default constructor
+   * @generated */
+  protected WikipediaEntity() {}
+    
+  /** Internal - constructor used by generator 
+   * @generated */
+  public WikipediaEntity(int addr, TOP_Type type) {
+    super(addr, type);
+    readObject();
+  }
+  
+  /** @generated */
+  public WikipediaEntity(JCas jcas) {
+    super(jcas);
+    readObject();   
+  } 
+
+  /** <!-- begin-user-doc -->
+    * Write your own initialization here
+    * <!-- end-user-doc -->
+  @generated modifiable */
+  private void readObject() {}
+     
+ 
+    
+  //*--------------*
+  //* Feature: name
+
+  /** getter for name - gets 
+   * @generated */
+  public String getName() {
+    if (WikipediaEntity_Type.featOkTst && 
((WikipediaEntity_Type)jcasType).casFeat_name == null)
+      jcasType.jcas.throwFeatMissing("name", 
"org.apache.clerezza.uima.utils.ts.WikipediaEntity");
+    return jcasType.ll_cas.ll_getStringValue(addr, 
((WikipediaEntity_Type)jcasType).casFeatCode_name);}
+    
+  /** setter for name - sets  
+   * @generated */
+  public void setName(String v) {
+    if (WikipediaEntity_Type.featOkTst && 
((WikipediaEntity_Type)jcasType).casFeat_name == null)
+      jcasType.jcas.throwFeatMissing("name", 
"org.apache.clerezza.uima.utils.ts.WikipediaEntity");
+    jcasType.ll_cas.ll_setStringValue(addr, 
((WikipediaEntity_Type)jcasType).casFeatCode_name, v);}    
+   
+    
+  //*--------------*
+  //* Feature: category
+
+  /** getter for category - gets 
+   * @generated */
+  public String getCategory() {
+    if (WikipediaEntity_Type.featOkTst && 
((WikipediaEntity_Type)jcasType).casFeat_category == null)
+      jcasType.jcas.throwFeatMissing("category", 
"org.apache.clerezza.uima.utils.ts.WikipediaEntity");
+    return jcasType.ll_cas.ll_getStringValue(addr, 
((WikipediaEntity_Type)jcasType).casFeatCode_category);}
+    
+  /** setter for category - sets  
+   * @generated */
+  public void setCategory(String v) {
+    if (WikipediaEntity_Type.featOkTst && 
((WikipediaEntity_Type)jcasType).casFeat_category == null)
+      jcasType.jcas.throwFeatMissing("category", 
"org.apache.clerezza.uima.utils.ts.WikipediaEntity");
+    jcasType.ll_cas.ll_setStringValue(addr, 
((WikipediaEntity_Type)jcasType).casFeatCode_category, v);}    
+  }
+
+    
\ No newline at end of file

Added: 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntityAnnotation.java
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntityAnnotation.java?rev=1159976&view=auto
==============================================================================
--- 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntityAnnotation.java
 (added)
+++ 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntityAnnotation.java
 Sun Aug 21 12:47:50 2011
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* First created by JCasGen Thu Jul 21 16:48:14 CEST 2011 */
+package org.apache.clerezza.uima.utils.ts;
+
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.JCasRegistry;
+import org.apache.uima.jcas.cas.TOP_Type;
+
+
+
+/** 
+ * Updated by JCasGen Thu Jul 21 16:48:14 CEST 2011
+ * XML source: 
/Users/tommasoteofili/Documents/workspaces/clerezza_workspace/trunk/parent/uima/uima.utils/src/test/resources/ClerezzaTestTypeSystemDescriptor.xml
+ * @generated */
+public class WikipediaEntityAnnotation extends ClerezzaBaseAnnotation {
+  /** @generated
+   * @ordered 
+   */
+  public final static int typeIndexID = 
JCasRegistry.register(WikipediaEntityAnnotation.class);
+  /** @generated
+   * @ordered 
+   */
+  public final static int type = typeIndexID;
+  /** @generated  */
+  public              int getTypeIndexID() {return typeIndexID;}
+ 
+  /** Never called.  Disable default constructor
+   * @generated */
+  protected WikipediaEntityAnnotation() {}
+    
+  /** Internal - constructor used by generator 
+   * @generated */
+  public WikipediaEntityAnnotation(int addr, TOP_Type type) {
+    super(addr, type);
+    readObject();
+  }
+  
+  /** @generated */
+  public WikipediaEntityAnnotation(JCas jcas) {
+    super(jcas);
+    readObject();   
+  } 
+
+  /** @generated */  
+  public WikipediaEntityAnnotation(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

Added: 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntityAnnotation_Type.java
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntityAnnotation_Type.java?rev=1159976&view=auto
==============================================================================
--- 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntityAnnotation_Type.java
 (added)
+++ 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntityAnnotation_Type.java
 Sun Aug 21 12:47:50 2011
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* First created by JCasGen Thu Jul 21 16:48:14 CEST 2011 */
+package org.apache.clerezza.uima.utils.ts;
+
+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;
+
+/** 
+ * Updated by JCasGen Thu Jul 21 16:48:14 CEST 2011
+ * @generated */
+public class WikipediaEntityAnnotation_Type extends 
ClerezzaBaseAnnotation_Type {
+  /** @generated */
+  protected FSGenerator getFSGenerator() {return fsGenerator;}
+  /** @generated */
+  private final FSGenerator fsGenerator = 
+    new FSGenerator() {
+      public FeatureStructure createFS(int addr, CASImpl cas) {
+                        if 
(WikipediaEntityAnnotation_Type.this.useExistingInstance) {
+                          // Return eq fs instance if already created
+                    FeatureStructure fs = 
WikipediaEntityAnnotation_Type.this.jcas.getJfsFromCaddr(addr);
+                    if (null == fs) {
+                      fs = new WikipediaEntityAnnotation(addr, 
WikipediaEntityAnnotation_Type.this);
+                          
WikipediaEntityAnnotation_Type.this.jcas.putJfsFromCaddr(addr, fs);
+                          return fs;
+                    }
+                    return fs;
+        } else return new WikipediaEntityAnnotation(addr, 
WikipediaEntityAnnotation_Type.this);
+         }
+    };
+  /** @generated */
+  public final static int typeIndexID = WikipediaEntityAnnotation.typeIndexID;
+  /** @generated 
+     @modifiable */
+  public final static boolean featOkTst = 
JCasRegistry.getFeatOkTst("org.apache.clerezza.uima.utils.ts.WikipediaEntityAnnotation");
+
+
+
+  /** initialize variables to correspond with Cas Type and Features
+       * @generated */
+  public WikipediaEntityAnnotation_Type(JCas jcas, Type casType) {
+    super(jcas, casType);
+    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, 
getFSGenerator());
+
+  }
+}
+
+
+
+    
\ No newline at end of file

Added: 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntity_Type.java
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntity_Type.java?rev=1159976&view=auto
==============================================================================
--- 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntity_Type.java
 (added)
+++ 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/java/org/apache/clerezza/uima/utils/ts/WikipediaEntity_Type.java
 Sun Aug 21 12:47:50 2011
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/* First created by JCasGen Thu Jul 21 16:48:14 CEST 2011 */
+package org.apache.clerezza.uima.utils.ts;
+
+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;
+
+/** an Entity from Wikipedia
+ * Updated by JCasGen Thu Jul 21 16:48:14 CEST 2011
+ * @generated */
+public class WikipediaEntity_Type extends ClerezzaBaseEntity_Type {
+  /** @generated */
+  protected FSGenerator getFSGenerator() {return fsGenerator;}
+  /** @generated */
+  private final FSGenerator fsGenerator = 
+    new FSGenerator() {
+      public FeatureStructure createFS(int addr, CASImpl cas) {
+                        if (WikipediaEntity_Type.this.useExistingInstance) {
+                          // Return eq fs instance if already created
+                    FeatureStructure fs = 
WikipediaEntity_Type.this.jcas.getJfsFromCaddr(addr);
+                    if (null == fs) {
+                      fs = new WikipediaEntity(addr, 
WikipediaEntity_Type.this);
+                          WikipediaEntity_Type.this.jcas.putJfsFromCaddr(addr, 
fs);
+                          return fs;
+                    }
+                    return fs;
+        } else return new WikipediaEntity(addr, WikipediaEntity_Type.this);
+         }
+    };
+  /** @generated */
+  public final static int typeIndexID = WikipediaEntity.typeIndexID;
+  /** @generated 
+     @modifiable */
+  public final static boolean featOkTst = 
JCasRegistry.getFeatOkTst("org.apache.clerezza.uima.utils.ts.WikipediaEntity");
+ 
+  /** @generated */
+  final Feature casFeat_name;
+  /** @generated */
+  final int     casFeatCode_name;
+  /** @generated */ 
+  public String getName(int addr) {
+        if (featOkTst && casFeat_name == null)
+      jcas.throwFeatMissing("name", 
"org.apache.clerezza.uima.utils.ts.WikipediaEntity");
+    return ll_cas.ll_getStringValue(addr, casFeatCode_name);
+  }
+  /** @generated */    
+  public void setName(int addr, String v) {
+        if (featOkTst && casFeat_name == null)
+      jcas.throwFeatMissing("name", 
"org.apache.clerezza.uima.utils.ts.WikipediaEntity");
+    ll_cas.ll_setStringValue(addr, casFeatCode_name, v);}
+    
+  
+ 
+  /** @generated */
+  final Feature casFeat_category;
+  /** @generated */
+  final int     casFeatCode_category;
+  /** @generated */ 
+  public String getCategory(int addr) {
+        if (featOkTst && casFeat_category == null)
+      jcas.throwFeatMissing("category", 
"org.apache.clerezza.uima.utils.ts.WikipediaEntity");
+    return ll_cas.ll_getStringValue(addr, casFeatCode_category);
+  }
+  /** @generated */    
+  public void setCategory(int addr, String v) {
+        if (featOkTst && casFeat_category == null)
+      jcas.throwFeatMissing("category", 
"org.apache.clerezza.uima.utils.ts.WikipediaEntity");
+    ll_cas.ll_setStringValue(addr, casFeatCode_category, v);}
+    
+  
+
+
+
+  /** initialize variables to correspond with Cas Type and Features
+       * @generated */
+  public WikipediaEntity_Type(JCas jcas, Type casType) {
+    super(jcas, casType);
+    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, 
getFSGenerator());
+
+ 
+    casFeat_name = jcas.getRequiredFeatureDE(casType, "name", 
"uima.cas.String", featOkTst);
+    casFeatCode_name  = (null == casFeat_name) ? JCas.INVALID_FEATURE_CODE : 
((FeatureImpl)casFeat_name).getCode();
+
+ 
+    casFeat_category = jcas.getRequiredFeatureDE(casType, "category", 
"uima.cas.String", featOkTst);
+    casFeatCode_category  = (null == casFeat_category) ? 
JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_category).getCode();
+
+  }
+}
+
+
+
+    
\ No newline at end of file

Added: 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/resources/ClerezzaTestTypeSystemDescriptor.xml
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/test/resources/ClerezzaTestTypeSystemDescriptor.xml?rev=1159976&view=auto
==============================================================================
--- 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/resources/ClerezzaTestTypeSystemDescriptor.xml
 (added)
+++ 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/resources/ClerezzaTestTypeSystemDescriptor.xml
 Sun Aug 21 12:47:50 2011
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier";>
+  <name>ClerezzaTestTypeSystemDescriptor</name>
+  <description>A sample Clerezza TypeSystem</description>
+  <version>1.0</version>
+  <vendor></vendor>
+  <imports>
+    <import 
location="../../main/resources/META-INF/ClerezzaUIMATypeSystemDescriptor.xml" />
+  </imports>
+  <types>
+    <typeDescription>
+      <name>org.apache.clerezza.uima.utils.ts.WikipediaEntity</name>
+      <description>an Entity from Wikipedia</description>
+      <supertypeName>org.apache.clerezza.uima.utils.ts.ClerezzaBaseEntity
+      </supertypeName>
+      <features>
+        <featureDescription>
+          <name>name</name>
+          <description />
+          <rangeTypeName>uima.cas.String</rangeTypeName>
+        </featureDescription>
+        <featureDescription>
+          <name>category</name>
+          <description />
+          <rangeTypeName>uima.cas.String</rangeTypeName>
+        </featureDescription>
+      </features>
+    </typeDescription>
+    <typeDescription>
+      <name>org.apache.clerezza.uima.utils.ts.WikipediaEntityAnnotation
+      </name>
+      <description></description>
+      <supertypeName>org.apache.clerezza.uima.utils.ts.ClerezzaBaseAnnotation
+      </supertypeName>
+    </typeDescription>
+  </types>
+</typeSystemDescription>

Added: 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/resources/SampleWikipediaAEDescriptor.xml
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/uima/uima.utils/src/test/resources/SampleWikipediaAEDescriptor.xml?rev=1159976&view=auto
==============================================================================
--- 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/resources/SampleWikipediaAEDescriptor.xml
 (added)
+++ 
incubator/clerezza/trunk/parent/uima/uima.utils/src/test/resources/SampleWikipediaAEDescriptor.xml
 Sun Aug 21 12:47:50 2011
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier";>
+  <frameworkImplementation>org.apache.uima.java
+  </frameworkImplementation>
+  <primitive>true</primitive>
+  
<annotatorImplementationName>org.apache.clerezza.uima.annotator.DummyWikipediaEntityAnnotator
+  </annotatorImplementationName>
+  <analysisEngineMetaData>
+    <name>SampleWikipediaAEDescriptor</name>
+    <description></description>
+    <version>1.0</version>
+    <vendor></vendor>
+    <configurationParameters />
+    <configurationParameterSettings />
+    <typeSystemDescription>
+      <imports>
+        <import location="ClerezzaTestTypeSystemDescriptor.xml" />
+      </imports>
+    </typeSystemDescription>
+    <typePriorities />
+    <fsIndexCollection />
+    <capabilities>
+      <capability>
+        <inputs />
+        <outputs />
+        <languagesSupported />
+      </capability>
+    </capabilities>
+    <operationalProperties>
+      <modifiesCas>true</modifiesCas>
+      <multipleDeploymentAllowed>true</multipleDeploymentAllowed>
+      <outputsNewCASes>false</outputsNewCASes>
+    </operationalProperties>
+  </analysisEngineMetaData>
+  <resourceManagerConfiguration />
+</analysisEngineDescription>


Reply via email to