Package org.biojavax.bio.db
Interface BioEntryDBLite
- All Known Subinterfaces:
BioEntryDB
,RichSequenceDB
,RichSequenceDBLite
- All Known Implementing Classes:
AbstractBioEntryDB
,AbstractRichSequenceDB
,BioSQLBioEntryDB
,BioSQLRichSequenceDB
,GenbankRichSequenceDB
,GenpeptRichSequenceDB
,HashBioEntryDB
,HashRichSequenceDB
public interface BioEntryDBLite
A database of BioEntrys. 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 BioEntry database contains a
finite number of BioEntrys stored under unique keys.
- Since:
- 1.5
- Author:
- Matthew Pocock, Gerald Loeffler, Thomas Down, Richard Holland
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ChangeType
Signals that sequences are being added to or remove from the database. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBioEntry
(BioEntry seq) Adds a sequence to the database.getBioEntry
(String id) Retrieve a single BioEntry by its id.getBioEntrys
(Set ids) Retrieve multiple BioEntry by their ids.getBioEntrys
(Set ids, BioEntryDB db) Retrieve multiple BioEntry into a specific sequence database.getName()
Get the name of this sequence database.void
removeBioEntry
(String id) Remove the BioEntry associated with an ID from the database.
-
Field Details
-
BIOENTRYS
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.
-
getBioEntry
Retrieve a single BioEntry by its id.- Parameters:
id
- the id to retrieve by- Returns:
- the BioEntry with that id
- Throws:
IllegalIDException
- if the database doesn't know about the idBioException
- if there was a failure in retrieving the BioEntry
-
getBioEntrys
Retrieve multiple BioEntry by their ids.- Parameters:
ids
- a set of ids to retrieve by- Returns:
- the BioEntrys with those ids
- Throws:
IllegalIDException
- if the database doesn't know about the idBioException
-
getBioEntrys
Retrieve multiple BioEntry into a specific sequence database. If that database is null, a new HashBioEntryDB is used.- Parameters:
ids
- a set of ids to retrieve bydb
- a database to load the seqs into- Returns:
- the BioEntrys with that id
- Throws:
IllegalIDException
- if the database doesn't know about the idBioException
-
addBioEntry
Adds a sequence to the database.- Parameters:
seq
- the BioEntry to add- Throws:
IllegalIDException
- if a uniqe ID could not be generated for BioEntryBioException
- if something goes wrong with adding the BioEntryChangeVetoException
- if either the database does not allow BioEntrys to be added or the modification was vetoed
-
removeBioEntry
Remove the BioEntry associated with an ID from the database.- Parameters:
id
- the ID of the BioEntry to remove- Throws:
IllegalIDException
- if there is no BioEntry for the IDBioException
- if something failed while removing the BioEntry for that IDChangeVetoException
- if either the database does not allow BioEntrys to be removed or the modification was vetoed
-