public interface FSIndexRepository
Modifier and Type | Method and Description |
---|---|
void |
addFS(FeatureStructure fs)
Add a feature structure to all appropriate indexes in the repository.
|
<T extends FeatureStructure> |
getAllIndexedFS(Type aType)
Gets an iterator over all indexed FeatureStructures of the specified Type (and any of its
subtypes).
|
<T extends FeatureStructure> |
getIndex(String label)
Retrieve an index according to a label.
|
<T extends FeatureStructure> |
getIndex(String label,
Type type)
Retrieve an index according to a label and a type.
|
Iterator<FSIndex<FeatureStructure>> |
getIndexes()
Get all indexes in this repository.
|
Iterator<String> |
getLabels()
Get all labels for all indexes.
|
Iterator<org.apache.uima.cas.impl.LowLevelIndex> |
ll_getIndexes()
Get all indexes in this repository as low level indexes
|
void |
removeAllExcludingSubtypes(Type type)
Remove all instances of just this type, excluding subtypes, from all indexes in the repository view.
|
void |
removeAllIncludingSubtypes(Type type)
Remove all instances of type, including all subtypes from all indexes in the repository view.
|
void |
removeFS(FeatureStructure fs)
Remove a feature structure from all indexes in the repository.
|
<T extends FeatureStructure> FSIndex<T> getIndex(String label)
T
- the Java class associated with the top-most type of the indexlabel
- The name of the index.label
, or null
if no such index
is defined.<T extends FeatureStructure> FSIndex<T> getIndex(String label, Type type) throws CASRuntimeException
T
- The Java class associated with the typelabel
- The name of the index.type
- A subtype of the type of the index.null
if an index with that name doesn't exist.CASRuntimeException
- When type
is not a subtype of the index's type.Iterator<FSIndex<FeatureStructure>> getIndexes()
Iterator<org.apache.uima.cas.impl.LowLevelIndex> ll_getIndexes()
void addFS(FeatureStructure fs)
Important: after you have called addFS()
on a FS, do not change the
values of any features used for indexing. If you do, the index will become corrupted and may be
unusable. If you need to change an index feature value, first call
removeFS()
on the FS, change the feature values, then call
addFS()
again.
fs
- The FS to be added.NullPointerException
- If the fs
parameter is null
.void removeFS(FeatureStructure fs)
fs
- The FS to be removed.NullPointerException
- If the fs
parameter is null
.void removeAllIncludingSubtypes(Type type)
type
- the type to removeNullPointerException
- if the type
parameter is null
.void removeAllExcludingSubtypes(Type type)
type
- the type to removeNullPointerException
- if the type
parameter is null
.<T extends FeatureStructure> FSIterator<T> getAllIndexedFS(Type aType)
T
- The Java class associated with aTypeaType
- The typeaType
and its subtypes, in no particular order.Copyright © 2006–2017 The Apache Software Foundation. All rights reserved.