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, removeChangeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddSynonym, getDescription, getName, getOntology, getSynonyms, removeSynonymgetAnnotationaddChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerprotected 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 AbstractChangeablepublic void setDescription(String description)
TermsetDescription in interface TermCopyright © 2020 BioJava. All rights reserved.