public interface IndexStore
Modifier and Type | Method and Description |
---|---|
void |
commit()
Commit the stored indices to permanent storage.
|
Index |
fetch(String id)
Fetch an Index based upon an ID.
|
Set |
getFiles()
Retrieve the Set of files that are currently indexed.
|
SequenceFormat |
getFormat()
Retrieve the format of the index file.
|
Set |
getIDs()
Retrieve the set of all current IDs.
|
String |
getName()
Retrieve the name of this store.
|
SequenceBuilderFactory |
getSBFactory()
Retrieve the SequenceBuilderFactory used to build Sequence instances.
|
SymbolTokenization |
getSymbolParser()
Retrieve the symbol parser used to turn the sequence characters
into Symobl objects.
|
void |
rollback()
Discard all uncommited changes.
|
void |
store(Index indx)
Add the Index to the store.
|
void store(Index indx) throws IllegalIDException, BioException
This method should be transactional. If the store fails, the IndexStore should be left in its original state.
If the file of the Index is not known yet, it is the responsibility of the IndexStore to add it to the set returned by getFiles.
indx
- the Index to addIllegalIDException
- if the index has an invalid ID fieldBioException
- if the store failedvoid commit() throws BioException
BioException
- if for any reason the commit failsvoid rollback()
Index fetch(String id) throws IllegalIDException, BioException
id
- The ID of the sequence Index to retrieveIllegalIDException
- if the ID couldn't be foundBioException
- if the fetch fails in the underlying storage mechanismString getName()
Set getIDs()
This set should either be immutable, or modifiable totally separately from the IndexStore.
SequenceFormat getFormat()
This set should either be immutable, or modifiable totally separately from the IndexStore.
SequenceBuilderFactory getSBFactory()
SymbolTokenization getSymbolParser()
Copyright © 2014 BioJava. All rights reserved.