Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
jcas.select(Token.class)
jcas.select(Token.type)
jcas.select("my.package.Token")
 
for (Token.class : jcas.select(Token.class)) {
  ...
}
 
jcas.select(Token.class).forEach( t -> System.out.println(t) );
select(FSArray, Class<T>)
Code Block
languagejava
myArray.select(Token.class)
 
select(FSList, Class<T>)
Code Block
languagejava
myList.select(Token.class)

...

selectFollowing(JCas, Class<T>, AnnotationFS, int)
Code Block
languagejava
 jcasjcas.select(Token.class).startAt(contextAnnotation).limit(10) // it is IMHO not entirely clear here that contextAnnotation is not included in the result...
jcas.select(Token.class).seek(contextAnnotation).skip(1).limit(10) // somehow too complex...
jcas.select(Token.class).following(contextAnnotation).limit(10) 
selectPreceding

Returns the n annotations preceding the given annotation.

...

Code Block
languagejava
jcas.select(DocumentMetaData.class).single()
jcas.select(DocumentMetaData.class).single().getDocumentUri()
selectSingleAt

Get a single annotations of the given type at the specified offsets.

...