Package org.biojava.bio.seq.db
Class ViewingSequenceDB
java.lang.Object
org.biojava.utils.AbstractChangeable
org.biojava.bio.seq.db.AbstractSequenceDB
org.biojava.bio.seq.db.SequenceDBWrapper
org.biojava.bio.seq.db.ViewingSequenceDB
- All Implemented Interfaces:
Serializable
,SequenceDB
,SequenceDBLite
,Changeable
SequenceDB implementation that returns new SequenceView instances
wrapping the sequences in an underlying database. One appropriate
use of this would be to wrap a DB in one of these and then wrap
this in an annotating db so that the annotation is added to views,
not the underlying sequences.
- Since:
- 1.2
- Author:
- Matthew Pocock
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.biojava.bio.seq.db.SequenceDBWrapper
SequenceDBWrapper.SequencesForwarder
-
Field Summary
Fields inherited from interface org.biojava.bio.seq.db.SequenceDBLite
SEQUENCES
-
Constructor Summary
ConstructorsConstructorDescriptionViewingSequenceDB
(SequenceDB parent) Create a new ViewingSequenceDB that views the sequences in parent. -
Method Summary
Methods inherited from class org.biojava.bio.seq.db.SequenceDBWrapper
getChangeSupport, getParent
Methods inherited from class org.biojava.bio.seq.db.AbstractSequenceDB
addSequence, filter, removeSequence, sequenceIterator
Methods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
-
Constructor Details
-
ViewingSequenceDB
Create a new ViewingSequenceDB that views the sequences in parent.- Parameters:
parent
- the SequenceDB to view
-
-
Method Details
-
getName
Description copied from interface:SequenceDBLite
Get the name of this sequence database.- Returns:
- the name of the sequence database, which may be null.
-
getSequence
Description copied from interface:SequenceDBLite
Retrieve a single sequence by its id.- Parameters:
id
- the id to retrieve by- Returns:
- the Sequence with that id
- Throws:
BioException
- if there was a failure in retrieving the sequence
-
ids
Description copied from interface:SequenceDB
Get an immutable set of all of the IDs in the database. The ids are legal arguments to getSequence.- Returns:
- a Set of ids - at the moment, strings
-