org.biojava.bio.seq.io
Class OrganismParser

java.lang.Object
  extended byorg.biojava.bio.seq.io.SequenceBuilderFilter
      extended byorg.biojava.bio.seq.io.OrganismParser
All Implemented Interfaces:
SeqIOListener, SequenceBuilder

public class OrganismParser
extends SequenceBuilderFilter

A parser that is able to generate Taxon entries for sequence builder event streams.

Author:
Matthew Pocock

Nested Class Summary
static class OrganismParser.Factory
          Factory which wraps SequenceBuilders in an OrganismParser.
 
Field Summary
static java.lang.String PROPERTY_ORGANISM
           
 
Constructor Summary
OrganismParser(SequenceBuilder delegate, TaxonFactory taxonFactory, TaxonParser taxonParser, java.lang.String sciNameKey, java.lang.String commonNameKey, java.lang.String ncbiTaxonKey)
           
 
Method Summary
 void addSequenceProperty(java.lang.Object sciNameKey, java.lang.Object value)
          Notify the listener of a sequence-wide property.
 void endSequence()
          Notify the listener that processing of the sequence is complete.
 
Methods inherited from class org.biojava.bio.seq.io.SequenceBuilderFilter
addFeatureProperty, addSymbols, endFeature, getDelegate, makeSequence, setName, setURI, startFeature, startSequence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_ORGANISM

public static final java.lang.String PROPERTY_ORGANISM
Constructor Detail

OrganismParser

public OrganismParser(SequenceBuilder delegate,
                      TaxonFactory taxonFactory,
                      TaxonParser taxonParser,
                      java.lang.String sciNameKey,
                      java.lang.String commonNameKey,
                      java.lang.String ncbiTaxonKey)
Method Detail

addSequenceProperty

public void addSequenceProperty(java.lang.Object sciNameKey,
                                java.lang.Object value)
                         throws ParseException
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
Overrides:
addSequenceProperty in class SequenceBuilderFilter
Throws:
ParseException

endSequence

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

Specified by:
endSequence in interface SeqIOListener
Overrides:
endSequence in class SequenceBuilderFilter
Throws:
ParseException