public class HashSequenceDB extends AbstractSequenceDB implements SequenceDB, Serializable
SEQUENCES| Constructor and Description |
|---|
HashSequenceDB()
Generate a HashSequenceDB object that will use byName to generate ids for
sequences and have a null name.
|
HashSequenceDB(IDMaker idMaker)
Generate a HashSequenceDB object that will use idMaker to generate ids for
sequences and have a null name.
|
HashSequenceDB(IDMaker idMaker,
String name)
Generate a HashSequenceDB object that will use idMaker to generate ids for
sequences and have the requested name.
|
HashSequenceDB(String name)
Generate a HashSequenceDB object that will use byName to generate ids and
will have the requested name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSequence(Sequence seq)
Adds a sequence to the database.
|
void |
addSequence(String id,
Sequence seq)
Add a sequence under a particular id.
|
IDMaker |
getIDMaker()
Retrieve the IDMaker associated with this database.
|
String |
getName()
Get the name of this sequence database.
|
Sequence |
getSequence(String id)
Retrieve a single sequence by its id.
|
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.
|
SequenceIterator |
sequenceIterator()
Returns a SequenceIterator over all sequences in the database.
|
filteraddChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfilteraddChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerpublic HashSequenceDB()
public HashSequenceDB(IDMaker idMaker)
idMaker - the object that will work out the default id for a sequencepublic HashSequenceDB(String name)
name - the name for this databasepublic HashSequenceDB(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 SequenceDBLitepublic Sequence getSequence(String id) throws IllegalIDException
SequenceDBLitegetSequence in interface SequenceDBLiteid - the id to retrieve byIllegalIDException - if the database doesn't know about the idpublic Set ids()
SequenceDBids in interface SequenceDBpublic SequenceIterator sequenceIterator()
SequenceDBsequenceIterator in interface SequenceDBsequenceIterator in class AbstractSequenceDBpublic void addSequence(String id, Sequence seq) throws ChangeVetoException
id - the id to useseq - the Sequence to addChangeVetoException - if this addition was vetoedpublic IDMaker getIDMaker()
public void addSequence(Sequence seq) throws ChangeVetoException
SequenceDBLiteaddSequence in interface SequenceDBLiteaddSequence in class AbstractSequenceDBseq - the Sequence to addChangeVetoException - if either the database does not allow
sequences to be added or the modification was vetoedpublic void removeSequence(String id) throws BioException, ChangeVetoException
SequenceDBLiteremoveSequence in interface SequenceDBLiteremoveSequence in class AbstractSequenceDBid - 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.