org.biojava.bio.seq.ragbag
Class RagbagIdleSequenceBuilder

java.lang.Object
  extended byorg.biojava.bio.seq.ragbag.RagbagIdleSequenceBuilder
All Implemented Interfaces:
SeqIOListener, SequenceBuilder

public class RagbagIdleSequenceBuilder
extends java.lang.Object
implements SequenceBuilder

A breakfast cereal of a SequenceBuilder, jes' sits there soakin' up all those events and doin' absolutely nuffin'.

Version:
1.2 [newio proposal]
Author:
David Huen (also doing sod all)

Constructor Summary
RagbagIdleSequenceBuilder()
           
 
Method Summary
 void addFeatureProperty(java.lang.Object key, java.lang.Object value)
          Notify the listener of a feature property.
 void addProperty(Annotation ann, java.lang.Object key, java.lang.Object value)
           
 void addSequenceProperty(java.lang.Object key, java.lang.Object value)
          Notify the listener of a sequence-wide property.
 void addSymbols(Alphabet alpha, Symbol[] syms, int pos, int len)
          Notify the listener of symbol data.
 void endFeature()
          Mark the end of data associated with one specific feature.
 void endSequence()
          Notify the listener that processing of the sequence is complete.
 Sequence makeSequence()
          Return the Sequence object which has been constructed by this builder.
 void setName(java.lang.String name)
          Notify the listener that the current sequence is generally known by a particular name.
 void setURI(java.lang.String uri)
          Notify the listener of a URI identifying the current sequence.
 void startFeature(Feature.Template templ)
          Notify the listener that a new feature object is starting.
 void startSequence()
          Start the processing of a sequence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RagbagIdleSequenceBuilder

public RagbagIdleSequenceBuilder()
Method Detail

startSequence

public void startSequence()
Description copied from interface: SeqIOListener
Start the processing of a sequence. This method exists primarily to enforce the life-cycles of SeqIOListener objects.

Specified by:
startSequence in interface SeqIOListener

endSequence

public void endSequence()
Description copied from interface: SeqIOListener
Notify the listener that processing of the sequence is complete.

Specified by:
endSequence in interface SeqIOListener

setName

public void setName(java.lang.String name)
Description copied from interface: SeqIOListener
Notify the listener that the current sequence is generally known by a particular name.

Specified by:
setName in interface SeqIOListener

setURI

public void setURI(java.lang.String uri)
Description copied from interface: SeqIOListener
Notify the listener of a URI identifying the current sequence.

Specified by:
setURI in interface SeqIOListener

addSymbols

public void addSymbols(Alphabet alpha,
                       Symbol[] syms,
                       int pos,
                       int len)
                throws IllegalAlphabetException
Description copied from interface: SeqIOListener
Notify the listener of symbol data. All symbols passed to this method are guarenteed to be contained within the specified alphabet. Generally all calls to a given Listener should have the same alphabet -- if not, the listener implementation is likely to throw an exception

Specified by:
addSymbols in interface SeqIOListener
Parameters:
alpha - The alphabet of the symbol data
syms - An array containing symbols
pos - The start offset of valid data within the array
len - The number of valid symbols in the array
Throws:
IllegalAlphabetException - if we can't cope with this alphabet.

addSequenceProperty

public void addSequenceProperty(java.lang.Object key,
                                java.lang.Object value)
Description copied from interface: SeqIOListener
Notify the listener of a sequence-wide property. This might be stored as an entry in the sequence's annotation bundle.

Specified by:
addSequenceProperty in interface SeqIOListener

startFeature

public void startFeature(Feature.Template templ)
Description copied from interface: SeqIOListener
Notify the listener that a new feature object is starting. Every call to startFeature should have a corresponding call to endFeature. If the listener is concerned with a hierarchy of features, it should maintain a stack of `open' features.

Specified by:
startFeature in interface SeqIOListener

addFeatureProperty

public void addFeatureProperty(java.lang.Object key,
                               java.lang.Object value)
                        throws ParseException
Description copied from interface: SeqIOListener
Notify the listener of a feature property.

Specified by:
addFeatureProperty in interface SeqIOListener
Throws:
ParseException

endFeature

public void endFeature()
Description copied from interface: SeqIOListener
Mark the end of data associated with one specific feature.

Specified by:
endFeature in interface SeqIOListener

makeSequence

public Sequence makeSequence()
Description copied from interface: SequenceBuilder
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.

Specified by:
makeSequence in interface SequenceBuilder

addProperty

public void addProperty(Annotation ann,
                        java.lang.Object key,
                        java.lang.Object value)