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
public abstract class AbstractBioEntryDB
- extends AbstractChangeable
- implements BioEntryDB
An abstract implementation of BioEntryDB that provides the getBioEntryIterator
method.
- Since:
- 1.5
- Author:
- Matthew Pocock, Thomas Down, Richard Holland
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 |
AbstractBioEntryDB
public AbstractBioEntryDB()
addBioEntry
public void addBioEntry(BioEntry seq)
throws IllegalIDException,
BioException,
ChangeVetoException
- Description copied from interface:
BioEntryDBLite
- Adds a sequence to the database.
- Specified by:
addBioEntry
in interface BioEntryDBLite
- Parameters:
seq
- the BioEntry to add
- Throws:
IllegalIDException
- if a uniqe ID could not be generated for BioEntry
BioException
- if something goes wrong with adding the BioEntry
ChangeVetoException
- if either the database does not allow
BioEntrys to be added or the modification was vetoed
removeBioEntry
public void removeBioEntry(String id)
throws IllegalIDException,
BioException,
ChangeVetoException
- Description copied from interface:
BioEntryDBLite
- Remove the BioEntry associated with an ID from the database.
- Specified by:
removeBioEntry
in interface BioEntryDBLite
- Parameters:
id
- the ID of the BioEntry to remove
- Throws:
IllegalIDException
- if there is no BioEntry for the ID
BioException
- if something failed while removing the BioEntry for
that ID
ChangeVetoException
- if either the database does not allow
BioEntrys to be removed or the modification was vetoed
getBioEntryIterator
public BioEntryIterator 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 interface BioEntryDB
- Returns:
- a BioEntryIterator over all BioEntrys