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.AnnotationForwarderNested 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 TypeMethodDescriptionvoidaddDescriptor(ComparableTerm desc) Adds a descriptor.Returns all descriptors.booleanRemoves 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
getAnnotationMethods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.biojava.ontology.Term
addSynonym, getDescription, getName, getOntology, getSynonyms, removeSynonym, setDescriptionMethods 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:
-