Package org.biojavax.bio.db
Class AbstractBioEntryDB
java.lang.Object
org.biojava.utils.AbstractChangeable
org.biojavax.bio.db.AbstractBioEntryDB
- All Implemented Interfaces:
Changeable
,BioEntryDB
,BioEntryDBLite
- Direct Known Subclasses:
AbstractRichSequenceDB
,BioSQLBioEntryDB
,HashBioEntryDB
An abstract implementation of BioEntryDB that provides the getBioEntryIterator
method.
- Since:
- 1.5
- Author:
- Matthew Pocock, Thomas Down, Richard Holland
-
Field Summary
Fields inherited from interface org.biojavax.bio.db.BioEntryDBLite
BIOENTRYS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBioEntry
(BioEntry seq) Adds a sequence to the database.Returns a BioEntryIterator over all BioEntrys in the database.void
removeBioEntry
(String id) Remove the BioEntry associated with an ID from the database.Methods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.biojavax.bio.db.BioEntryDB
ids
Methods inherited from interface org.biojavax.bio.db.BioEntryDBLite
getBioEntry, getBioEntrys, getBioEntrys, getName
-
Constructor Details
-
AbstractBioEntryDB
public AbstractBioEntryDB()
-
-
Method Details
-
addBioEntry
Description copied from interface:BioEntryDBLite
Adds a sequence to the database.- Specified by:
addBioEntry
in interfaceBioEntryDBLite
- 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
Description copied from interface:BioEntryDBLite
Remove the BioEntry associated with an ID from the database.- Specified by:
removeBioEntry
in interfaceBioEntryDBLite
- 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
-
getBioEntryIterator
Description copied from interface:BioEntryDB
Returns a BioEntryIterator over all BioEntrys in the database. The order of retrieval is undefined.- Specified by:
getBioEntryIterator
in interfaceBioEntryDB
- Returns:
- a BioEntryIterator over all BioEntrys
-