|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojava.utils.AbstractChangeable
org.biojavax.ontology.SimpleComparableTerm
public class SimpleComparableTerm
A Term object that can be compared and thus sorted.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.biojava.ontology.Term |
|---|
Term.Impl |
| Nested classes/interfaces inherited from interface org.biojava.bio.Annotatable |
|---|
Annotatable.AnnotationForwarder |
| Field Summary |
|---|
| Fields inherited from interface org.biojavax.ontology.ComparableTerm |
|---|
DESCRIPTION, IDENTIFIER, OBSOLETE, RANKEDCROSSREF |
| Fields inherited from interface org.biojava.ontology.Term |
|---|
ONTOLOGY |
| Fields inherited from interface org.biojava.bio.Annotatable |
|---|
ANNOTATION |
| Constructor Summary | |
|---|---|
protected |
SimpleComparableTerm()
|
| Method Summary | |
|---|---|
void |
addRankedCrossRef(RankedCrossRef crossref)
Adds a ranked cross reference to the existing set. |
void |
addSynonym(Object synonym)
Add a synonym for this term. Synonyms are stored in the database as the results of a toString() operation on each synonym object. |
int |
compareTo(Object o)
Terms are sorted by ontology first, then name. |
boolean |
equals(Object obj)
Two terms are equal if they are in the same ontology and share the same name. |
Annotation |
getAnnotation()
Should return the associated annotation object. ALWAYS RETURNS AN EMPTY ANNOTATION OBJECT |
String |
getDescription()
Return a human-readable description of this term, or the empty string if none is available. |
String |
getIdentifier()
Returns the (optional) identifier associated with this term. |
String |
getName()
Return the name of this term. |
Boolean |
getObsolete()
Checks to see if this term is obsolete. |
Ontology |
getOntology()
Return the ontology in which this term exists. |
Set |
getRankedCrossRefs()
Returns the set of all ranked cross references associated with an object. Warning this method gives access to the original Collection not a copy. |
Object[] |
getSynonyms()
Return the synonyms for this term. |
int |
hashCode()
|
void |
removeRankedCrossRef(RankedCrossRef crossref)
Removes a ranked cross reference from the existing set. |
void |
removeSynonym(Object synonym)
Remove a synonym for this term. |
void |
setDescription(String description)
Sets the description associated with this term. |
void |
setIdentifier(String identifier)
Sets the (optional) identifier associated with this term. |
void |
setObsolete(Boolean obsolete)
Sets the obsolescence flag associated with this term. |
void |
setRankedCrossRefs(Set rankedcrossrefs)
Sets the ranked cross references associated with an object. Warning this method gives access to the original Collection not a copy. |
String |
toString()
Form: "ontology:name [obsolete]" where [obsolete] is optional |
| 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 |
| Constructor Detail |
|---|
protected SimpleComparableTerm()
| Method Detail |
|---|
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int compareTo(Object o)
compareTo in interface Comparablepublic void addSynonym(Object synonym)
addSynonym in interface Termpublic void removeSynonym(Object synonym)
removeSynonym in interface Termpublic Object[] getSynonyms()
getSynonyms in interface Termpublic Set getRankedCrossRefs()
getRankedCrossRefs in interface RankedCrossRefable
public void setRankedCrossRefs(Set rankedcrossrefs)
throws ChangeVetoException
setRankedCrossRefs in interface RankedCrossRefablerankedcrossrefs - a set of RankedCrossRef objects.
ChangeVetoException - if the set was null or any of its contents
were not RankedCrossRef objects.
public void addRankedCrossRef(RankedCrossRef crossref)
throws ChangeVetoException
addRankedCrossRef in interface RankedCrossRefablecrossref - the ranked cross reference to add.
ChangeVetoException - if the parameter is null.
public void removeRankedCrossRef(RankedCrossRef crossref)
throws ChangeVetoException
removeRankedCrossRef in interface RankedCrossRefablecrossref - the ranked cross reference to remove.
ChangeVetoException - if the parameter is null.public String getName()
getName in interface Termpublic String getDescription()
getDescription in interface Term
public void setDescription(String description)
throws ChangeVetoException
setDescription in interface ComparableTermdescription - the description to give the term. Nullable.
ChangeVetoException - if the description is unacceptable.public Ontology getOntology()
getOntology in interface Termpublic String toString()
toString in class Objectpublic Annotation getAnnotation()
getAnnotation in interface Annotatablepublic String getIdentifier()
getIdentifier in interface ComparableTerm
public void setIdentifier(String identifier)
throws ChangeVetoException
setIdentifier in interface ComparableTermidentifier - the identifier to give the term. Null will unset it.
ChangeVetoException - if the identifier is unacceptable.public Boolean getObsolete()
getObsolete in interface ComparableTerm
public void setObsolete(Boolean obsolete)
throws ChangeVetoException
setObsolete in interface ComparableTermobsolete - true if it is obsolete, false if not. Nullable.
ChangeVetoException - if the change is unacceptable.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||