public abstract class AbstractTerm extends AbstractChangeable implements Term
Annotatable.AnnotationForwarder
Modifier and Type | Field and Description |
---|---|
protected String |
description |
ANNOTATION
Constructor and Description |
---|
AbstractTerm() |
Modifier and Type | Method and Description |
---|---|
ChangeSupport |
getChangeSupport(ChangeType ct)
Called to retrieve the ChangeSupport for this object.
|
void |
setDescription(String description)
set the description of the term;
|
addChangeListener, addChangeListener, generateChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addSynonym, getDescription, getName, getOntology, getSynonyms, removeSynonym
getAnnotation
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
protected String description
public AbstractTerm()
public ChangeSupport getChangeSupport(ChangeType ct)
AbstractChangeable
Your implementation of this method should have the following structure:
It is usual for the forwarding listeners (someForwarder in this example) to
be transient and lazily instantiated. Be sure to register & unregister the
forwarder in the code that does the ChangeEvent handling in setter methods.
ChangeSupport cs = super.getChangeSupport(ct);
if(someForwarder == null && ct.isMatching(SomeInterface.SomeChangeType)) {
someForwarder = new ChangeForwarder(...
this.stateVariable.addChangeListener(someForwarder, VariableInterface.AChange);
}
return cs;
getChangeSupport
in class AbstractChangeable
public void setDescription(String description)
Term
setDescription
in interface Term
Copyright © 2014 BioJava. All rights reserved.