## org.biojavax.bio.taxa
Interface NCBITaxon

All Superinterfaces:
  Changeable, Comparable

All Known Implementing Classes:
  SimpleNCBITaxon

    public interface NCBITaxon

extends Comparable, Changeable

Represents an NCBI Taxon entry, a combination of the taxon and taxon_name tables in BioSQL.

Since:
  1.5
Author:
  Mark Schreiber, Richard Holland

Field Summary
`static String` `ACRONYM` Use this to define acronyms for things.
`static String` `COMMON` Use this to define common names for things.
`static String` `EQUIVALENT` Use this to define equivalent names for things.
`static ChangeType` `GENETICCODE`
`static ChangeType` `HIDDEN`
`static ChangeType` `LEFTVALUE`
`static ChangeType` `MITOGENETICCODE`
`static ChangeType` `NAMES`
`static ChangeType` `NODERANK`
`static ChangeType` `PARENT`
`static ChangeType` `RIGHTVALUE`
`static String` `SCIENTIFIC` Use this to define scientific names for things.
`static String` `SYNONYM` Use this to define common names for things.

Method Summary
`void` `addName(String nameClass, String name)` Adds the name to this taxon in the given name class.
`boolean` `containsName(String nameClass, String name)` Tests for the presence of a name in a given class.
`String` `getDisplayName()` Returns the name of this taxon entry in the form: scientific (common) or if there is no common name: scientific
`Integer` `getGeneticCode()` Returns the genetic code of this taxon, which may be null if not known.
`Integer` `getLeftValue()` Gets the left value.
`Integer` `getMitoGeneticCode()` Returns the mitochondrial genetic code of this taxon, which may be null if not known.
`Set` `getNameClasses()` Returns all the name classes available for a taxon.
`String` `getNameHierarchy()` Returns the taxonomy hierarchy of this taxon entry in the form: least specific; more specific; ...; most specific.
`Set` `getNames(String nameClass)` Returns all the names available for a taxon in a given class.
`int` `getNCBITaxID()` Gets the NCBI taxon ID.
`String` `getNodeRank()` Gets the node rank of this taxon.
`Integer` `getParentNCBITaxID()` Returns the parent NCBI taxon ID, if known.
`Integer` `getRightValue()` Gets the right value.
`boolean` `isTaxonHidden()` used in getNameHierarchy() to determine whether this taxonomy level is displayed
`boolean` `removeName(String nameClass, String name)` Removes the name from the given name class.
`void` `setGeneticCode(Integer geneticCode)` Sets the genetic code of this taxon, which may be null, which will unset it.
`void` `setLeftValue(Integer leftValue)` Sets the left value.
`void` `setMitoGeneticCode(Integer mitoGeneticCode)` Sets the mitochondrial genetic code of this taxon, which may be null, which will unset it.
`void` `setNodeRank(String nodeRank)` Sets the node rank of this taxon.
`void` `setParentNCBITaxID(Integer parent)` Sets the parent NCBI taxon ID.
`void` `setRightValue(Integer rightValue)` Sets the right value.
`void` `setTaxonHidden(boolean isTaxonHidden)` determines whether this taxonomy level is displayed in etNameHierarchy()

Methods inherited from interface java.lang.Comparable
`compareTo`

Methods inherited from interface org.biojava.utils.Changeable
`addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener`

Field Detail

### NAMES

    static final ChangeType NAMES

### PARENT

    static final ChangeType PARENT

### NODERANK

    static final ChangeType NODERANK

### GENETICCODE

    static final ChangeType GENETICCODE

### MITOGENETICCODE

    static final ChangeType MITOGENETICCODE

### LEFTVALUE

    static final ChangeType LEFTVALUE

### RIGHTVALUE

    static final ChangeType RIGHTVALUE

### HIDDEN

    static final ChangeType HIDDEN

### SCIENTIFIC

    static final String SCIENTIFIC

  Use this to define scientific names for things. There should usually only be one scientific name for an organism.

  See Also:
    Constant Field Values

### COMMON

    static final String COMMON

  Use this to define common names for things. There can be as many common names as you like.

  See Also:
    Constant Field Values

### SYNONYM

    static final String SYNONYM

  Use this to define common names for things. There can be as many synonyms as you like.

  See Also:
    Constant Field Values

### ACRONYM

    static final String ACRONYM

  Use this to define acronyms for things. There can be as many acronyms as you like.

  See Also:
    Constant Field Values

### EQUIVALENT

    static final String EQUIVALENT

  Use this to define equivalent names for things. There can be as many equivalent names as you like.

  See Also:
    Constant Field Values

Method Detail

### getNameClasses

    Set getNameClasses()

  Returns all the name classes available for a taxon. These are Strings.

  Returns:
    a set of name classes, or the empty set if there are none.

### getNames

    Set getNames(String nameClass)
                 throws IllegalArgumentException

  Returns all the names available for a taxon in a given class. These are Strings.

  Parameters:
    `nameClass` - the name class to retrieve names from.
  Returns:
    a set of names, or the empty set if there are none.
  Throws:
    `IllegalArgumentException` - if the name is null.

### addName

    void addName(String nameClass,
                 String name)
                 throws IllegalArgumentException,
                        ChangeVetoException

  Adds the name to this taxon in the given name class. Neither can be null.

  Parameters:
    `nameClass` - the class to add the name in.
    `name` - the name to add.
  Throws:
    `ChangeVetoException` - in case of objections.
    `IllegalArgumentException` - if the name is null.

### removeName

    boolean removeName(String nameClass,
                       String name)
                       throws IllegalArgumentException,
                              ChangeVetoException

  Removes the name from the given name class. Neither can be null.

  Parameters:
    `nameClass` - the class to remove the name from.
    `name` - the name to remove.
  Returns:
    True if the name was found and removed, false otherwise.
  Throws:
    `ChangeVetoException` - in case of objections.
    `IllegalArgumentException` - if the name is null.

### containsName

    boolean containsName(String nameClass,
                         String name)
                         throws IllegalArgumentException

  Tests for the presence of a name in a given class. Neither can be null.

  Parameters:
    `nameClass` - the class to look the name up in.
    `name` - the name to text for existence of.
  Returns:
    True if the name exists in that class, false otherwise.
  Throws:
    `IllegalArgumentException` - if the name is null.

### getParentNCBITaxID

    Integer getParentNCBITaxID()

  Returns the parent NCBI taxon ID, if known.

  Returns:
    Value of property parent.

### setParentNCBITaxID

    void setParentNCBITaxID(Integer parent)
                            throws ChangeVetoException

  Sets the parent NCBI taxon ID. May be null if not known.

  Parameters:
    `parent` - New value of property parent.
  Throws:
    `ChangeVetoException` - in case of objections.

### getNCBITaxID

    int getNCBITaxID()

  Gets the NCBI taxon ID. This is never null and is immutable, as otherwise we would have no way of distinguishing between various taxa. It should be set by the constructor of an implementation.

  Returns:
    Value of property NCBITaxID.

### getNodeRank

    String getNodeRank()

  Gets the node rank of this taxon. May be null.

  Returns:
    Value of property nodeRank.

### setNodeRank

    void setNodeRank(String nodeRank)
                     throws ChangeVetoException

  Sets the node rank of this taxon. May be null, in which case it is unset.

  Parameters:
    `nodeRank` - New value of property nodeRank.
  Throws:
    `ChangeVetoException` - in case of objections.

### getGeneticCode

    Integer getGeneticCode()

  Returns the genetic code of this taxon, which may be null if not known.

  Returns:
    Value of property geneticCode.

### setGeneticCode

    void setGeneticCode(Integer geneticCode)
                        throws ChangeVetoException

  Sets the genetic code of this taxon, which may be null, which will unset it.

  Parameters:
    `geneticCode` - New value of property geneticCode.
  Throws:
    `ChangeVetoException` - in case of objections.

### getMitoGeneticCode

    Integer getMitoGeneticCode()

  Returns the mitochondrial genetic code of this taxon, which may be null if not known.

  Returns:
    Value of property mitoGeneticCode.

### setMitoGeneticCode

    void setMitoGeneticCode(Integer mitoGeneticCode)
                            throws ChangeVetoException

  Sets the mitochondrial genetic code of this taxon, which may be null, which will unset it.

  Parameters:
    `mitoGeneticCode` - New value of property mitoGeneticCode.
  Throws:
    `ChangeVetoException` - in case of objections.

### getLeftValue

    Integer getLeftValue()

  Gets the left value. May be null.

  Returns:
    Value of property leftValue.

### setLeftValue

    void setLeftValue(Integer leftValue)
                      throws ChangeVetoException

  Sets the left value. May be null.

  Parameters:
    `leftValue` - New value of property leftValue.
  Throws:
    `ChangeVetoException` - in case of objections.

### getRightValue

    Integer getRightValue()

  Gets the right value. May be null.

  Returns:
    Value of property rightValue.

### setRightValue

    void setRightValue(Integer rightValue)
                       throws ChangeVetoException

  Sets the right value. May be null.

  Parameters:
    `rightValue` - New value of property rightValue.
  Throws:
    `ChangeVetoException` - in case of objections.

### getDisplayName

    String getDisplayName()

  Returns the name of this taxon entry in the form: scientific (common) or if there is no common name: scientific

  Returns:
    the display name as described above.

### getNameHierarchy

    String getNameHierarchy()

  Returns the taxonomy hierarchy of this taxon entry in the form: least specific; more specific; ...; most specific. It follows the chain up the tree as far as it can, and will stop at the first one it comes to that returns null for getParentNCBITaxID()

  Returns:
    the display name as described above.

### isTaxonHidden

    boolean isTaxonHidden()

  used in getNameHierarchy() to determine whether this taxonomy level is displayed

### setTaxonHidden

    void setTaxonHidden(boolean isTaxonHidden)
                        throws ChangeVetoException

  determines whether this taxonomy level is displayed in etNameHierarchy()

  Parameters:
    `isTaxonHidden` - - if true it is displayed
  Throws:
    `ChangeVetoException`