Package org.biojava.bio.seq.db
Class CachingSequenceDB
java.lang.Object
org.biojava.utils.AbstractChangeable
org.biojava.bio.seq.db.AbstractSequenceDB
org.biojava.bio.seq.db.SequenceDBWrapper
org.biojava.bio.seq.db.CachingSequenceDB
- All Implemented Interfaces:
Serializable,SequenceDB,SequenceDBLite,Changeable
SequenceDB implementation that caches the results of another SequenceDB.
- 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
ConstructorsConstructorDescriptionCachingSequenceDB(SequenceDB parent) Create a new CachingSequenceDB that caches the sequences in parent. -
Method Summary
Methods inherited from class org.biojava.bio.seq.db.SequenceDBWrapper
getChangeSupport, getParentMethods inherited from class org.biojava.bio.seq.db.AbstractSequenceDB
addSequence, filter, removeSequence, sequenceIteratorMethods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
-
Constructor Details
-
CachingSequenceDB
Create a new CachingSequenceDB that caches the sequences in parent.- Parameters:
parent- the SequenceDB to cache
-
-
Method Details
-
getName
Description copied from interface:SequenceDBLiteGet the name of this sequence database.- Returns:
- the name of the sequence database, which may be null.
-
getSequence
Description copied from interface:SequenceDBLiteRetrieve a single sequence by its id.- Parameters:
id- the id to retrieve by- Returns:
- the Sequence with that id
- Throws:
IllegalIDException- if the database doesn't know about the idBioException- if there was a failure in retrieving the sequence
-
ids
Description copied from interface:SequenceDBGet 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
-