/* First created by JCasGen Wed Mar 16 10:14:04 CET 2011 */
package org.u_compare.shared;
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;
/** THIS TYPE WILL BE CHANGED TO INHERIT APACHE UIMA ANNOTATIONMETADATA TYPE, WHEN IT RELEASED. <br></br>
* Updated by JCasGen Tue Mar 06 16:28:13 CET 2012
* @generated */
public class AnnotationMetadata_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 (AnnotationMetadata_Type.this.useExistingInstance) {
// Return eq fs instance if already created
FeatureStructure fs = AnnotationMetadata_Type.this.jcas.getJfsFromCaddr(addr);
if (null == fs) {
fs = new AnnotationMetadata(addr, AnnotationMetadata_Type.this);
AnnotationMetadata_Type.this.jcas.putJfsFromCaddr(addr, fs);
return fs;
}
return fs;
} else return new AnnotationMetadata(addr, AnnotationMetadata_Type.this);
}
};
/** @generated */
public final static int typeIndexID = AnnotationMetadata.typeIndexID;
/** @generated
@modifiable */
public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.u_compare.shared.AnnotationMetadata");
/** @generated */
final Feature casFeat_confidence;
/** @generated */
final int casFeatCode_confidence;
/** @generated */
public float getConfidence(int addr) {
if (featOkTst && casFeat_confidence == null)
jcas.throwFeatMissing("confidence", "org.u_compare.shared.AnnotationMetadata");
return ll_cas.ll_getFloatValue(addr, casFeatCode_confidence);
}
/** @generated */
public void setConfidence(int addr, float v) {
if (featOkTst && casFeat_confidence == null)
jcas.throwFeatMissing("confidence", "org.u_compare.shared.AnnotationMetadata");
ll_cas.ll_setFloatValue(addr, casFeatCode_confidence, v);}
/** initialize variables to correspond with Cas Type and Features
* @generated */
public AnnotationMetadata_Type(JCas jcas, Type casType) {
super(jcas, casType);
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
casFeat_confidence = jcas.getRequiredFeatureDE(casType, "confidence", "uima.cas.Float", featOkTst);
casFeatCode_confidence = (null == casFeat_confidence) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_confidence).getCode();
}
}