001
002
003/* First created by JCasGen Wed May 07 09:15:21 EDT 2014 */
004package org.cleartk.ne.type;
005
006import org.apache.uima.jcas.JCas; 
007import org.apache.uima.jcas.JCasRegistry;
008import org.apache.uima.jcas.cas.TOP_Type;
009
010import org.apache.uima.jcas.tcas.Annotation;
011import org.cleartk.score.type.ScoredAnnotation;
012
013
014/** 
015 * Updated by JCasGen Wed May 07 09:15:21 EDT 2014
016 * XML source: /Users/bethard/Code/cleartk/target/checkout/cleartk-type-system/target/jcasgen/typesystem.xml
017 * @generated */
018public class NamedEntityMention extends ScoredAnnotation {
019  /** @generated
020   * @ordered 
021   */
022  @SuppressWarnings ("hiding")
023  public final static int typeIndexID = JCasRegistry.register(NamedEntityMention.class);
024  /** @generated
025   * @ordered 
026   */
027  @SuppressWarnings ("hiding")
028  public final static int type = typeIndexID;
029  /** @generated
030   * @return index of the type  
031   */
032  @Override
033  public              int getTypeIndexID() {return typeIndexID;}
034 
035  /** Never called.  Disable default constructor
036   * @generated */
037  protected NamedEntityMention() {/* intentionally empty block */}
038    
039  /** Internal - constructor used by generator 
040   * @generated
041   * @param addr low level Feature Structure reference
042   * @param type the type of this Feature Structure 
043   */
044  public NamedEntityMention(int addr, TOP_Type type) {
045    super(addr, type);
046    readObject();
047  }
048  
049  /** @generated
050   * @param jcas JCas to which this Feature Structure belongs 
051   */
052  public NamedEntityMention(JCas jcas) {
053    super(jcas);
054    readObject();   
055  } 
056
057  /** @generated
058   * @param jcas JCas to which this Feature Structure belongs
059   * @param begin offset to the begin spot in the SofA
060   * @param end offset to the end spot in the SofA 
061  */  
062  public NamedEntityMention(JCas jcas, int begin, int end) {
063    super(jcas);
064    setBegin(begin);
065    setEnd(end);
066    readObject();
067  }   
068
069  /** 
070   * <!-- begin-user-doc -->
071   * Write your own initialization here
072   * <!-- end-user-doc -->
073   *
074   * @generated modifiable 
075   */
076  private void readObject() {/*default - does nothing empty block */}
077     
078 
079    
080  //*--------------*
081  //* Feature: mentionType
082
083  /** getter for mentionType - gets 
084   * @generated
085   * @return value of the feature 
086   */
087  public String getMentionType() {
088    if (NamedEntityMention_Type.featOkTst && ((NamedEntityMention_Type)jcasType).casFeat_mentionType == null)
089      jcasType.jcas.throwFeatMissing("mentionType", "org.cleartk.ne.type.NamedEntityMention");
090    return jcasType.ll_cas.ll_getStringValue(addr, ((NamedEntityMention_Type)jcasType).casFeatCode_mentionType);}
091    
092  /** setter for mentionType - sets  
093   * @generated
094   * @param v value to set into the feature 
095   */
096  public void setMentionType(String v) {
097    if (NamedEntityMention_Type.featOkTst && ((NamedEntityMention_Type)jcasType).casFeat_mentionType == null)
098      jcasType.jcas.throwFeatMissing("mentionType", "org.cleartk.ne.type.NamedEntityMention");
099    jcasType.ll_cas.ll_setStringValue(addr, ((NamedEntityMention_Type)jcasType).casFeatCode_mentionType, v);}    
100   
101    
102  //*--------------*
103  //* Feature: mentionedEntity
104
105  /** getter for mentionedEntity - gets 
106   * @generated
107   * @return value of the feature 
108   */
109  public NamedEntity getMentionedEntity() {
110    if (NamedEntityMention_Type.featOkTst && ((NamedEntityMention_Type)jcasType).casFeat_mentionedEntity == null)
111      jcasType.jcas.throwFeatMissing("mentionedEntity", "org.cleartk.ne.type.NamedEntityMention");
112    return (NamedEntity)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((NamedEntityMention_Type)jcasType).casFeatCode_mentionedEntity)));}
113    
114  /** setter for mentionedEntity - sets  
115   * @generated
116   * @param v value to set into the feature 
117   */
118  public void setMentionedEntity(NamedEntity v) {
119    if (NamedEntityMention_Type.featOkTst && ((NamedEntityMention_Type)jcasType).casFeat_mentionedEntity == null)
120      jcasType.jcas.throwFeatMissing("mentionedEntity", "org.cleartk.ne.type.NamedEntityMention");
121    jcasType.ll_cas.ll_setRefValue(addr, ((NamedEntityMention_Type)jcasType).casFeatCode_mentionedEntity, jcasType.ll_cas.ll_getFSRef(v));}    
122   
123    
124  //*--------------*
125  //* Feature: annotation
126
127  /** getter for annotation - gets 
128   * @generated
129   * @return value of the feature 
130   */
131  public Annotation getAnnotation() {
132    if (NamedEntityMention_Type.featOkTst && ((NamedEntityMention_Type)jcasType).casFeat_annotation == null)
133      jcasType.jcas.throwFeatMissing("annotation", "org.cleartk.ne.type.NamedEntityMention");
134    return (Annotation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((NamedEntityMention_Type)jcasType).casFeatCode_annotation)));}
135    
136  /** setter for annotation - sets  
137   * @generated
138   * @param v value to set into the feature 
139   */
140  public void setAnnotation(Annotation v) {
141    if (NamedEntityMention_Type.featOkTst && ((NamedEntityMention_Type)jcasType).casFeat_annotation == null)
142      jcasType.jcas.throwFeatMissing("annotation", "org.cleartk.ne.type.NamedEntityMention");
143    jcasType.ll_cas.ll_setRefValue(addr, ((NamedEntityMention_Type)jcasType).casFeatCode_annotation, jcasType.ll_cas.ll_getFSRef(v));}    
144   
145    
146  //*--------------*
147  //* Feature: head
148
149  /** getter for head - gets 
150   * @generated
151   * @return value of the feature 
152   */
153  public Annotation getHead() {
154    if (NamedEntityMention_Type.featOkTst && ((NamedEntityMention_Type)jcasType).casFeat_head == null)
155      jcasType.jcas.throwFeatMissing("head", "org.cleartk.ne.type.NamedEntityMention");
156    return (Annotation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((NamedEntityMention_Type)jcasType).casFeatCode_head)));}
157    
158  /** setter for head - sets  
159   * @generated
160   * @param v value to set into the feature 
161   */
162  public void setHead(Annotation v) {
163    if (NamedEntityMention_Type.featOkTst && ((NamedEntityMention_Type)jcasType).casFeat_head == null)
164      jcasType.jcas.throwFeatMissing("head", "org.cleartk.ne.type.NamedEntityMention");
165    jcasType.ll_cas.ll_setRefValue(addr, ((NamedEntityMention_Type)jcasType).casFeatCode_head, jcasType.ll_cas.ll_getFSRef(v));}    
166   
167    
168  //*--------------*
169  //* Feature: mentionId
170
171  /** getter for mentionId - gets 
172   * @generated
173   * @return value of the feature 
174   */
175  public String getMentionId() {
176    if (NamedEntityMention_Type.featOkTst && ((NamedEntityMention_Type)jcasType).casFeat_mentionId == null)
177      jcasType.jcas.throwFeatMissing("mentionId", "org.cleartk.ne.type.NamedEntityMention");
178    return jcasType.ll_cas.ll_getStringValue(addr, ((NamedEntityMention_Type)jcasType).casFeatCode_mentionId);}
179    
180  /** setter for mentionId - sets  
181   * @generated
182   * @param v value to set into the feature 
183   */
184  public void setMentionId(String v) {
185    if (NamedEntityMention_Type.featOkTst && ((NamedEntityMention_Type)jcasType).casFeat_mentionId == null)
186      jcasType.jcas.throwFeatMissing("mentionId", "org.cleartk.ne.type.NamedEntityMention");
187    jcasType.ll_cas.ll_setStringValue(addr, ((NamedEntityMention_Type)jcasType).casFeatCode_mentionId, v);}    
188  }
189
190