Package org.apache.uima.fit.util


package org.apache.uima.fit.util
Utility classes like CasUtil and JCasUtil.

Sort order

The various select methods in CasUtil and JCasUtil rely on the UIMA feature structure indexes. Their behaviour differs depending on the type of feature structure being selected and where they are selected from:

Selecting from a CAS/JCas

  1. Annotations - if the type being selected is Annotation or a sub-type thereof, the built-in annotation index is used. This index has the keys begin (Ascending), end (Descending) and TYPE_PRIORITY. There are no built-in type priorities, so this last sort item does not play a role in the index unless type priorities are specified. uimaFIT uses CAS.getAnnotationIndex(org.apache.uima.cas.Type) to access annotation feature structures.
  2. Other feature structures - if feature structures are selected that are not annotations, the order should be considered undefined. uimaFIT uses FSIndexRepository.getAllIndexedFS(org.apache.uima.cas.Type) to access these feature structures.

Selecting from a ArrayFS/FSArray/FSList

When selecting from a feature structure list or array, the order is determined by the order of the annotations inside the list/array.