Package org.biojava.bio.seq.db
Class AbstractSequenceDB
- java.lang.Object
- 
- org.biojava.utils.AbstractChangeable
- 
- org.biojava.bio.seq.db.AbstractSequenceDB
 
 
- 
- All Implemented Interfaces:
- SequenceDB,- SequenceDBLite,- Changeable
 - Direct Known Subclasses:
- AnnotatedSequenceDB,- DistributedSequenceDB,- DummySequenceDB,- HashSequenceDB,- IndexedSequenceDB,- SequenceDBWrapper
 
 public abstract class AbstractSequenceDB extends AbstractChangeable implements SequenceDB An abstract implementation of SequenceDB that provides the sequenceIterator method.- Author:
- Matthew Pocock, Thomas Down
 
- 
- 
Field Summary- 
Fields inherited from interface org.biojava.bio.seq.db.SequenceDBLiteSEQUENCES
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractSequenceDB()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSequence(Sequence seq)Adds a sequence to the database.FeatureHolderfilter(FeatureFilter ff)Query features attached to all sequences in this database.voidremoveSequence(String id)Remove the sequence associated with an ID from the database.SequenceIteratorsequenceIterator()Returns a SequenceIterator over all sequences in the database.- 
Methods inherited from class org.biojava.utils.AbstractChangeableaddChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.biojava.utils.ChangeableaddChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
 - 
Methods inherited from interface org.biojava.bio.seq.db.SequenceDBids
 - 
Methods inherited from interface org.biojava.bio.seq.db.SequenceDBLitegetName, getSequence
 
- 
 
- 
- 
- 
Constructor Detail- 
AbstractSequenceDBpublic AbstractSequenceDB() 
 
- 
 - 
Method Detail- 
sequenceIteratorpublic SequenceIterator sequenceIterator() Description copied from interface:SequenceDBReturns a SequenceIterator over all sequences in the database. The order of retrieval is undefined.- Specified by:
- sequenceIteratorin interface- SequenceDB
- Returns:
- a SequenceIterator over all sequences
 
 - 
filterpublic FeatureHolder filter(FeatureFilter ff) Description copied from interface:SequenceDBQuery features attached to all sequences in this database. This is equivalent to applyingfilterto all sequences then merging the results.- Specified by:
- filterin interface- SequenceDB
- Parameters:
- ff- a- FeatureFilter.
 
 - 
addSequencepublic void addSequence(Sequence seq) throws BioException, ChangeVetoException Description copied from interface:SequenceDBLiteAdds a sequence to the database.- Specified by:
- addSequencein interface- SequenceDBLite
- Parameters:
- seq- the Sequence to add
- Throws:
- IllegalIDException- if a uniqe ID could not be generated for seq
- BioException- if something goes wrong with adding the sequence
- ChangeVetoException- if either the database does not allow sequences to be added or the modification was vetoed
 
 - 
removeSequencepublic void removeSequence(String id) throws BioException, ChangeVetoException Description copied from interface:SequenceDBLiteRemove the sequence associated with an ID from the database.- Specified by:
- removeSequencein interface- SequenceDBLite
- Parameters:
- id- the ID of the sequence to remove
- Throws:
- IllegalIDException- if there is no sequence for the ID
- BioException- if something failed while removing the sequence for that ID
- ChangeVetoException- if either the database does not allow sequences to be removed or the modification was vetoed
 
 
- 
 
-