Interface LowLevelIndex<T extends FeatureStructure>

All Superinterfaces:
Collection<T>, FSIndex<T>, Iterable<T>
All Known Implementing Classes:
FsIndex_annotation, FsIndex_bag, FsIndex_flat, FsIndex_set_sorted, FsIndex_singletype, FsIndex_snapshot

public interface LowLevelIndex<T extends FeatureStructure> extends FSIndex<T>
Low-level FS index object. Use to obtain low-level iterators.
  • Field Details

  • Method Details

    • ll_iterator

      default LowLevelIterator<T> ll_iterator()
      Get a low-level FS iterator.
      Returns:
      An iterator for this index.
    • ll_iterator

      LowLevelIterator<T> ll_iterator(boolean ambiguous)
      Get a low-level, FS reference iterator. This iterator can be disambiguated. This means that only non-overlapping annotations will be returned. Non-annotation FSs will be filtered in this mode.
      Parameters:
      ambiguous - When set to false, iterator will be disambiguated.
      Returns:
      An iterator for this index.
    • ll_compare

      default int ll_compare(int ref1, int ref2)
      Compare two Feature structures, referred to by IDs
      Parameters:
      ref1 - -
      ref2 - -
      Returns:
      -
    • getCasImpl

      CASImpl getCasImpl()
      Returns:
      a CAS View associated with this iterator
    • getComparatorForIndexSpecs

      FSIndexComparator getComparatorForIndexSpecs()
      This is **NOT** a comparator for Feature Structures, but rather something that compares two comparator specifications
      Returns:
      -
    • getComparator

      Comparator<TOP> getComparator()
      Returns:
      a comparator used by this index to compare Feature Structures For sets, the equal is used to determine set membership For sorted, the comparator is the sort order (this comparator is without the ID)
    • flush

      default void flush()
    • getIntIterator

      default org.apache.uima.internal.util.IntPointerIterator getIntIterator()
    • getSubIndex

      default <U extends T> LowLevelIndex<U> getSubIndex(Type type)
      Type Parameters:
      U - the type the subindex is over
      Parameters:
      type - which is a subtype of this index's type
      Returns:
      the index but just over this subtype
    • getSubIndex

      default <U extends T> LowLevelIndex<U> getSubIndex(Class<? extends TOP> clazz)
    • ll_maxAnnotSpan

      int ll_maxAnnotSpan()
      Returns:
      for annotation indexes, an conservative estimate the maximum span between begin and end The value may be larger than actual.
    • isSorted

      boolean isSorted()
      Returns:
      true if the index is sorted
    • select

      default SelectFSs<T> select()
      Specified by:
      select in interface FSIndex<T extends FeatureStructure>
      Returns:
      a newly created selection object for accessing feature structures
    • select

      default <N extends T> SelectFSs<N> select(Type type)
      Specified by:
      select in interface FSIndex<T extends FeatureStructure>
      Type Parameters:
      N - the Type of the elements being accessed
      Parameters:
      type - specifies the type (and subtypes of that type) to access
      Returns:
      a newly created selection object for accessing feature structures of that type and its subtypes
    • select

      default <N extends T> SelectFSs<N> select(Class<N> clazz)
      Specified by:
      select in interface FSIndex<T extends FeatureStructure>
      Type Parameters:
      N - the Type of the elements being accessed
      Parameters:
      clazz - a JCas class corresponding to the type (and subtypes of that type) to access
      Returns:
      a newly created selection object for accessing feature structures of that type and its subtypes
    • select

      default <N extends T> SelectFSs<N> select(int jcasType)
      Specified by:
      select in interface FSIndex<T extends FeatureStructure>
      Type Parameters:
      N - the Type of the elements being accessed
      Parameters:
      jcasType - the "type" field from the JCas class corresponding to the type (and subtypes of that type) to access
      Returns:
      a newly created selection object for accessing feature structures of that type and its subtypes
    • select

      default <N extends T> SelectFSs<N> select(String fullyQualifiedTypeName)
      Specified by:
      select in interface FSIndex<T extends FeatureStructure>
      Type Parameters:
      N - the Type of the elements being accessed
      Parameters:
      fullyQualifiedTypeName - the string name of the type to access
      Returns:
      a newly created selection object for accessing feature structures of that type and its subtypes
    • iterator

      default LowLevelIterator<T> iterator()
      Return an iterator over the index. The position of the iterator will be set to return the first item in the index. If the index is empty, the iterator position will be marked as invalid.
      Specified by:
      iterator in interface Collection<T extends FeatureStructure>
      Specified by:
      iterator in interface FSIndex<T extends FeatureStructure>
      Specified by:
      iterator in interface Iterable<T extends FeatureStructure>
      Returns:
      An FSIterator positioned at the beginning, or an invalid iterator.
    • iterator

      LowLevelIterator<T> iterator(boolean orderNotNeeded, boolean ignoreType)
      Internal use, used by select framework. Return an iterator over the index. The position of the iterator will be set to return the first item in the index. If the index is empty, the iterator position will be marked as invalid.
      Parameters:
      orderNotNeeded - if true, skips work while iterating to keep iterators over multiple types in sync.
      ignoreType - if true, the comparator used for moveTo leftmost operations will ignore typeOrder keys, if the index happens to define these
      Returns:
      An FSIterator positioned at the beginning, or an invalid iterator.