Cytoscape 2.6.2 (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)
          Creates a new OntologyTerm object.
 
Method Summary
 void addContainer(int newContainer)
          DOCUMENT ME!
 void addParent(int newParent)
          DOCUMENT ME!
 int[] getContainers()
          DOCUMENT ME!
 int getId()
          DOCUMENT ME!
 String getName()
          DOCUMENT ME!
 int[] getParents()
          DOCUMENT ME!
 int[] getParentsAndContainers()
          DOCUMENT ME!
 boolean isAncestorOf(Ontology ontology, OntologyTerm other)
           
 boolean isChildOf(OntologyTerm other)
          DOCUMENT ME!
 boolean isChildOfOrContainedIn(OntologyTerm other)
          DOCUMENT ME!
 boolean isContainedIn(OntologyTerm other)
          DOCUMENT ME!
 boolean isContainerOf(OntologyTerm other)
          DOCUMENT ME!
 boolean isParentOf(OntologyTerm other)
          DOCUMENT ME!
 boolean isParentOrContainerOf(OntologyTerm other)
          DOCUMENT ME!
 int numberOfContainers()
          DOCUMENT ME!
 int numberOfParents()
          DOCUMENT ME!
 int numberOfParentsAndContainers()
          DOCUMENT ME!
 String toString()
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OntologyTerm

public OntologyTerm(String name,
                    int id)
Creates a new OntologyTerm object.

Parameters:
name - DOCUMENT ME!
id - DOCUMENT ME!
Method Detail

getName

public String getName()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getId

public int getId()
DOCUMENT ME!

Returns:
DOCUMENT ME!

addParent

public void addParent(int newParent)
DOCUMENT ME!

Parameters:
newParent - DOCUMENT ME!

addContainer

public void addContainer(int newContainer)
DOCUMENT ME!

Parameters:
newContainer - DOCUMENT ME!

numberOfParentsAndContainers

public int numberOfParentsAndContainers()
DOCUMENT ME!

Returns:
DOCUMENT ME!

numberOfParents

public int numberOfParents()
DOCUMENT ME!

Returns:
DOCUMENT ME!

numberOfContainers

public int numberOfContainers()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getParents

public int[] getParents()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getContainers

public int[] getContainers()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getParentsAndContainers

public int[] getParentsAndContainers()
DOCUMENT ME!

Returns:
DOCUMENT ME!

isParentOf

public boolean isParentOf(OntologyTerm other)
DOCUMENT ME!

Parameters:
other - DOCUMENT ME!
Returns:
DOCUMENT ME!

isAncestorOf

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

isChildOf

public boolean isChildOf(OntologyTerm other)
DOCUMENT ME!

Parameters:
other - DOCUMENT ME!
Returns:
DOCUMENT ME!

isContainerOf

public boolean isContainerOf(OntologyTerm other)
DOCUMENT ME!

Parameters:
other - DOCUMENT ME!
Returns:
DOCUMENT ME!

isContainedIn

public boolean isContainedIn(OntologyTerm other)
DOCUMENT ME!

Parameters:
other - DOCUMENT ME!
Returns:
DOCUMENT ME!

isChildOfOrContainedIn

public boolean isChildOfOrContainedIn(OntologyTerm other)
DOCUMENT ME!

Parameters:
other - DOCUMENT ME!
Returns:
DOCUMENT ME!

isParentOrContainerOf

public boolean isParentOrContainerOf(OntologyTerm other)
DOCUMENT ME!

Parameters:
other - DOCUMENT ME!
Returns:
DOCUMENT ME!

toString

public String toString()
DOCUMENT ME!

Overrides:
toString in class Object
Returns:
DOCUMENT ME!

www.cytoscape.org