Package org.biojavax.ontology
Interface ComparableTriple
- 
- All Superinterfaces:
 Annotatable,Changeable,Comparable,Term,Triple
- All Known Implementing Classes:
 SimpleComparableTriple
public interface ComparableTriple extends Triple, Comparable, Changeable
Comparable triples, obviously. Allows them to have descriptors.- Since:
 - 1.5
 - Author:
 - Richard Holland
 
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from interface org.biojava.bio.Annotatable
Annotatable.AnnotationForwarder 
- 
Nested classes/interfaces inherited from interface org.biojava.ontology.Triple
Triple.Impl 
 - 
 
- 
Field Summary
Fields Modifier and Type Field Description static ChangeTypeDESCRIPTOR- 
Fields inherited from interface org.biojava.bio.Annotatable
ANNOTATION 
 - 
 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddDescriptor(ComparableTerm desc)Adds a descriptor.SetgetDescriptors()Returns all descriptors.booleanremoveDescriptor(ComparableTerm desc)Removes a descriptor.voidsetDescriptors(Set descriptors)Clears the current set of descriptors and replaces it with the content of the set passed.- 
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 java.lang.Comparable
compareTo 
- 
Methods inherited from interface org.biojava.ontology.Term
addSynonym, getDescription, getName, getOntology, getSynonyms, removeSynonym, setDescription 
- 
Methods inherited from interface org.biojava.ontology.Triple
equals, getObject, getPredicate, getSubject, hashCode 
 - 
 
 - 
 
- 
- 
Field Detail
- 
DESCRIPTOR
static final ChangeType DESCRIPTOR
 
 - 
 
- 
Method Detail
- 
addDescriptor
void addDescriptor(ComparableTerm desc) throws AlreadyExistsException, IllegalArgumentException, ChangeVetoException
Adds a descriptor. Must not be null.- Parameters:
 desc- the descriptor to add.- Throws:
 ChangeVetoException- in case of objections.AlreadyExistsException- if the descriptor already exists.IllegalArgumentException- if the descriptor is missing.
 
- 
removeDescriptor
boolean removeDescriptor(ComparableTerm desc) throws IllegalArgumentException, ChangeVetoException
Removes a descriptor. Must not be null.- Parameters:
 desc- the descriptor to remove.- Returns:
 - True if it did it, false if the descriptor did not exist.
 - Throws:
 ChangeVetoException- in case of objections.IllegalArgumentException- if the descriptor is missing.
 
- 
setDescriptors
void setDescriptors(Set descriptors) throws ChangeVetoException
Clears the current set of descriptors and replaces it with the content of the set passed.- Parameters:
 descriptors- the set of ComparableTerm descriptors to add.- Throws:
 ChangeVetoException- in case of objections.- See Also:
 ComparableTerm
 
- 
getDescriptors
Set getDescriptors()
Returns all descriptors.- Returns:
 - a set of all ComparableTerm descriptors, possibly empty.
 - See Also:
 ComparableTerm
 
 - 
 
 -