Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

cytoscape.data.ontology
Class OntologyTerm

java.lang.Object
  extended by org.biojava.utils.AbstractChangeable
      extended by cytoscape.data.ontology.OntologyTerm
All Implemented Interfaces:
org.biojava.bio.Annotatable, org.biojava.ontology.OntologyTerm, org.biojava.ontology.Term, org.biojava.utils.Changeable
Direct Known Subclasses:
GOTerm

public class OntologyTerm
extends org.biojava.utils.AbstractChangeable
implements org.biojava.ontology.OntologyTerm

Simple in-memory implementation of an ontology term based on BioJava's interface.

This implementation uses CyNetwork and CyAttributes as its actual data storage. A term is equal to a CyNode and the node can have attributes like other regular nodes in CyNetwork. Synonyms, description, etc are stored in CyAttributes.

Since:
Cytoscape 2.4
Version:
0.8
Author:
kono

Nested Class Summary
static class OntologyTerm.SynonymType
           
 
Nested classes/interfaces inherited from interface org.biojava.ontology.OntologyTerm
org.biojava.ontology.OntologyTerm.Impl
 
Nested classes/interfaces inherited from interface org.biojava.bio.Annotatable
org.biojava.bio.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(String name, String ontologyName, String description)
          Constructor.
 
Method Summary
 void addSynonym(Object synonym)
          In this implementation, key is the synonym name, and value is the synonym type.
 void addSynonym(Object synonym, OntologyTerm.SynonymType type)
          In this implementation, key is the synonym name, and value is the synonym type.
 org.biojava.bio.Annotation getAnnotation()
          Always return empty annotation object.
 String getDescription()
          Return a human-readable description of this term, or the empty string if none is available.
 String getName()
          Return name (ID) of this term.
 org.biojava.ontology.Ontology getOntology()
          Get ontology object which contains this term.
 Object[] getSynonyms()
          Return sysnonym attributes for this term.
 void removeSynonym(Object synonym)
          Remove a synonym for this term.
 
Methods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
 

Constructor Detail

OntologyTerm

public OntologyTerm(String name,
                    String ontologyName,
                    String description)
Constructor.

Parameters:
name - ID of this term. SHOULD NOT BE NULL.
ontologyName -
description -
Method Detail

getName

public String getName()
Return name (ID) of this term.

Specified by:
getName in interface org.biojava.ontology.Term

getOntology

public org.biojava.ontology.Ontology getOntology()
Get ontology object which contains this term.

Specified by:
getOntology in interface org.biojava.ontology.OntologyTerm
Specified by:
getOntology in interface org.biojava.ontology.Term

addSynonym

public void addSynonym(Object synonym)
In this implementation, key is the synonym name, and value is the synonym type.

Specified by:
addSynonym in interface org.biojava.ontology.Term

addSynonym

public void addSynonym(Object synonym,
                       OntologyTerm.SynonymType type)
In this implementation, key is the synonym name, and value is the synonym type.


getDescription

public String getDescription()
Return a human-readable description of this term, or the empty string if none is available.

Specified by:
getDescription in interface org.biojava.ontology.Term

getSynonyms

public Object[] getSynonyms()
Return sysnonym attributes for this term.

Specified by:
getSynonyms in interface org.biojava.ontology.Term

removeSynonym

public void removeSynonym(Object synonym)
Remove a synonym for this term.

Specified by:
removeSynonym in interface org.biojava.ontology.Term

getAnnotation

public org.biojava.bio.Annotation getAnnotation()
Always return empty annotation object. Instead of using this, use normal Cyattributes API.

Specified by:
getAnnotation in interface org.biojava.bio.Annotatable

www.cytoscape.org