public class DummySequenceDB extends AbstractSequenceDB implements SequenceDB
DummySequenceDB is an implementation which contains
only a DummySequence. It will return the same
DummySequence instance regardless of the sequence id
used to retrieve a sequence.SEQUENCES| Constructor and Description |
|---|
DummySequenceDB(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSequence(Sequence seq)
Adds a sequence to the 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 DummySequenceDB(String name)
public Set ids()
SequenceDBids in interface SequenceDBpublic SequenceIterator sequenceIterator()
SequenceDBsequenceIterator in interface SequenceDBsequenceIterator in class AbstractSequenceDBpublic String getName()
SequenceDBLitegetName in interface SequenceDBLitepublic Sequence getSequence(String id) throws IllegalIDException, BioException
SequenceDBLitegetSequence in interface SequenceDBLiteid - the id to retrieve byIllegalIDException - if the database doesn't know about the idBioException - if there was a failure in retrieving the sequencepublic void addSequence(Sequence seq) throws IllegalIDException, BioException, ChangeVetoException
SequenceDBLiteaddSequence in interface SequenceDBLiteaddSequence in class AbstractSequenceDBseq - the Sequence to addIllegalIDException - if a uniqe ID could not be generated for seqBioException - if something goes wrong with adding the sequenceChangeVetoException - if either the database does not allow
sequences to be added or the modification was vetoedpublic void removeSequence(String id) throws IllegalIDException, 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 © 2014 BioJava. All rights reserved.