congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ChainAdapter.getChainTypeName
Code IndexAdd Tabnine to your IDE (free)

How to use
getChainTypeName
method
in
de.tudarmstadt.ukp.clarin.webanno.api.annotation.adapter.ChainAdapter

Best Java code snippets using de.tudarmstadt.ukp.clarin.webanno.api.annotation.adapter.ChainAdapter.getChainTypeName (Showing top 8 results out of 315)

origin: webanno/webanno

/**
 * Find the chain head for the given link.
 *
 * @param aJCas the CAS.
 * @param aLink the link to search the chain for.
 * @return the chain.
 */
private FeatureStructure getChainForLink(JCas aJCas, AnnotationFS aLink)
{
  Type chainType = CasUtil.getType(aJCas.getCas(), getChainTypeName());
  for (FeatureStructure chainFs : selectFS(aJCas.getCas(), chainType)) {
    AnnotationFS linkFs = getFirstLink(chainFs);
    // Now we seek the link within the current chain
    while (linkFs != null) {
      if (WebAnnoCasUtil.isSame(linkFs, aLink)) {
        return chainFs;
      }
      linkFs = getNextLink(linkFs);
    }
  }
  // This should never happen unless the data in the CAS has been created wrongly
  throw new IllegalArgumentException("Link not part of any chain");
}
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-api-annotation

/**
 * Find the chain head for the given link.
 *
 * @param aJCas the CAS.
 * @param aLink the link to search the chain for.
 * @return the chain.
 */
private FeatureStructure getChainForLink(JCas aJCas, AnnotationFS aLink)
{
  Type chainType = CasUtil.getType(aJCas.getCas(), getChainTypeName());
  for (FeatureStructure chainFs : selectFS(aJCas.getCas(), chainType)) {
    AnnotationFS linkFs = getFirstLink(chainFs);
    // Now we seek the link within the current chain
    while (linkFs != null) {
      if (WebAnnoCasUtil.isSame(linkFs, aLink)) {
        return chainFs;
      }
      linkFs = getNextLink(linkFs);
    }
  }
  // This should never happen unless the data in the CAS has been created wrongly
  throw new IllegalArgumentException("Link not part of any chain");
}
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-api-annotation

/**
 * Create a new chain head feature structure. Already adds the chain to the CAS.
 */
private FeatureStructure newChain(JCas aJCas, AnnotationFS aFirstLink)
{
  Type chainType = CasUtil.getType(aJCas.getCas(), getChainTypeName());
  FeatureStructure newChain = aJCas.getCas().createFS(chainType);
  newChain.setFeatureValue(chainType.getFeatureByBaseName(getChainFirstFeatureName()),
      aFirstLink);
  aJCas.addFsToIndexes(newChain);
  return newChain;
}
origin: webanno/webanno

/**
 * Create a new chain head feature structure. Already adds the chain to the CAS.
 */
private FeatureStructure newChain(JCas aJCas, AnnotationFS aFirstLink)
{
  Type chainType = CasUtil.getType(aJCas.getCas(), getChainTypeName());
  FeatureStructure newChain = aJCas.getCas().createFS(chainType);
  newChain.setFeatureValue(chainType.getFeatureByBaseName(getChainFirstFeatureName()),
      aFirstLink);
  aJCas.addFsToIndexes(newChain);
  return newChain;
}
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-api-annotation

Type chainType = CasUtil.getType(aJcas.getCas(), typeAdapter.getChainTypeName());
Feature chainFirst = chainType.getFeatureByBaseName(typeAdapter.getChainFirstFeatureName());
origin: webanno/webanno

Type chainType = CasUtil.getType(aJcas.getCas(), typeAdapter.getChainTypeName());
Feature chainFirst = chainType.getFeatureByBaseName(typeAdapter.getChainFirstFeatureName());
origin: de.tudarmstadt.ukp.clarin.webanno/webanno-api-annotation

private void deleteSpan(JCas aJCas, int aAddress)
  Type chainType = CasUtil.getType(aJCas.getCas(), getChainTypeName());
origin: webanno/webanno

private void deleteSpan(JCas aJCas, int aAddress)
  Type chainType = CasUtil.getType(aJCas.getCas(), getChainTypeName());
de.tudarmstadt.ukp.clarin.webanno.api.annotation.adapterChainAdaptergetChainTypeName

Popular methods of ChainAdapter

  • <init>
  • addSpan
  • addArc
  • collectLinks
  • createChainElementAnnotation
  • deleteArc
  • deleteSpan
  • getAnnotationTypeName
  • getChainFirstFeatureName
  • getChainForLink
    Find the chain head for the given link.
  • getFirstLink
    Get the first link of a chain from the chain head feature structure.
  • getLayer
  • getFirstLink,
  • getLayer,
  • getLinkNextFeatureName,
  • getNextLink,
  • getPrevLink,
  • handle,
  • isLinkedListBehavior,
  • newChain,
  • newLink

Popular in Java

  • Start an intent from android
  • compareTo (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • setScale (BigDecimal)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Option (scala)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now