/** Create a new chain head feature structure. Already adds the chain to the CAS. */
 private FeatureStructure newChain(JCas aJCas, AnnotationFS aFirstLink) {
   Type chainType = getAnnotationType(aJCas.getCas());
   FeatureStructure newChain = aJCas.getCas().createFS(chainType);
   newChain.setFeatureValue(chainType.getFeatureByBaseName(chainFirstFeatureName), aFirstLink);
   aJCas.addFsToIndexes(newChain);
   return newChain;
 }
 /** Set the first link of a chain in the chain head feature structure. */
 private void setFirstLink(FeatureStructure aChain, AnnotationFS aLink) {
   aChain.setFeatureValue(aChain.getType().getFeatureByBaseName(chainFirstFeatureName), aLink);
 }