public class HashBioEntryDB extends AbstractBioEntryDB implements BioEntryDB
BIOENTRYS
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
getBioEntryIterator
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBioEntryIterator
public HashBioEntryDB()
public HashBioEntryDB(String name)
name
- the name for this databasepublic String getName()
BioEntryDBLite
getName
in interface BioEntryDBLite
public BioEntry getBioEntry(String id) throws BioException, IllegalIDException
BioEntryDBLite
getBioEntry
in interface BioEntryDBLite
id
- the id to retrieve byIllegalIDException
- if the database doesn't know about the idBioException
- if there was a failure in retrieving the BioEntrypublic BioEntryDB getBioEntrys(Set ids) throws BioException, IllegalIDException
BioEntryDBLite
getBioEntrys
in interface BioEntryDBLite
ids
- a set of ids to retrieve byIllegalIDException
- if the database doesn't know about the idBioException
public BioEntryDB getBioEntrys(Set ids, BioEntryDB db) throws BioException, IllegalIDException
BioEntryDBLite
getBioEntrys
in interface BioEntryDBLite
ids
- a set of ids to retrieve bydb
- a database to load the seqs intoIllegalIDException
- if the database doesn't know about the idBioException
public Set ids()
BioEntryDB
ids
in interface BioEntryDB
public void addBioEntry(BioEntry seq) throws IllegalIDException, BioException, ChangeVetoException
addBioEntry
in interface BioEntryDBLite
addBioEntry
in class AbstractBioEntryDB
seq
- the BioEntry to addChangeVetoException
- if this addition was vetoedIllegalIDException
- if a uniqe ID could not be generated for BioEntryBioException
- if something goes wrong with adding the BioEntryprotected void addBioEntry(String id, BioEntry seq) throws IllegalIDException, BioException, ChangeVetoException
public void removeBioEntry(String id) throws IllegalIDException, BioException, ChangeVetoException
BioEntryDBLite
removeBioEntry
in interface BioEntryDBLite
removeBioEntry
in class AbstractBioEntryDB
id
- the ID of the BioEntry to removeIllegalIDException
- 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 vetoedCopyright © 2014 BioJava. All rights reserved.