/* First created by JCasGen Tue Feb 03 14:24:45 GMT 2015 */ //Dstl (c) Crown Copyright 2017 package uk.gov.dstl.baleen.types.semantic; 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.TypeImpl; import org.apache.uima.jcas.JCas; import org.apache.uima.jcas.JCasRegistry; import uk.gov.dstl.baleen.types.BaleenAnnotation_Type; /** A target type for the referent property, such that entities pointing to the same target are assumed to be coreferences. The target can therefore be thought of as a super-entity, though it has no properties or value of it's own. The span of this entity is taken to be the scope in which this reference target is valid. * Updated by JCasGen Wed Apr 13 13:23:16 BST 2016 * @generated */ public class ReferenceTarget_Type extends BaleenAnnotation_Type { /** @generated * @return the generator for this type */ @Override protected FSGenerator getFSGenerator() {return fsGenerator;} /** @generated */ private final FSGenerator fsGenerator = new FSGenerator() { public FeatureStructure createFS(int addr, CASImpl cas) { if (ReferenceTarget_Type.this.useExistingInstance) { // Return eq fs instance if already created FeatureStructure fs = ReferenceTarget_Type.this.jcas.getJfsFromCaddr(addr); if (null == fs) { fs = new ReferenceTarget(addr, ReferenceTarget_Type.this); ReferenceTarget_Type.this.jcas.putJfsFromCaddr(addr, fs); return fs; } return fs; } else return new ReferenceTarget(addr, ReferenceTarget_Type.this); } }; /** @generated */ @SuppressWarnings ("hiding") public final static int typeIndexID = ReferenceTarget.typeIndexID; /** @generated @modifiable */ @SuppressWarnings ("hiding") public final static boolean featOkTst = JCasRegistry.getFeatOkTst("uk.gov.dstl.baleen.types.semantic.ReferenceTarget"); /** initialize variables to correspond with Cas Type and Features * @generated * @param jcas JCas * @param casType Type */ public ReferenceTarget_Type(JCas jcas, Type casType) { super(jcas, casType); casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator()); } }