public class HashRichSequenceDB extends AbstractRichSequenceDB implements RichSequenceDB
BIOENTRYSSEQUENCES| Constructor and Description |
|---|
HashRichSequenceDB()
Generate a HashRichSequenceDB object that will use byName to generate ids for
sequences and have a null name.
|
HashRichSequenceDB(IDMaker idMaker)
Generate a HashRichSequenceDB object that will use idMaker to generate ids for
sequences and have a null name.
|
HashRichSequenceDB(IDMaker idMaker,
String name)
Generate a HashRichSequenceDB object that will use idMaker to generate ids for
sequences and have the requested name.
|
HashRichSequenceDB(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 |
addRichSequence(RichSequence seq)
Add a sequence.
|
protected void |
addRichSequence(String id,
RichSequence seq) |
IDMaker |
getIDMaker()
Retrieve the IDMaker associated with this database.
|
String |
getName()
Get the name of this sequence database.
|
RichSequence |
getRichSequence(String id)
Retrieve a single RichSequence by its id.
|
RichSequenceDB |
getRichSequences(Set ids)
Retrieve multiple RichSequence by its id.
|
RichSequenceDB |
getRichSequences(Set ids,
RichSequenceDB db)
Retrieve multiple RichSequence into a specific sequence database.
|
Set |
ids()
Get an immutable set of all of the IDs in the database.
|
void |
removeSequence(String id)
Remove the sequence associated with an ID from the database.
|
addBioEntry, addSequence, filter, getBioEntry, getBioEntryIterator, getBioEntrys, getBioEntrys, getRichSequenceIterator, getSequence, removeBioEntry, removeRichSequence, sequenceIteratoraddChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRichSequenceIterator, sequenceIteratorfiltergetBioEntryIteratorremoveRichSequenceaddBioEntry, getBioEntry, getBioEntrys, getBioEntrys, removeBioEntryaddSequence, getSequenceaddChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerpublic HashRichSequenceDB()
public HashRichSequenceDB(IDMaker idMaker)
idMaker - the object that will work out the default id for a sequencepublic HashRichSequenceDB(String name)
name - the name for this databasepublic HashRichSequenceDB(IDMaker idMaker, String name)
idMaker - the object that will work out the default id for a sequencename - the name for this databasepublic String getName()
SequenceDBLitegetName in interface SequenceDBLitegetName in interface BioEntryDBLitepublic IDMaker getIDMaker()
public RichSequence getRichSequence(String id) throws BioException, IllegalIDException
RichSequenceDBLitegetRichSequence in interface RichSequenceDBLiteid - the id to retrieve byIllegalIDException - if the database doesn't know about the idBioExceptionpublic RichSequenceDB getRichSequences(Set ids) throws BioException, IllegalIDException
RichSequenceDBLitegetRichSequences in interface RichSequenceDBLiteids - a set of ids to retrieve byIllegalIDException - if the database doesn't know about the idBioExceptionpublic RichSequenceDB getRichSequences(Set ids, RichSequenceDB db) throws BioException, IllegalIDException
RichSequenceDBLitegetRichSequences in interface RichSequenceDBLiteids - a set of ids to retrieve bydb - a database to load the seqs intoIllegalIDException - if the database doesn't know about the idBioExceptionpublic Set ids()
SequenceDBids in interface SequenceDBids in interface BioEntryDBpublic void addRichSequence(RichSequence seq) throws IllegalIDException, BioException, ChangeVetoException
addRichSequence in interface RichSequenceDBLiteaddRichSequence in class AbstractRichSequenceDBseq - the RichSequence to addChangeVetoException - if this addition was vetoedIllegalIDException - if a uniqe ID could not be generated for RichSequenceBioException - if something goes wrong with adding the RichSequenceprotected void addRichSequence(String id, RichSequence seq) throws IllegalIDException, BioException, ChangeVetoException
public void removeSequence(String id) throws IllegalIDException, BioException, ChangeVetoException
SequenceDBLiteremoveSequence in interface SequenceDBLiteremoveSequence in class AbstractRichSequenceDBid - the ID of the sequence to removeIllegalIDException - if there is no sequence for the IDBioException - if something failed while removing the sequence for
that IDChangeVetoException - if either the database does not allow
sequences to be removed or the modification was vetoedCopyright © 2020 BioJava. All rights reserved.