/* First created by JCasGen Wed Mar 16 10:14:04 CET 2011 */ package org.u_compare.shared.document; 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; /** Assumed to be used to correspond to an attribute name-value pair (CDATA in case of DTD). <br></br> * Updated by JCasGen Tue Mar 06 16:28:14 CET 2012 * @generated */ public class DocumentValueAttribute_Type extends DocumentAttribute_Type { /** @generated */ protected FSGenerator getFSGenerator() {return fsGenerator;} /** @generated */ private final FSGenerator fsGenerator = new FSGenerator() { public FeatureStructure createFS(int addr, CASImpl cas) { if (DocumentValueAttribute_Type.this.useExistingInstance) { // Return eq fs instance if already created FeatureStructure fs = DocumentValueAttribute_Type.this.jcas.getJfsFromCaddr(addr); if (null == fs) { fs = new DocumentValueAttribute(addr, DocumentValueAttribute_Type.this); DocumentValueAttribute_Type.this.jcas.putJfsFromCaddr(addr, fs); return fs; } return fs; } else return new DocumentValueAttribute(addr, DocumentValueAttribute_Type.this); } }; /** @generated */ public final static int typeIndexID = DocumentValueAttribute.typeIndexID; /** @generated @modifiable */ public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.u_compare.shared.document.DocumentValueAttribute"); /** @generated */ final Feature casFeat_value; /** @generated */ final int casFeatCode_value; /** @generated */ public String getValue(int addr) { if (featOkTst && casFeat_value == null) jcas.throwFeatMissing("value", "org.u_compare.shared.document.DocumentValueAttribute"); return ll_cas.ll_getStringValue(addr, casFeatCode_value); } /** @generated */ public void setValue(int addr, String v) { if (featOkTst && casFeat_value == null) jcas.throwFeatMissing("value", "org.u_compare.shared.document.DocumentValueAttribute"); ll_cas.ll_setStringValue(addr, casFeatCode_value, v);} /** initialize variables to correspond with Cas Type and Features * @generated */ public DocumentValueAttribute_Type(JCas jcas, Type casType) { super(jcas, casType); casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator()); casFeat_value = jcas.getRequiredFeatureDE(casType, "value", "uima.cas.String", featOkTst); casFeatCode_value = (null == casFeat_value) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_value).getCode(); } }