org.jscience.biology.taxonomy
Class SimpleTaxonFactory

java.lang.Object
  extended by org.jscience.biology.taxonomy.SimpleTaxonFactory
All Implemented Interfaces:
TaxonFactory

public class SimpleTaxonFactory
extends java.lang.Object
implements TaxonFactory

A no-frills implementation of TaxonFactory that builds an in-memory Taxon tree.


Field Summary
static SimpleTaxonFactory GLOBAL
          The TaxonFactory that the system should use for storing the taxonomy used by swissprot and embl as in-memory objects.
 
Constructor Summary
SimpleTaxonFactory(java.lang.String name)
          Creates a new SimpleTaxonFactory object.
 
Method Summary
 Taxon addChild(Taxon parent, Taxon child)
          DOCUMENT ME!
 Taxon createTaxon(java.lang.String scientificName, java.lang.String commonName)
          DOCUMENT ME!
 java.lang.String getName()
          DOCUMENT ME!
 Taxon getRoot()
          DOCUMENT ME!
 Taxon importTaxon(Taxon taxon)
          DOCUMENT ME!
 Taxon removeChild(Taxon parent, Taxon child)
          DOCUMENT ME!
 Taxon search(java.lang.Object id)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GLOBAL

public static final SimpleTaxonFactory GLOBAL
The TaxonFactory that the system should use for storing the taxonomy used by swissprot and embl as in-memory objects.

Constructor Detail

SimpleTaxonFactory

public SimpleTaxonFactory(java.lang.String name)
Creates a new SimpleTaxonFactory object.

Parameters:
name - DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!
Method Detail

getRoot

public Taxon getRoot()
DOCUMENT ME!

Specified by:
getRoot in interface TaxonFactory
Returns:
DOCUMENT ME!

getName

public java.lang.String getName()
DOCUMENT ME!

Specified by:
getName in interface TaxonFactory
Returns:
DOCUMENT ME!

importTaxon

public Taxon importTaxon(Taxon taxon)
DOCUMENT ME!

Specified by:
importTaxon in interface TaxonFactory
Parameters:
taxon - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

createTaxon

public Taxon createTaxon(java.lang.String scientificName,
                         java.lang.String commonName)
DOCUMENT ME!

Specified by:
createTaxon in interface TaxonFactory
Parameters:
scientificName - DOCUMENT ME!
commonName - DOCUMENT ME!
Returns:
DOCUMENT ME!

addChild

public Taxon addChild(Taxon parent,
                      Taxon child)
DOCUMENT ME!

Specified by:
addChild in interface TaxonFactory
Parameters:
parent - DOCUMENT ME!
child - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

removeChild

public Taxon removeChild(Taxon parent,
                         Taxon child)
DOCUMENT ME!

Specified by:
removeChild in interface TaxonFactory
Parameters:
parent - DOCUMENT ME!
child - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

search

public Taxon search(java.lang.Object id)
DOCUMENT ME!

Specified by:
search in interface TaxonFactory
Parameters:
id - DOCUMENT ME!
Returns:
DOCUMENT ME!