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
public interface RichSequenceDBLite extends BioEntryDBLite, SequenceDBLite
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddRichSequence(RichSequence seq)Adds a sequence to the database.RichSequencegetRichSequence(String id)Retrieve a single RichSequence by its id.RichSequenceDBgetRichSequences(Set ids)Retrieve multiple RichSequence by its id.RichSequenceDBgetRichSequences(Set ids, RichSequenceDB db)Retrieve multiple RichSequence into a specific sequence database.voidremoveRichSequence(String id)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 Detail
-
getRichSequence
RichSequence getRichSequence(String id) throws BioException, IllegalIDException
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
RichSequenceDB getRichSequences(Set ids) throws BioException, IllegalIDException
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
RichSequenceDB getRichSequences(Set ids, RichSequenceDB db) throws BioException, IllegalIDException
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
void addRichSequence(RichSequence seq) throws IllegalIDException, BioException, ChangeVetoException
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
void removeRichSequence(String id) throws IllegalIDException, BioException, ChangeVetoException
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
-
-