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 TypeMethodDescriptionvoid
addSequence
(Sequence sequence) addSequence
always throws aChangeVetoException
as this implementation is immutable.getName()
Get the name of this sequence database.getSequence
(String id) Retrieve a single sequence by its id.void
removeSequence
(String id) removeSequence
always throws aChangeVetoException
as this implementation is immutable.Methods inherited from class org.biojava.utils.Unchangeable
addChangeListener, addChangeListener, addForwarder, getForwarders, getListeners, isUnchanging, removeChangeListener, removeChangeListener, removeForwarder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
-
Constructor Details
-
FlatSequenceDB
- Throws:
IOException
BioException
-
-
Method Details
-
getName
Description copied from interface:SequenceDBLite
Get the name of this sequence database.- Specified by:
getName
in interfaceSequenceDBLite
- Returns:
- the name of the sequence database, which may be null.
-
getSequence
Description copied from interface:SequenceDBLite
Retrieve a single sequence by its id.- Specified by:
getSequence
in 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
addSequence
always throws aChangeVetoException
as this implementation is immutable.- Specified by:
addSequence
in interfaceSequenceDBLite
- Parameters:
sequence
- aSequence
.- Throws:
ChangeVetoException
-
removeSequence
removeSequence
always throws aChangeVetoException
as this implementation is immutable.- Specified by:
removeSequence
in interfaceSequenceDBLite
- Parameters:
id
- aString
.- Throws:
ChangeVetoException
-