|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.utils.AbstractChangeable
org.biojava.ontology.OntologyTerm.Impl
public static final class OntologyTerm.Impl
Simple in-memory implementation of a remote ontology term.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.biojava.ontology.OntologyTerm |
---|
OntologyTerm.Impl |
Nested classes/interfaces inherited from interface org.biojava.bio.Annotatable |
---|
Annotatable.AnnotationForwarder |
Field Summary |
---|
Fields inherited from interface org.biojava.ontology.Term |
---|
ONTOLOGY |
Fields inherited from interface org.biojava.bio.Annotatable |
---|
ANNOTATION |
Constructor Summary | |
---|---|
OntologyTerm.Impl(Ontology ontology,
Ontology target)
|
|
OntologyTerm.Impl(Ontology ontology,
Ontology target,
java.lang.Object[] synonyms)
|
Method Summary | |
---|---|
void |
addSynonym(java.lang.Object synonym)
Add a synonym for this term. |
Annotation |
getAnnotation()
Should return the associated annotation object. |
ChangeSupport |
getChangeSupport(ChangeType ct)
Called to retrieve the ChangeSupport for this object. |
java.lang.String |
getDescription()
Return a human-readable description of this term, or the empty string if none is available. |
java.lang.String |
getName()
Return the name of this term. |
Ontology |
getOntology()
Get the remote ontology referenced by this term |
java.lang.Object[] |
getSynonyms()
Return the synonyms for this term. |
Ontology |
getTargetOntology()
|
void |
removeSynonym(java.lang.Object synonym)
Remove a synonym for this term. |
java.lang.String |
toString()
|
Methods inherited from class org.biojava.utils.AbstractChangeable |
---|
addChangeListener, addChangeListener, generateChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.biojava.utils.Changeable |
---|
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener |
Constructor Detail |
---|
public OntologyTerm.Impl(Ontology ontology, Ontology target)
public OntologyTerm.Impl(Ontology ontology, Ontology target, java.lang.Object[] synonyms)
Method Detail |
---|
public void addSynonym(java.lang.Object synonym)
Term
addSynonym
in interface Term
public void removeSynonym(java.lang.Object synonym)
Term
removeSynonym
in interface Term
public java.lang.Object[] getSynonyms()
Term
getSynonyms
in interface Term
public java.lang.String getName()
Term
getName
in interface Term
public java.lang.String getDescription()
Term
getDescription
in interface Term
public Ontology getOntology()
OntologyTerm
getOntology
in interface OntologyTerm
getOntology
in interface Term
public Ontology getTargetOntology()
public java.lang.String toString()
toString
in class java.lang.Object
public Annotation getAnnotation()
Annotatable
getAnnotation
in interface Annotatable
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |