Package org.biojava.bio.seq.db
Interface SequenceDBLite
- All Superinterfaces:
Changeable
- All Known Subinterfaces:
RichSequenceDB
,RichSequenceDBLite
,SequenceDB
- All Known Implementing Classes:
AbstractRichSequenceDB
,AbstractSequenceDB
,AnnotatedSequenceDB
,BioFetchSequenceDB
,BioSQLRichSequenceDB
,BioSQLSequenceDB
,CachingSequenceDB
,DistributedSequenceDB
,DummySequenceDB
,FlatSequenceDB
,GenbankRichSequenceDB
,GenpeptRichSequenceDB
,HashRichSequenceDB
,HashSequenceDB
,IndexedSequenceDB
,NCBISequenceDB
,SequenceDBWrapper
,SubSequenceDB
,ViewingSequenceDB
,WebSequenceDB
A database of sequences. This may have several implementations with
rich behaviour, but basically most of the time you will just use
the interface methods to do stuff. A sequence database contains a
finite number of sequences stored under unique keys.
- Author:
- Matthew Pocock, Gerald Loeffler, Thomas Down
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ChangeType
Signals that sequences are being added to or remove from the database. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSequence
(Sequence seq) Adds a sequence to the database.getName()
Get the name of this sequence database.getSequence
(String id) Retrieve a single sequence by its id.void
removeSequence
(String id) Remove the sequence associated with an ID from the database.Methods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
-
Field Details
-
SEQUENCES
Signals that sequences are being added to or remove from the database. The sequences being removed should be listed in the previous field by id, either as a single String, an array or a Set. The sequences being added should be listed in the change field as either an array Object[] { id, seq}, or a Map of id->seq.
-
-
Method Details
-
getName
Get the name of this sequence database.- Returns:
- the name of the sequence database, which may be null.
-
getSequence
Retrieve a single sequence by its id.- 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
Adds a sequence to the database.- Parameters:
seq
- the Sequence to add- Throws:
IllegalIDException
- if a uniqe ID could not be generated for seqBioException
- if something goes wrong with adding the sequenceChangeVetoException
- if either the database does not allow sequences to be added or the modification was vetoed
-
removeSequence
Remove the sequence associated with an ID from the database.- Parameters:
id
- the ID of the sequence to remove- Throws:
IllegalIDException
- if there is no sequence for the IDBioException
- if something failed while removing the sequence for that IDChangeVetoException
- if either the database does not allow sequences to be removed or the modification was vetoed
-