|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojava.utils.AbstractChangeable
org.biojavax.bio.db.AbstractBioEntryDB
org.biojavax.bio.db.HashBioEntryDB
public class HashBioEntryDB
An implementation of RichSequenceDB that uses an underlying HashMap to store the RichSequence objects.
| Field Summary |
|---|
| Fields inherited from interface org.biojavax.bio.db.BioEntryDBLite |
|---|
BIOENTRYS |
| Constructor Summary | |
|---|---|
HashBioEntryDB()
Generate a HashRichSequenceDB object that will use byName to generate ids for sequences and have a null name. |
|
HashBioEntryDB(String name)
Generate a HashRichSequenceDB object that will use byName to generate ids and will have the requested name. |
|
| Method Summary | |
|---|---|
void |
addBioEntry(BioEntry seq)
Add a BioEntry, the name of the BioEntry will be used as the ID |
protected void |
addBioEntry(String id,
BioEntry seq)
|
BioEntry |
getBioEntry(String id)
Retrieve a single BioEntry by its id. |
BioEntryDB |
getBioEntrys(Set ids)
Retrieve multiple BioEntry by their ids. |
BioEntryDB |
getBioEntrys(Set ids,
BioEntryDB db)
Retrieve multiple BioEntry into a specific sequence database. |
String |
getName()
Get the name of this sequence database. |
Set |
ids()
Get an immutable set of all of the IDs in the database. |
void |
removeBioEntry(String id)
Remove the BioEntry associated with an ID from the database. |
| Methods inherited from class org.biojavax.bio.db.AbstractBioEntryDB |
|---|
getBioEntryIterator |
| 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 |
|---|
getBioEntryIterator |
| Constructor Detail |
|---|
public HashBioEntryDB()
public HashBioEntryDB(String name)
name - the name for this database| Method Detail |
|---|
public String getName()
BioEntryDBLite
getName in interface BioEntryDBLite
public BioEntry getBioEntry(String id)
throws BioException,
IllegalIDException
BioEntryDBLite
getBioEntry in interface BioEntryDBLiteid - the id to retrieve by
IllegalIDException - if the database doesn't know about the id
BioException - if there was a failure in retrieving the BioEntry
public BioEntryDB getBioEntrys(Set ids)
throws BioException,
IllegalIDException
BioEntryDBLite
getBioEntrys in interface BioEntryDBLiteids - a set of ids to retrieve by
IllegalIDException - if the database doesn't know about the id
BioException
public BioEntryDB getBioEntrys(Set ids,
BioEntryDB db)
throws BioException,
IllegalIDException
BioEntryDBLite
getBioEntrys in interface BioEntryDBLiteids - a set of ids to retrieve bydb - a database to load the seqs into
IllegalIDException - if the database doesn't know about the id
BioExceptionpublic Set ids()
BioEntryDB
ids in interface BioEntryDB
public void addBioEntry(BioEntry seq)
throws IllegalIDException,
BioException,
ChangeVetoException
addBioEntry in interface BioEntryDBLiteaddBioEntry in class AbstractBioEntryDBseq - the BioEntry to add
ChangeVetoException - if this addition was vetoed
IllegalIDException - if a uniqe ID could not be generated for BioEntry
BioException - if something goes wrong with adding the BioEntry
protected void addBioEntry(String id,
BioEntry seq)
throws IllegalIDException,
BioException,
ChangeVetoException
IllegalIDException
BioException
ChangeVetoException
public void removeBioEntry(String id)
throws IllegalIDException,
BioException,
ChangeVetoException
BioEntryDBLite
removeBioEntry in interface BioEntryDBLiteremoveBioEntry in class AbstractBioEntryDBid - the ID of the BioEntry to remove
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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||