blob: 0f5f695510925a5f91ebe5911292349467abb4cb [file] [log] [blame]
/* First created by JCasGen Tue Aug 09 16:26:13 CEST 2011 */
package org.apache.uima.ruta.type;
import org.apache.uima.cas.Feature;
import org.apache.uima.cas.FeatureStructure;
import org.apache.uima.cas.Type;
import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.FSGenerator;
import org.apache.uima.cas.impl.FeatureImpl;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.jcas.JCas;
import org.apache.uima.jcas.JCasRegistry;
import org.apache.uima.jcas.tcas.Annotation_Type;
/**
* Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
*
* @generated
*/
public class ProfiledAnnotation_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 (ProfiledAnnotation_Type.this.useExistingInstance) {
// Return eq fs instance if already created
FeatureStructure fs = ProfiledAnnotation_Type.this.jcas.getJfsFromCaddr(addr);
if (null == fs) {
fs = new ProfiledAnnotation(addr, ProfiledAnnotation_Type.this);
ProfiledAnnotation_Type.this.jcas.putJfsFromCaddr(addr, fs);
return fs;
}
return fs;
} else
return new ProfiledAnnotation(addr, ProfiledAnnotation_Type.this);
}
};
/** @generated */
public final static int typeIndexID = ProfiledAnnotation.typeIndexID;
/**
* @generated
* @modifiable
*/
public final static boolean featOkTst = JCasRegistry
.getFeatOkTst("org.apache.uima.ruta.type.ProfiledAnnotation");
/** @generated */
final Feature casFeat_time;
/** @generated */
final int casFeatCode_time;
/** @generated */
public long getTime(int addr) {
if (featOkTst && casFeat_time == null)
jcas.throwFeatMissing("time", "org.apache.uima.ruta.type.ProfiledAnnotation");
return ll_cas.ll_getLongValue(addr, casFeatCode_time);
}
/** @generated */
public void setTime(int addr, long v) {
if (featOkTst && casFeat_time == null)
jcas.throwFeatMissing("time", "org.apache.uima.ruta.type.ProfiledAnnotation");
ll_cas.ll_setLongValue(addr, casFeatCode_time, v);
}
/**
* initialize variables to correspond with Cas Type and Features
*
* @generated
*/
public ProfiledAnnotation_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
casFeat_time = jcas.getRequiredFeatureDE(casType, "time", "uima.cas.Long", featOkTst);
casFeatCode_time = (null == casFeat_time) ? JCas.INVALID_FEATURE_CODE
: ((FeatureImpl) casFeat_time).getCode();
}
}