org.biojava.bio.seq.db.biofetch
public class BioFetchSequenceDB extends Unchangeable implements SequenceDBLite
SEQUENCES
Constructor and Description |
---|
BioFetchSequenceDB(String location,
String dbName)
Construct a BioFetchSequenceDB which connects to the specified
BioFetch server.
|
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.
|
void |
removeSequence(String id)
Remove the sequence associated with an ID from the database.
|
addChangeListener, addChangeListener, addForwarder, getForwarders, getListeners, isUnchanging, removeChangeListener, removeChangeListener, removeForwarder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
public String getName()
SequenceDBLite
getName
in interface SequenceDBLite
public void addSequence(Sequence seq) throws ChangeVetoException
SequenceDBLite
addSequence
in interface SequenceDBLite
seq
- 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 ChangeVetoException
SequenceDBLite
removeSequence
in interface SequenceDBLite
id
- the ID of the sequence to removeChangeVetoException
- if either the database does not allow
sequences to be removed or the modification was vetoedpublic Sequence getSequence(String id) throws BioException, IllegalIDException
SequenceDBLite
getSequence
in interface SequenceDBLite
id
- the id to retrieve byIllegalIDException
- if the database doesn't know about the idBioException
- if there was a failure in retrieving the sequence