|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.utils.AbstractChangeable
org.biojavax.bio.taxa.SimpleNCBITaxon
public class SimpleNCBITaxon
Reference implementation of NCBITaxon.
Field Summary | |
---|---|
protected Set |
names
|
Fields inherited from interface org.biojavax.bio.taxa.NCBITaxon |
---|
ACRONYM, COMMON, EQUIVALENT, GENETICCODE, HIDDEN, LEFTVALUE, MITOGENETICCODE, NAMES, NODERANK, PARENT, RIGHTVALUE, SCIENTIFIC, SYNONYM |
Constructor Summary | |
---|---|
protected |
SimpleNCBITaxon()
|
|
SimpleNCBITaxon(int NCBITaxID)
Creates a new instance of SimpleNCBITaxon based on the given taxon ID. |
|
SimpleNCBITaxon(Integer NCBITaxID)
Creates a new instance of SimpleNCBITaxon based on the given taxon ID. |
Method Summary | |
---|---|
void |
addName(String nameClass,
String name)
Adds the name to this taxon in the given name class. |
int |
compareTo(Object o)
NCBITaxon objects are compared only by their NCBITaxID fields. |
boolean |
containsName(String nameClass,
String name)
Tests for the presence of a name in a given class. |
boolean |
equals(Object obj)
NCBITaxon objects are equal if their NCBITaxID fields match. |
String |
getDisplayName()
Returns the name of this taxon entry in the form: scientific (common) or if there is no common name: scientific or if there are no scientific names at all, the empty string. |
Integer |
getGeneticCode()
Returns the genetic code of this taxon, which may be null if not known. |
Integer |
getId()
Gets the Hibernate ID. |
Integer |
getLeftValue()
Gets the left value. |
Integer |
getMitoGeneticCode()
Getter for property mitoGeneticCode. |
Set |
getNameClasses()
Returns all the name classes available for a taxon. |
String |
getNameHierarchy()
Returns the taxonomy hierarchy of this taxon entry in the form: most specific; less specific; ...; least specific. |
Set |
getNames(String nameClass)
Returns all the names available for a taxon in a given class. |
protected Set |
getNameSet()
|
protected Map |
getNamesMap()
|
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. |
int |
hashCode()
|
boolean |
isTaxonHidden()
Returns the taxonomy hierarchy of this taxon entry in the form: most specific; less specific; ...; least specific. |
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 |
setId(Integer id)
Sets the Hibernate ID. |
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)
Setter for property nodeRank. |
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() |
String |
toString()
Form: "taxid:[name,name...]" |
Methods inherited from class org.biojava.utils.AbstractChangeable |
---|
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.biojava.utils.Changeable |
---|
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener |
Field Detail |
---|
protected Set names
Constructor Detail |
---|
public SimpleNCBITaxon(int NCBITaxID)
NCBITaxID
- the underlying taxon ID from NCBI.public SimpleNCBITaxon(Integer NCBITaxID)
NCBITaxID
- the underlying taxon ID from NCBI.protected SimpleNCBITaxon()
Method Detail |
---|
public int compareTo(Object o)
compareTo
in interface Comparable
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public Set getNameClasses()
getNameClasses
in interface NCBITaxon
public Set getNames(String nameClass) throws IllegalArgumentException
getNames
in interface NCBITaxon
nameClass
- the name class to retrieve names from.
IllegalArgumentException
- if the name is null.protected Set getNameSet()
public void addName(String nameClass, String name) throws IllegalArgumentException, ChangeVetoException
addName
in interface NCBITaxon
nameClass
- the class to add the name in.name
- the name to add.
IllegalArgumentException
- if the name is null.
ChangeVetoException
- in case of objections.public boolean removeName(String nameClass, String name) throws IllegalArgumentException, ChangeVetoException
removeName
in interface NCBITaxon
nameClass
- the class to remove the name from.name
- the name to remove.
IllegalArgumentException
- if the name is null.
ChangeVetoException
- in case of objections.public boolean containsName(String nameClass, String name) throws IllegalArgumentException
containsName
in interface NCBITaxon
nameClass
- the class to look the name up in.name
- the name to text for existence of.
IllegalArgumentException
- if the name is null.protected final Map getNamesMap()
public Integer getParentNCBITaxID()
getParentNCBITaxID
in interface NCBITaxon
public void setParentNCBITaxID(Integer parent) throws ChangeVetoException
setParentNCBITaxID
in interface NCBITaxon
parent
- New value of property parent.
ChangeVetoException
- in case of objections.public int getNCBITaxID()
getNCBITaxID
in interface NCBITaxon
public String getNodeRank()
getNodeRank
in interface NCBITaxon
public void setNodeRank(String nodeRank) throws ChangeVetoException
setNodeRank
in interface NCBITaxon
nodeRank
- New value of property nodeRank.
ChangeVetoException
- in case of objections.public Integer getGeneticCode()
getGeneticCode
in interface NCBITaxon
public void setGeneticCode(Integer geneticCode) throws ChangeVetoException
setGeneticCode
in interface NCBITaxon
geneticCode
- New value of property geneticCode.
ChangeVetoException
- in case of objections.public Integer getMitoGeneticCode()
getMitoGeneticCode
in interface NCBITaxon
public void setMitoGeneticCode(Integer mitoGeneticCode) throws ChangeVetoException
setMitoGeneticCode
in interface NCBITaxon
mitoGeneticCode
- New value of property mitoGeneticCode.
ChangeVetoException
- in case of objections.public Integer getLeftValue()
getLeftValue
in interface NCBITaxon
public void setLeftValue(Integer leftValue) throws ChangeVetoException
setLeftValue
in interface NCBITaxon
leftValue
- New value of property leftValue.
ChangeVetoException
- in case of objections.public Integer getRightValue()
getRightValue
in interface NCBITaxon
public void setRightValue(Integer rightValue) throws ChangeVetoException
setRightValue
in interface NCBITaxon
rightValue
- New value of property rightValue.
ChangeVetoException
- in case of objections.public String getDisplayName()
getDisplayName
in interface NCBITaxon
public final boolean isTaxonHidden()
isTaxonHidden
in interface NCBITaxon
public final void setTaxonHidden(boolean isTaxonHidden) throws ChangeVetoException
NCBITaxon
setTaxonHidden
in interface NCBITaxon
isTaxonHidden
- - if true it is displayed
ChangeVetoException
public String getNameHierarchy()
getNameHierarchy
in interface NCBITaxon
public String toString()
toString
in class Object
public Integer getId()
public void setId(Integer id)
id
- the Hibernate ID, if using Hibernate.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |