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

cytoscape.data.annotation
Class OntologyTerm

java.lang.Object
  extended by cytoscape.data.annotation.OntologyTerm
All Implemented Interfaces:
Serializable

public class OntologyTerm
extends Object
implements Serializable

Represents one node in an ontology, which is a hierarchical classification of entities using a controlled vocabulary. Each term has a name, a unique integer identifier, a list of parent terms, and a list of containers. Parent terms capture the "is-child-of" relationship for this term. Container terms capture the "is-part-of" relationship. This data model was inspired by the three ontologies (biological process, molecular function, cellular component) of the Gene Ontology project. Other ontologies should work nicely with this class as well.

See Also:
Serialized Form

Constructor Summary
OntologyTerm(String name, int id)
           
 
Method Summary
 void addContainer(int newContainer)
           
 void addParent(int newParent)
           
 int[] getContainers()
           
 int getId()
           
 String getName()
           
 int[] getParents()
           
 int[] getParentsAndContainers()
           
 boolean isAncestorOf(Ontology ontology, OntologyTerm other)
           
 boolean isChildOf(OntologyTerm other)
           
 boolean isChildOfOrContainedIn(OntologyTerm other)
           
 boolean isContainedIn(OntologyTerm other)
           
 boolean isContainerOf(OntologyTerm other)
           
 boolean isParentOf(OntologyTerm other)
           
 boolean isParentOrContainerOf(OntologyTerm other)
           
 int numberOfContainers()
           
 int numberOfParents()
           
 int numberOfParentsAndContainers()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OntologyTerm

public OntologyTerm(String name,
                    int id)
Method Detail

getName

public String getName()

getId

public int getId()

addParent

public void addParent(int newParent)

addContainer

public void addContainer(int newContainer)

numberOfParentsAndContainers

public int numberOfParentsAndContainers()

numberOfParents

public int numberOfParents()

numberOfContainers

public int numberOfContainers()

getParents

public int[] getParents()

getContainers

public int[] getContainers()

getParentsAndContainers

public int[] getParentsAndContainers()

isParentOf

public boolean isParentOf(OntologyTerm other)

isAncestorOf

public boolean isAncestorOf(Ontology ontology,
                            OntologyTerm other)
Parameters:
ontology - the Ontology that contains the terms

isChildOf

public boolean isChildOf(OntologyTerm other)

isContainerOf

public boolean isContainerOf(OntologyTerm other)

isContainedIn

public boolean isContainedIn(OntologyTerm other)

isChildOfOrContainedIn

public boolean isChildOfOrContainedIn(OntologyTerm other)

isParentOrContainerOf

public boolean isParentOrContainerOf(OntologyTerm other)

toString

public String toString()
Overrides:
toString in class Object

www.cytoscape.org