org.biojava.bio.taxa
Interface TaxonParser

All Known Implementing Classes:
EbiFormat

public interface TaxonParser

Encapsulate the mapping between Taxon and stringified representations of taxa.

Author:
Matthew Pocock

Method Summary
 Taxon parse(TaxonFactory taxonFactory, String taxonString)
          Convert a stringified Taxon into a Taxon instance.
 String serialize(Taxon taxon)
          Convert a Taxon into a stringified representation.
 

Method Detail

parse

public Taxon parse(TaxonFactory taxonFactory,
                   String taxonString)
            throws ChangeVetoException,
                   CircularReferenceException
Convert a stringified Taxon into a Taxon instance.

Parameters:
taxonFactory - the TaxonFactory used to instantiate taxa instances
taxonString - the String to parse
Returns:
a Taxon instance created by the TaxonFactory from the taxonString
Throws:
ChangeVetoException
CircularReferenceException

serialize

public String serialize(Taxon taxon)
Convert a Taxon into a stringified representation.

Parameters:
taxon - the Taxon to serialize
Returns:
the stringified version of Taxon