Package org.biojava.bio.seq.db.flat
Class FlatSequenceDB
java.lang.Object
org.biojava.utils.Unchangeable
org.biojava.bio.seq.db.flat.FlatSequenceDB
- All Implemented Interfaces:
SequenceDBLite,Changeable
FlatSequenceDB is an OBDA flatfile sequence databank
implementation. It is backed by an index created using the
org.biojava.bio.program.indexdb package.- Author:
- Keith James
-
Field Summary
Fields inherited from interface org.biojava.bio.seq.db.SequenceDBLite
SEQUENCES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSequence(Sequence sequence) addSequencealways throws aChangeVetoExceptionas this implementation is immutable.getName()Get the name of this sequence database.getSequence(String id) Retrieve a single sequence by its id.voidremoveSequence(String id) removeSequencealways throws aChangeVetoExceptionas this implementation is immutable.Methods inherited from class org.biojava.utils.Unchangeable
addChangeListener, addChangeListener, addForwarder, getForwarders, getListeners, isUnchanging, removeChangeListener, removeChangeListener, removeForwarderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
-
Constructor Details
-
FlatSequenceDB
- Throws:
IOExceptionBioException
-
-
Method Details
-
getName
Description copied from interface:SequenceDBLiteGet the name of this sequence database.- Specified by:
getNamein interfaceSequenceDBLite- Returns:
- the name of the sequence database, which may be null.
-
getSequence
Description copied from interface:SequenceDBLiteRetrieve a single sequence by its id.- Specified by:
getSequencein interfaceSequenceDBLite- Parameters:
id- the id to retrieve by- Returns:
- the Sequence with that id
- Throws:
IllegalIDException- if the database doesn't know about the idBioException- if there was a failure in retrieving the sequence
-
addSequence
addSequencealways throws aChangeVetoExceptionas this implementation is immutable.- Specified by:
addSequencein interfaceSequenceDBLite- Parameters:
sequence- aSequence.- Throws:
ChangeVetoException
-
removeSequence
removeSequencealways throws aChangeVetoExceptionas this implementation is immutable.- Specified by:
removeSequencein interfaceSequenceDBLite- Parameters:
id- aString.- Throws:
ChangeVetoException
-