org.biojavax.ontology
Interface ComparableTerm

All Superinterfaces:
Annotatable, Changeable, Comparable, RankedCrossRefable, Term
All Known Implementing Classes:
SimpleComparableTerm

public interface ComparableTerm
extends Term, RankedCrossRefable, Comparable, Changeable

Makes Term objects comparable properly and adds some extra features to them.

Since:
1.5
Author:
Richard Holland

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
static ChangeType DESCRIPTION
           
static ChangeType IDENTIFIER
           
static ChangeType OBSOLETE
           
static ChangeType RANKEDCROSSREF
           
 
Fields inherited from interface org.biojava.ontology.Term
ONTOLOGY
 
Fields inherited from interface org.biojava.bio.Annotatable
ANNOTATION
 
Method Summary
 String getIdentifier()
          Returns the (optional) identifier associated with this term.
 Boolean getObsolete()
          Checks to see if this term is obsolete.
 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.
 
Methods inherited from interface org.biojava.ontology.Term
addSynonym, getDescription, getName, getOntology, getSynonyms, removeSynonym
 
Methods inherited from interface org.biojava.bio.Annotatable
getAnnotation
 
Methods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
 
Methods inherited from interface org.biojavax.RankedCrossRefable
addRankedCrossRef, getRankedCrossRefs, removeRankedCrossRef, setRankedCrossRefs
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

IDENTIFIER

static final ChangeType IDENTIFIER

OBSOLETE

static final ChangeType OBSOLETE

DESCRIPTION

static final ChangeType DESCRIPTION

RANKEDCROSSREF

static final ChangeType RANKEDCROSSREF
Method Detail

getIdentifier

String getIdentifier()
Returns the (optional) identifier associated with this term.

Returns:
the string identifier.

setIdentifier

void setIdentifier(String identifier)
                   throws ChangeVetoException
Sets the (optional) identifier associated with this term.

Parameters:
identifier - the identifier to give the term. Null will unset it.
Throws:
ChangeVetoException - if the identifier is unacceptable.

getObsolete

Boolean getObsolete()
Checks to see if this term is obsolete. As the column in the database is nullable, this value is a Boolean object instead of a boolean simple type. Hence it may also be null.

Returns:
true if it is, false if not.

setObsolete

void setObsolete(Boolean obsolete)
                 throws ChangeVetoException
Sets the obsolescence flag associated with this term.

Parameters:
obsolete - true if it is obsolete, false if not. Nullable.
Throws:
ChangeVetoException - if the change is unacceptable.

setDescription

void setDescription(String description)
                    throws ChangeVetoException
Sets the description associated with this term.

Specified by:
setDescription in interface Term
Parameters:
description - the description to give the term. Nullable.
Throws:
ChangeVetoException - if the description is unacceptable.