Virtual Ontology (indra.ontology.virtual_ontology
)
This module implements a virtual ontology which communicates with a REST service to perform all ontology functions.
- class indra.ontology.virtual.ontology.VirtualOntology(url, ontology='bio')[source]
A virtual ontology class which uses a remote REST service to perform all operations. It is particularly useful if the host machine has limited resources and keeping the ontology graph in memory is not desirable.
- Parameters
- initialize()[source]
Initialize the ontology by adding nodes and edges.
By convention, ontologies are implemented such that the constructor does not add all the nodes and edges, which can take a long time. This function is called automatically when any of the user-facing methods ot IndraOntology is called. This way, the ontology is only fully constructed if it is used.