Package org.apache.uima.cas.impl
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
Low-level FS index object. Use to obtain low-level iterators.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Comparator
<TOP> static final boolean
Internal use constantsstatic final boolean
Fields inherited from interface org.apache.uima.cas.FSIndex
BAG_INDEX, DEFAULT_BAG_INDEX, SET_INDEX, SORTED_INDEX
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
flush()
This is **NOT** a comparator for Feature Structures, but rather something that compares two comparator specificationsdefault IntPointerIterator
default <U extends T>
LowLevelIndex<U> getSubIndex
(Class<? extends TOP> clazz) default <U extends T>
LowLevelIndex<U> getSubIndex
(Type type) boolean
isSorted()
default LowLevelIterator
<T> iterator()
Return an iterator over the index.iterator
(boolean orderNotNeeded, boolean ignoreType) Internal use, used by select framework.default int
ll_compare
(int ref1, int ref2) Compare two Feature structures, referred to by IDsdefault LowLevelIterator
<T> Get a low-level FS iterator.ll_iterator
(boolean ambiguous) Get a low-level, FS reference iterator.int
select()
select
(int jcasType) Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, toArray, toArray, toArray
-
Field Details
-
FS_ID_COMPARATOR
-
IS_ORDERED
static final boolean IS_ORDEREDInternal use constants- See Also:
-
IS_TYPE_ORDER
static final boolean IS_TYPE_ORDER- See Also:
-
-
Method Details
-
ll_iterator
Get a low-level FS iterator.- Returns:
- An iterator for this index.
-
ll_iterator
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 tofalse
, 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
-
getSubIndex
- 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
-
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
- Specified by:
select
in interfaceFSIndex<T extends FeatureStructure>
- Returns:
- a newly created selection object for accessing feature structures
-
select
- Specified by:
select
in interfaceFSIndex<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
- Specified by:
select
in interfaceFSIndex<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
- Specified by:
select
in interfaceFSIndex<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
- Specified by:
select
in interfaceFSIndex<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
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 interfaceCollection<T extends FeatureStructure>
- Specified by:
iterator
in interfaceFSIndex<T extends FeatureStructure>
- Specified by:
iterator
in interfaceIterable<T extends FeatureStructure>
- Returns:
- An FSIterator positioned at the beginning, or an invalid iterator.
-
iterator
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.
-