Package org.apache.uima.jcas.impl
Class JFSIndexRepositoryImpl
java.lang.Object
org.apache.uima.jcas.impl.JFSIndexRepositoryImpl
- All Implemented Interfaces:
JFSIndexRepository
-
Method Summary
Modifier and TypeMethodDescription<T extends TOP>
FSIterator<T> getAllIndexedFS
(int aType) Gets an iterator over all indexed FeatureStructures of the specified Type (and any of its subtypes).<T extends TOP>
FSIterator<T> getAllIndexedFS
(Type aType) Gets an iterator over all indexed FeatureStructures of the specified Type (and any of its subtypes).Get the standard annotation index.<T extends Annotation>
AnnotationIndex<T> getAnnotationIndex
(int type) Get the standard annotation index restricted to a specific annotation type.Get the underlying FSIndexRepository associated with this JFSIndexRepository.Retrieve an index according to a label.Retrieve an index according to a label and a type.Get all indexes in this repository.Get all labels for all indexes.
-
Method Details
-
getIndex
Description copied from interface:JFSIndexRepository
Retrieve an index according to a label.- Specified by:
getIndex
in interfaceJFSIndexRepository
- Type Parameters:
T
- the Java class corresponding to the top most type defined by this index- Parameters:
label
- The name of the index.- Returns:
- The index with the name
label
, ornull
if no such index is defined.
-
getIndex
Description copied from interface:JFSIndexRepository
Retrieve an index according to a label and a type. The type is used to narrow down the index of a more general type to a more specific one.- Specified by:
getIndex
in interfaceJFSIndexRepository
- Type Parameters:
T
- the Java class corresponding to the type- Parameters:
label
- The name of the indextype
- A subtype of the type of the index, written as Foo.type- Returns:
- The specified index, or
null
if an index with that name doesn't exist, or it exists buttype
is not a subtype of the index's type.
-
getAnnotationIndex
Description copied from interface:JFSIndexRepository
Get the standard annotation index.- Specified by:
getAnnotationIndex
in interfaceJFSIndexRepository
- Returns:
- The standard annotation index.
-
getAnnotationIndex
Description copied from interface:JFSIndexRepository
Get the standard annotation index restricted to a specific annotation type.- Specified by:
getAnnotationIndex
in interfaceJFSIndexRepository
- Type Parameters:
T
- the Java class corresponding to type- Parameters:
type
- The annotation type the index is restricted to, written as Foo.type- Returns:
- The standard annotation index, restricted to
type
.
-
getLabels
Description copied from interface:JFSIndexRepository
Get all labels for all indexes.- Specified by:
getLabels
in interfaceJFSIndexRepository
- Returns:
- All labels.
-
getIndexes
Description copied from interface:JFSIndexRepository
Get all indexes in this repository.- Specified by:
getIndexes
in interfaceJFSIndexRepository
- Returns:
- All indexes.
-
getFSIndexRepository
Description copied from interface:JFSIndexRepository
Get the underlying FSIndexRepository associated with this JFSIndexRepository.- Specified by:
getFSIndexRepository
in interfaceJFSIndexRepository
- Returns:
- The associated FSIndexRepository.
-
getAllIndexedFS
Description copied from interface:JFSIndexRepository
Gets an iterator over all indexed FeatureStructures of the specified Type (and any of its subtypes).Limitation: If there are no sorted or bag indexes defined for this type, but there is more than one set index defined, then this method will only return the contents of one of these set indexes (chosen arbitrarily). Generics: The returned Java cover class may not be a JCas one.
- Specified by:
getAllIndexedFS
in interfaceJFSIndexRepository
- Type Parameters:
T
- the Java Class corresponding to aType- Parameters:
aType
- The type- Returns:
- An iterator that returns all indexed FeatureStructures of type
aType
, in no particular order.
-
getAllIndexedFS
Description copied from interface:JFSIndexRepository
Gets an iterator over all indexed FeatureStructures of the specified Type (and any of its subtypes).Limitation: If there are no sorted or bag indexes defined for this type, but there is more than one set index defined, then this method will only return the contents of one of these set indexes (chosen arbitrarily). Generics: The returned Java cover class may not be a JCas one.
- Specified by:
getAllIndexedFS
in interfaceJFSIndexRepository
- Type Parameters:
T
- the Java Class corresponding to aType- Parameters:
aType
- The JCas unique type id obtained by doing MyJCasClass.type- Returns:
- An iterator that returns all indexed FeatureStructures of type
aType
, in no particular order.
-