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 TypeMethodDescriptionvoidaddBioEntry(BioEntry seq) Adds a sequence to the database.Returns a BioEntryIterator over all BioEntrys in the database.voidremoveBioEntry(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, removeChangeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.biojavax.bio.db.BioEntryDB
idsMethods inherited from interface org.biojavax.bio.db.BioEntryDBLite
getBioEntry, getBioEntrys, getBioEntrys, getName
-
Constructor Details
-
AbstractBioEntryDB
public AbstractBioEntryDB()
-
-
Method Details
-
addBioEntry
Description copied from interface:BioEntryDBLiteAdds a sequence to the database.- Specified by:
addBioEntryin 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:BioEntryDBLiteRemove the BioEntry associated with an ID from the database.- Specified by:
removeBioEntryin 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:BioEntryDBReturns a BioEntryIterator over all BioEntrys in the database. The order of retrieval is undefined.- Specified by:
getBioEntryIteratorin interfaceBioEntryDB- Returns:
- a BioEntryIterator over all BioEntrys
-