Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.bio.seq.io
Interface SeqIOListener

All Known Subinterfaces:
  RichSeqIOListener, RichSequenceBuilder, SeqFileFormer, SequenceBuilder

All Known Implementing Classes:
  DebuggingRichSeqIOListener, EmblFileFormer, EmblProcessor, FastaDescriptionLineParser, GenbankFileFormer, GenbankProcessor, OrganismParser, ProteinRefSeqFileFormer, ProteinRefSeqProcessor, RichSeqIOAdapter, SeqIOAdapter, SeqIOFilter, SequenceBuilderBase, SequenceBuilderFilter, SequenceDBSequenceBuilder, SimpleAssemblyBuilder, SimpleRichSequenceBuilder, SimpleSequenceBuilder, SmartSequenceBuilder, SwissprotFileFormer, SwissprotProcessor

    public interface SeqIOListener

Notification interface for objects which listen to a sequence stream parser. More functionality is offered by the `RichSeqIOListener`.

Since:
  1.1
Author:
  Thomas Down, Matthew Pocock
See Also:
  `RichSeqIOListener`

Method Summary
`void` | `addFeatureProperty(Object key, Object value)` Notify the listener of a feature property.
`void` | `addSequenceProperty(Object key, Object value)` Notify the listener of a sequence-wide property.
`void` | `addSymbols(Alphabet alpha, Symbol[] syms, int start, int length)` 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.
`void` | `setName(String name)` Notify the listener that the current sequence is generally known by a particular name.
`void` | `setURI(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.

Method Detail

### startSequence

    void startSequence()
                       throws ParseException

  Start the processing of a sequence. This method exists primarily to enforce the life-cycles of SeqIOListener objects.

  Throws:
    `ParseException`

### endSequence

    void endSequence()
                     throws ParseException

  Notify the listener that processing of the sequence is complete.

  Throws:
    `ParseException`

### setName

    void setName(String name)
                 throws ParseException

  Notify the listener that the current sequence is generally known by a particular name.

  Parameters:
    `name` - the String that should be returned by getName for the sequence being parsed
  Throws:
    `ParseException`

### setURI

    void setURI(String uri)
                throws ParseException

  Notify the listener of a URI identifying the current sequence.

  Throws:
    `ParseException`

### addSymbols

    void addSymbols(Alphabet alpha,
                    Symbol[] syms,
                    int start,
                    int length)
                    throws IllegalAlphabetException

  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

  Parameters:
    `alpha` - The alphabet of the symbol data
    `syms` - An array containing symbols
    `start` - The start offset of valid data within the array
    `length` - The number of valid symbols in the array
  Throws:
    `IllegalAlphabetException` - if we can't cope with this alphabet.

### addSequenceProperty

    void addSequenceProperty(Object key,
                             Object value)
                             throws ParseException

  Notify the listener of a sequence-wide property. This might be stored as an entry in the sequence's annotation bundle.

  Throws:
    `ParseException`

### startFeature

    void startFeature(Feature.Template templ)
                      throws ParseException

  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.

  Throws:
    `ParseException`

### endFeature

    void endFeature()
                    throws ParseException

  Mark the end of data associated with one specific feature.

  Throws:
    `ParseException`

### addFeatureProperty

    void addFeatureProperty(Object key,
                            Object value)
                            throws ParseException

  Notify the listener of a feature property.

  Throws:
    `ParseException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD