org.biojava.bio.seq.io
Interface SequenceBuilder

All Superinterfaces:
SeqIOListener
All Known Implementing Classes:
SequenceBuilderBase, SequenceBuilderFilter

public interface SequenceBuilder
extends SeqIOListener

Interface for objects which accumulate state via SeqIOListener, then construct a Sequence object.

It is possible to build `transducer' objects which implement this interface and pass on filtered notifications to a second, underlying SequenceBuilder. In this case, they should provide a makeSequence method which delegates to the underlying SequenceBuilder.

Note: These are one-shot objects that can be used just once to make one sequence. After that, they should be discarded. The usual way to get a supply of these is via a SequenceBuilderFactory.

Since:
1.1 [newio proposal]
Author:
Thomas Down

Method Summary
 Sequence makeSequence()
          Return the Sequence object which has been constructed by this builder.
 
Methods inherited from interface org.biojava.bio.seq.io.SeqIOListener
addFeatureProperty, addSequenceProperty, addSymbols, endFeature, endSequence, setName, setURI, startFeature, startSequence
 

Method Detail

makeSequence

public Sequence makeSequence()
                      throws BioException
Return the Sequence object which has been constructed by this builder. This method is only expected to succeed after the endSequence() notifier has been called.

Throws:
BioException