org.biojavax.bio.taxa.io
Interface NCBITaxonomyLoader

All Known Implementing Classes:
SimpleNCBITaxonomyLoader

public interface NCBITaxonomyLoader

Implementors are able to load taxonomy files and generate sets of NCBITaxon objects that represent them. Taxon objects should be generated using RichObjectFactory.

Since:
1.5
Author:
Richard Holland

Method Summary
 NCBITaxon readName(BufferedReader names)
          Reads the next entry from the names.dmp file and returns the corresponding NCBITaxon object with the name added in already.
 NCBITaxon readNode(BufferedReader nodes)
          Reads the next entry from the nodes.dmp file and returns the corresponding NCBITaxon object.
 

Method Detail

readNode

NCBITaxon readNode(BufferedReader nodes)
                   throws IOException,
                          ParseException
Reads the next entry from the nodes.dmp file and returns the corresponding NCBITaxon object.

Parameters:
nodes - something that reads the nodes.dmp file
Returns:
the next NCBITaxon object in the file, or null if the file has ended.
Throws:
IOException
ParseException

readName

NCBITaxon readName(BufferedReader names)
                   throws IOException,
                          ParseException
Reads the next entry from the names.dmp file and returns the corresponding NCBITaxon object with the name added in already. Note that this does not clear out existing names from the taxon, it only adds them. Use the code snippet below if you want to clear out the names first: for (Iterator i = taxon.getNameClasses().iterator(); i.hasNext(); ) { taxon.getNames((String)i.next()).clear(); }

Parameters:
names - something that reads the names.dmp file
Returns:
the NCBITaxon object corresponding to the next entry in the file, or null if the file has ended.
Throws:
IOException
ParseException