Ontology
interface from BioJava project.
This class representes a general and simple ontology class. This
implementation uses
CyNetwork and CyAttributes for its actual data storage.
- Since:
- Cytoscape 2.4
- Version:
- 0.8
- Author:
- kono
- See Also:
org.biojava.ontology
Nested classes/interfaces inherited from interface org.biojava.ontology.Ontology |
org.biojava.ontology.Ontology.Impl |
Fields inherited from interface org.biojava.ontology.Ontology |
TERM, TRIPLE |
Method Summary |
void |
add(OntologyTerm newTerm)
Add a new ontology term to the DAG. |
boolean |
containsTerm(String id)
|
boolean |
containsTriple(org.biojava.ontology.Term subject,
org.biojava.ontology.Term object,
org.biojava.ontology.Term predicate)
See if a triple exists in this ontology. |
org.biojava.ontology.Term |
createTerm(String name,
String description)
Create a new term in this ontology. |
org.biojava.ontology.Term |
createTerm(String arg0,
String arg1,
Object[] arg2)
DOCUMENT ME! |
org.biojava.ontology.Triple |
createTriple(org.biojava.ontology.Term subject,
org.biojava.ontology.Term object,
org.biojava.ontology.Term predicate,
String name,
String description)
DOCUMENT ME! |
org.biojava.ontology.Variable |
createVariable(String arg0,
String arg1)
DOCUMENT ME! |
void |
deleteTerm(org.biojava.ontology.Term arg0)
Delete a term from DAG (CyNetwork) |
String |
getCurator()
|
String |
getDescription()
DOCUMENT ME! |
String |
getName()
Returns name (actually, an ID). |
org.biojava.ontology.OntologyOps |
getOps()
DOCUMENT ME! |
OntologyTerm |
getTerm(String id)
Fetch the term with the specified name. |
Set |
getTerms()
Return all the terms in this ontology. |
Set |
getTriples(org.biojava.ontology.Term arg0,
org.biojava.ontology.Term arg1,
org.biojava.ontology.Term arg2)
returns set of Triples. |
org.biojava.ontology.Term |
importTerm(org.biojava.ontology.Term arg0,
String arg1)
DOCUMENT ME! |
int |
size()
|
String |
toString()
|
Methods inherited from class org.biojava.utils.AbstractChangeable |
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener |
Methods inherited from interface org.biojava.utils.Changeable |
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener |
IS_ONTOLOGY
public static final String IS_ONTOLOGY
- See Also:
- Constant Field Values
Ontology
public Ontology(String name)
- Constructor.
Creates null network for this ontology.
- Parameters:
name
- Name of this ontology. Will be used as ID.
- Throws:
URISyntaxException
Ontology
public Ontology(String name,
String curator,
String description,
CyNetwork dag)
- Constructor.
Takes CyNetwork as its DAG.
- Parameters:
name
- curator
- description
- dag
-
- Throws:
URISyntaxException
URISyntaxException
getName
public String getName()
- Returns name (actually, an ID).
- Specified by:
getName
in interface org.biojava.ontology.Ontology
- Returns:
- Name of the ontology as string
getCurator
public String getCurator()
- Returns:
- Curator as string
add
public void add(OntologyTerm newTerm)
- Add a new ontology term to the DAG.
- Parameters:
newTerm
-
size
public int size()
- Returns:
- Number of ontology terms in this ontology.
getTerms
public Set getTerms()
- Return all the terms in this ontology.
- Specified by:
getTerms
in interface org.biojava.ontology.Ontology
- Returns:
- All ontology terms as Set object.
containsTerm
public boolean containsTerm(String id)
- Specified by:
containsTerm
in interface org.biojava.ontology.Ontology
- Returns:
- true if the term is in the DAG.
getTerm
public OntologyTerm getTerm(String id)
- Fetch the term with the specified name.
- Specified by:
getTerm
in interface org.biojava.ontology.Ontology
- Returns:
- The term named
name
- Throws:
NoSuchElementException
- if no term exists with that name
toString
public String toString()
- Overrides:
toString
in class Object
containsTriple
public boolean containsTriple(org.biojava.ontology.Term subject,
org.biojava.ontology.Term object,
org.biojava.ontology.Term predicate)
- See if a triple exists in this ontology.
- Specified by:
containsTriple
in interface org.biojava.ontology.Ontology
createTerm
public org.biojava.ontology.Term createTerm(String name,
String description)
throws org.biojava.ontology.AlreadyExistsException,
org.biojava.utils.ChangeVetoException,
IllegalArgumentException
- Create a new term in this ontology.
- Specified by:
createTerm
in interface org.biojava.ontology.Ontology
- Throws:
org.biojava.ontology.AlreadyExistsException
org.biojava.utils.ChangeVetoException
IllegalArgumentException
createTerm
public org.biojava.ontology.Term createTerm(String arg0,
String arg1,
Object[] arg2)
throws org.biojava.ontology.AlreadyExistsException,
org.biojava.utils.ChangeVetoException,
IllegalArgumentException
- DOCUMENT ME!
- Specified by:
createTerm
in interface org.biojava.ontology.Ontology
- Parameters:
arg0
- DOCUMENT ME!arg1
- DOCUMENT ME!arg2
- DOCUMENT ME!
- Returns:
- DOCUMENT ME!
- Throws:
org.biojava.ontology.AlreadyExistsException
- DOCUMENT ME!
org.biojava.utils.ChangeVetoException
- DOCUMENT ME!
IllegalArgumentException
- DOCUMENT ME!
createTriple
public org.biojava.ontology.Triple createTriple(org.biojava.ontology.Term subject,
org.biojava.ontology.Term object,
org.biojava.ontology.Term predicate,
String name,
String description)
throws org.biojava.ontology.AlreadyExistsException,
org.biojava.utils.ChangeVetoException
- DOCUMENT ME!
- Specified by:
createTriple
in interface org.biojava.ontology.Ontology
- Parameters:
subject
- DOCUMENT ME!object
- DOCUMENT ME!predicate
- DOCUMENT ME!name
- DOCUMENT ME!description
- DOCUMENT ME!
- Returns:
- DOCUMENT ME!
- Throws:
org.biojava.ontology.AlreadyExistsException
- DOCUMENT ME!
org.biojava.utils.ChangeVetoException
- DOCUMENT ME!
createVariable
public org.biojava.ontology.Variable createVariable(String arg0,
String arg1)
throws org.biojava.ontology.AlreadyExistsException,
org.biojava.utils.ChangeVetoException,
IllegalArgumentException
- DOCUMENT ME!
- Specified by:
createVariable
in interface org.biojava.ontology.Ontology
- Parameters:
arg0
- DOCUMENT ME!arg1
- DOCUMENT ME!
- Returns:
- DOCUMENT ME!
- Throws:
org.biojava.ontology.AlreadyExistsException
- DOCUMENT ME!
org.biojava.utils.ChangeVetoException
- DOCUMENT ME!
IllegalArgumentException
- DOCUMENT ME!
deleteTerm
public void deleteTerm(org.biojava.ontology.Term arg0)
throws org.biojava.utils.ChangeVetoException
- Delete a term from DAG (CyNetwork)
- Specified by:
deleteTerm
in interface org.biojava.ontology.Ontology
- Throws:
org.biojava.utils.ChangeVetoException
getDescription
public String getDescription()
- DOCUMENT ME!
- Specified by:
getDescription
in interface org.biojava.ontology.Ontology
- Returns:
- DOCUMENT ME!
getOps
public org.biojava.ontology.OntologyOps getOps()
- DOCUMENT ME!
- Specified by:
getOps
in interface org.biojava.ontology.Ontology
- Returns:
- DOCUMENT ME!
getTriples
public Set getTriples(org.biojava.ontology.Term arg0,
org.biojava.ontology.Term arg1,
org.biojava.ontology.Term arg2)
- returns set of Triples.
This is an expensive operation!
- Specified by:
getTriples
in interface org.biojava.ontology.Ontology
importTerm
public org.biojava.ontology.Term importTerm(org.biojava.ontology.Term arg0,
String arg1)
throws org.biojava.utils.ChangeVetoException,
IllegalArgumentException
- DOCUMENT ME!
- Specified by:
importTerm
in interface org.biojava.ontology.Ontology
- Parameters:
arg0
- DOCUMENT ME!arg1
- DOCUMENT ME!
- Returns:
- DOCUMENT ME!
- Throws:
org.biojava.utils.ChangeVetoException
- DOCUMENT ME!
IllegalArgumentException
- DOCUMENT ME!