org.biojava.bio.taxa
Class EbiFormat
java.lang.Object
org.biojava.bio.taxa.EbiFormat
- All Implemented Interfaces:
- TaxonParser
- public class EbiFormat
- extends Object
- implements TaxonParser
Encapsulate the 'EBI' species format used in Embl, Genbank and Swissprot
files. The Taxon objects created by this process have the following annotations:
key=PROPERTY_NCBI_TAXON, value=String representation of the NCBI taxon id
key=PROPERTY_TAXON_NAMES, value=Map from name-class to name (see ncbi names.dmp)
- Author:
- Matthew Pocock, Len Trigg
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_NCBI_TAXON
public static final String PROPERTY_NCBI_TAXON
PROPERTY_TAXON_NAMES
public static final String PROPERTY_TAXON_NAMES
EbiFormat
public EbiFormat()
getInstance
public static final EbiFormat getInstance()
parse
public Taxon parse(TaxonFactory taxonFactory,
String taxonString)
throws ChangeVetoException,
CircularReferenceException
- Description copied from interface:
TaxonParser
- Convert a stringified Taxon into a Taxon instance.
- Specified by:
parse in interface TaxonParser
- Parameters:
taxonFactory - the TaxonFactory used to instantiate taxa instancestaxonString - the String to parse
- Returns:
- a Taxon instance created by the TaxonFactory from the taxonString
- Throws:
ChangeVetoException
CircularReferenceException
serialize
public String serialize(Taxon taxon)
- Description copied from interface:
TaxonParser
- Convert a Taxon into a stringified representation.
- Specified by:
serialize in interface TaxonParser
- Parameters:
taxon - the Taxon to serialize
- Returns:
- the stringified version of Taxon
serializeSource
public String serializeSource(Taxon taxon)
serializeXRef
public String serializeXRef(Taxon taxon)