org.biojava.bio.seq.db
Class SubSequenceDB

java.lang.Object
  extended byorg.biojava.utils.AbstractChangeable
      extended byorg.biojava.bio.seq.db.AbstractSequenceDB
          extended byorg.biojava.bio.seq.db.SequenceDBWrapper
              extended byorg.biojava.bio.seq.db.SubSequenceDB
All Implemented Interfaces:
Changeable, SequenceDB, SequenceDBLite, java.io.Serializable

public class SubSequenceDB
extends SequenceDBWrapper

Author:
Matthew Pocock
See Also:
Serialized Form

Nested Class Summary
 
Nested classes 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
SubSequenceDB(SequenceDB parent, java.util.Set ids)
           
 
Method Summary
 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.util.Set ids()
          Get an immutable set of all of the IDs in the database.
 
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, 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 Detail

SubSequenceDB

public SubSequenceDB(SequenceDB parent,
                     java.util.Set ids)
              throws BioException
Method Detail

getName

public java.lang.String 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

public Sequence getSequence(java.lang.String id)
                     throws BioException
Description copied from interface: SequenceDBLite
Retrieve a single sequence by its id.

Returns:
the Sequence with that id
Throws:
BioException - if there was a failure in retrieving the sequence

ids

public java.util.Set 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