Package org.biojavax.ontology
Interface ComparableTriple
- All Superinterfaces:
Annotatable
,Changeable
,Comparable
,Term
,Triple
- All Known Implementing Classes:
SimpleComparableTriple
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
FieldsFields inherited from interface org.biojava.bio.Annotatable
ANNOTATION
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDescriptor
(ComparableTerm desc) Adds a descriptor.Returns all descriptors.boolean
Removes a descriptor.void
setDescriptors
(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 Details
-
DESCRIPTOR
-
-
Method Details
-
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
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
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:
-
getDescriptors
Returns all descriptors.- Returns:
- a set of all ComparableTerm descriptors, possibly empty.
- See Also:
-