public class DASSequenceDB extends Unchangeable implements SequenceDB
Collection of sequences retrieved from the DAS network.
The DAS-specific parts of this API are still subject to change.
SEQUENCES
Constructor and Description |
---|
DASSequenceDB(java.net.URL dataSourceURL) |
Modifier and Type | Method and Description |
---|---|
void |
addSequence(Sequence seq)
Adds a sequence to the database.
|
SequenceDBLite |
allEntryPointsDB() |
FeatureHolder |
filter(FeatureFilter ff)
Query features attached to all sequences in this database.
|
java.lang.String |
getName()
Get the name of this sequence database.
|
Sequence |
getSequence(java.lang.String id)
Retrieve a single sequence by its id.
|
java.net.URL |
getURL()
Return the URL of the reference server for this database.
|
java.util.Set |
ids()
Get an immutable set of all of the IDs in the database.
|
void |
removeSequence(java.lang.String id)
Remove the sequence associated with an ID from the database.
|
SequenceIterator |
sequenceIterator()
Returns a SequenceIterator over all sequences in 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 DASSequenceDB(java.net.URL dataSourceURL) throws BioException
BioException
public FeatureHolder filter(FeatureFilter ff)
SequenceDB
filter
to all
sequences then merging the results.filter
in interface SequenceDB
ff
- a FeatureFilter
.public SequenceDBLite allEntryPointsDB()
public java.net.URL getURL()
public java.lang.String getName()
SequenceDBLite
getName
in interface SequenceDBLite
public Sequence getSequence(java.lang.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 sequencepublic java.util.Set ids()
SequenceDB
ids
in interface SequenceDB
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(java.lang.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 SequenceIterator sequenceIterator()
SequenceDB
sequenceIterator
in interface SequenceDB