/* First created by JCasGen Thu Sep 20 15:38:13 CEST 2012 */
package de.unihd.dbs.uima.types.heideltime;
import org.apache.uima.jcas.JCas;
import org.apache.uima.jcas.JCasRegistry;
import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.FSGenerator;
import org.apache.uima.cas.FeatureStructure;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.cas.Type;
/**
* Updated by JCasGen Thu Sep 20 15:38:13 CEST 2012
* @generated */
public class GoldEvent_Type extends Event_Type {
/** @generated */
@Override
protected FSGenerator getFSGenerator() {return fsGenerator;}
/** @generated */
private final FSGenerator fsGenerator =
new FSGenerator() {
public FeatureStructure createFS(int addr, CASImpl cas) {
if (GoldEvent_Type.this.useExistingInstance) {
// Return eq fs instance if already created
FeatureStructure fs = GoldEvent_Type.this.jcas.getJfsFromCaddr(addr);
if (null == fs) {
fs = new GoldEvent(addr, GoldEvent_Type.this);
GoldEvent_Type.this.jcas.putJfsFromCaddr(addr, fs);
return fs;
}
return fs;
} else return new GoldEvent(addr, GoldEvent_Type.this);
}
};
/** @generated */
public final static int typeIndexID = GoldEvent.typeIndexID;
/** @generated
@modifiable */
public final static boolean featOkTst = JCasRegistry.getFeatOkTst("de.unihd.dbs.uima.types.heideltime.GoldEvent");
/** initialize variables to correspond with Cas Type and Features
* @generated */
public GoldEvent_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
}
}