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
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
-
-
Field Summary
-
Fields inherited from interface org.biojavax.bio.db.BioEntryDBLite
BIOENTRYS
-
-
Constructor Summary
Constructors Constructor Description AbstractBioEntryDB()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBioEntry(BioEntry seq)
Adds a sequence to the database.BioEntryIterator
getBioEntryIterator()
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 Detail
-
AbstractBioEntryDB
public AbstractBioEntryDB()
-
-
Method Detail
-
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 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
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 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
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 interfaceBioEntryDB
- Returns:
- a BioEntryIterator over all BioEntrys
-
-