|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FSIndexRepository
Repository of indexes over feature structures. Use this interface to access previously defined indexes.
Method Summary | |
---|---|
void |
addFS(FeatureStructure fs)
Add a feature structure to all appropriate indexes in the repository. |
FSIterator<FeatureStructure> |
getAllIndexedFS(Type aType)
Gets an iterator over all indexed FeatureStructures of the specified Type (and any of its subtypes). |
FSIndex<FeatureStructure> |
getIndex(String label)
Retrieve an index according to a label. |
FSIndex<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. |
void |
removeFS(FeatureStructure fs)
Remove a feature structure from all indexes in the repository. |
Method Detail |
---|
FSIndex<FeatureStructure> getIndex(String label)
label
- The name of the index.
label
, or null
if no such index
is defined.FSIndex<FeatureStructure> getIndex(String label, Type type) throws CASRuntimeException
label
- 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<String> getLabels()
Iterator<FSIndex<FeatureStructure>> 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
.FSIterator<FeatureStructure> getAllIndexedFS(Type aType)
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).
aType
- The type
aType
,
in no particular order.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |