public class DistributedSequenceDB extends AbstractSequenceDB implements SequenceDB
Modifier and Type | Field and Description |
---|---|
static ChangeType |
DATASOURCE |
static ChangeType |
DATASOURCE_SELECTION |
SEQUENCES
Constructor and Description |
---|
DistributedSequenceDB() |
Modifier and Type | Method and Description |
---|---|
void |
addDataSource(DistDataSource dds)
Add a distributed data source.
|
void |
addSequence(Sequence seq)
Adds a sequence to the database.
|
protected ChangeSupport |
getChangeSupport() |
Set |
getDataSources()
Get the current set of all currently registered data sources.
|
String |
getName()
Get the name of this sequence database.
|
Sequence |
getSequence(String id)
Retrieve a single sequence by its id.
|
protected boolean |
hasChangeSupport() |
Set |
ids()
Get an immutable set of all of the IDs in the database.
|
void |
removeDataSource(DistDataSource dds)
Remove a distributed data source.
|
void |
removeSequence(String id)
Remove the sequence associated with an ID from the database.
|
filter, sequenceIterator
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
filter, sequenceIterator
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
public static final ChangeType DATASOURCE
public static final ChangeType DATASOURCE_SELECTION
public DistributedSequenceDB()
protected boolean hasChangeSupport()
protected ChangeSupport getChangeSupport()
public Set getDataSources()
The returned Set is totaly independant of any future changes made to the distributed sequence DB.
public void addDataSource(DistDataSource dds) throws ChangeVetoException
dds
- the DistDataSource to addChangeVetoException
- if the data source could not be addedpublic void removeDataSource(DistDataSource dds) throws ChangeVetoException
dds
- the DistributedDataSource to removeChangeVetoException
- if the data source could not be removedpublic String getName()
SequenceDBLite
getName
in interface SequenceDBLite
public void addSequence(Sequence seq) throws ChangeVetoException
SequenceDBLite
addSequence
in interface SequenceDBLite
addSequence
in class AbstractSequenceDB
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
removeSequence
in class AbstractSequenceDB
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 IllegalIDException, BioException
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 Set ids()
SequenceDB
ids
in interface SequenceDB
Copyright © 2014 BioJava. All rights reserved.