cytoscape.data.annotation
Class OntologyTerm
java.lang.Object
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
OntologyTerm
public OntologyTerm(String name,
int id)
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