Package org.biojavax.bio.db
Interface RichSequenceDBLite
- All Superinterfaces:
BioEntryDBLite
,Changeable
,SequenceDBLite
- All Known Subinterfaces:
RichSequenceDB
- All Known Implementing Classes:
AbstractRichSequenceDB
,BioSQLRichSequenceDB
,GenbankRichSequenceDB
,GenpeptRichSequenceDB
,HashRichSequenceDB
A database of RichSequences. 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 RichSequence database contains a
finite number of RichSequences stored under unique keys.
- Since:
- 1.5
- Author:
- Matthew Pocock, Gerald Loeffler, Thomas Down, Richard Holland
-
Field Summary
Fields inherited from interface org.biojavax.bio.db.BioEntryDBLite
BIOENTRYS
Fields inherited from interface org.biojava.bio.seq.db.SequenceDBLite
SEQUENCES
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a sequence to the database.Retrieve a single RichSequence by its id.getRichSequences
(Set ids) Retrieve multiple RichSequence by its id.getRichSequences
(Set ids, RichSequenceDB db) Retrieve multiple RichSequence into a specific sequence database.void
Remove the RichSequence associated with an ID from the database.Methods inherited from interface org.biojavax.bio.db.BioEntryDBLite
addBioEntry, getBioEntry, getBioEntrys, getBioEntrys, getName, removeBioEntry
Methods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
Methods inherited from interface org.biojava.bio.seq.db.SequenceDBLite
addSequence, getName, getSequence, removeSequence
-
Method Details
-
getRichSequence
Retrieve a single RichSequence 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
-
getRichSequences
Retrieve multiple RichSequence by its id.- Parameters:
ids
- a set of ids to retrieve by- Returns:
- the RichSequences with that id
- Throws:
IllegalIDException
- if the database doesn't know about the idBioException
-
getRichSequences
Retrieve multiple RichSequence into a specific sequence database. If that database is null, a new HashRichSequenceDB is used.- Parameters:
ids
- a set of ids to retrieve bydb
- a database to load the seqs into- Returns:
- the RichSequences with that id
- Throws:
IllegalIDException
- if the database doesn't know about the idBioException
-
addRichSequence
Adds a sequence to the database.- Parameters:
seq
- the RichSequence to add- Throws:
IllegalIDException
- if a uniqe ID could not be generated for RichSequenceBioException
- if something goes wrong with adding the RichSequenceChangeVetoException
- if either the database does not allow RichSequences to be added or the modification was vetoed
-
removeRichSequence
Remove the RichSequence associated with an ID from the database.- Parameters:
id
- the ID of the RichSequence to remove- Throws:
IllegalIDException
- if there is no RichSequence for the IDBioException
- if something failed while removing the RichSequence for that IDChangeVetoException
- if either the database does not allow RichSequences to be removed or the modification was vetoed
-