public class SimpleComparableTerm extends AbstractChangeable implements ComparableTerm
Annotatable.AnnotationForwarder
DESCRIPTION, IDENTIFIER, OBSOLETE, RANKEDCROSSREF
ANNOTATION
Modifier | Constructor and Description |
---|---|
protected |
SimpleComparableTerm() |
Modifier and Type | Method and Description |
---|---|
void |
addRankedCrossRef(RankedCrossRef crossref)
Adds a ranked cross reference to the existing set.
|
void |
addSynonym(Object synonym)
Add a synonym for this term.
|
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.
|
String |
getDescription()
Return a human-readable description of this term, or the empty string if
none is available.
|
Integer |
getId()
Gets the Hibernate ID.
|
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.
|
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 |
setId(Integer id)
Sets the Hibernate ID.
|
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.
|
String |
toString()
Form: "ontology:name [obsolete]" where [obsolete] is optional
|
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
protected SimpleComparableTerm()
public boolean equals(Object obj)
public int compareTo(Object o)
compareTo
in interface Comparable
public void addSynonym(Object synonym)
addSynonym
in interface Term
synonym
- the synonympublic void removeSynonym(Object synonym)
removeSynonym
in interface Term
public Object[] getSynonyms()
getSynonyms
in interface Term
public Set getRankedCrossRefs()
getRankedCrossRefs
in interface RankedCrossRefable
public void setRankedCrossRefs(Set rankedcrossrefs) throws ChangeVetoException
setRankedCrossRefs
in interface RankedCrossRefable
rankedcrossrefs
- 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 RankedCrossRefable
crossref
- the ranked cross reference to add.ChangeVetoException
- if the parameter is null.public void removeRankedCrossRef(RankedCrossRef crossref) throws ChangeVetoException
removeRankedCrossRef
in interface RankedCrossRefable
crossref
- the ranked cross reference to remove.ChangeVetoException
- if the parameter is null.public String getDescription()
getDescription
in interface Term
public void setDescription(String description) throws ChangeVetoException
setDescription
in interface Term
setDescription
in interface ComparableTerm
description
- the description to give the term. Nullable.ChangeVetoException
- if the description is unacceptable.public Ontology getOntology()
getOntology
in interface Term
public Annotation getAnnotation()
getAnnotation
in interface Annotatable
public String getIdentifier()
getIdentifier
in interface ComparableTerm
public void setIdentifier(String identifier) throws ChangeVetoException
setIdentifier
in interface ComparableTerm
identifier
- 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 ComparableTerm
obsolete
- true if it is obsolete, false if not. Nullable.ChangeVetoException
- if the change is unacceptable.public Integer getId()
Copyright © 2014 BioJava. All rights reserved.