|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojava.bio.seq.db.BioIndex
public class BioIndex
The original object for indexing sequence files.
This class may not be thread-safe.
| Constructor Summary | |
|---|---|
BioIndex(File indexDirectory)
Load an existing index file. |
|
BioIndex(File indexDirectory,
String namespace,
int idLength)
|
|
| Method Summary | |
|---|---|
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. |
int |
guessRecLen(RandomAccessFile file)
|
void |
rollback()
Discard all uncommited changes. |
void |
store(Index indx)
Add the Index to the store. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BioIndex(File indexDirectory,
String namespace,
int idLength)
throws IOException,
BioException
IOException
BioException
public BioIndex(File indexDirectory)
throws IOException,
BioException
IOException
BioException| Method Detail |
|---|
public String getName()
IndexStore
getName in interface IndexStore
public int guessRecLen(RandomAccessFile file)
throws IOException
IOException
public Index fetch(String id)
throws IllegalIDException,
BioException
IndexStore
fetch in interface IndexStoreid - The ID of the sequence Index to retrieve
IllegalIDException - if the ID couldn't be found
BioException - if the fetch fails in the underlying storage mechanismpublic void store(Index indx)
IndexStoreThis 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.
store in interface IndexStoreindx - the Index to add
public void commit()
throws BioException
IndexStore
commit in interface IndexStoreBioException - if for any reason the commit failspublic void rollback()
IndexStore
rollback in interface IndexStorepublic Set getIDs()
IndexStoreThis set should either be immutable, or modifiable totally separately from the IndexStore.
getIDs in interface IndexStorepublic Set getFiles()
IndexStore
getFiles in interface IndexStorepublic SequenceFormat getFormat()
IndexStoreThis set should either be immutable, or modifiable totally separately from the IndexStore.
getFormat in interface IndexStorepublic SequenceBuilderFactory getSBFactory()
IndexStore
getSBFactory in interface IndexStorepublic SymbolTokenization getSymbolParser()
IndexStore
getSymbolParser in interface IndexStore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||