OntologiesManipulator Class
The OntologiesManipulator class is an interface to manage several instance of OntologyManipulator and OntologyManipulatorIndex in a multi-ontology usage. More...
Ros1 Package: | ontologenius |
Ros2 Package: | ontopy |
Inherits: | ManagerClient |
Methods
__init__(self) | |
waitInit(self, timeout = -1) | |
OntologyManipulator | get(self, name) |
OntologyManipulatorIndex | getIndex(self, name) |
setVerbose(self, verbose) |
Reimplemented Methods
- 2 methods inherited from ManagerClient
Detailed Description
The OntologiesManipulator class allows to create and delete ontologies instances dynamically. Its usage is strongly recommended for multi-ontology usage and ensures good thread management.
This class allows you to set up the theory of mind quickly in a software application.
Methods Documentation
__init__(self)
Constructs a manipulator for several instances of ontologies.
waitInit(self, timeout = -1)
Wait for ontologenius services to be advertised and available for. Blocks until it is.
timeout(int) is the amount of time to wait for before timing out. If timeout is -1 (default), waits until the node is shutdown.
get(self, name)
Returns an OntologyManipulator object instance named name(str).
Returns None if no OntologyManipulator instance is named name.
getIndex(self, name)
Returns an OntologyManipulatorIndex object instance named name(str).
Returns None if no OntologyManipulatorIndex instance is named name.
add(self, name)
Creates a new instance of OntologyManipulator and OntologyManipulatorIndex identified by the name name(str).
Returns False if the creation fails. Returns True even if the instance already exists.
copy(self, dest_name, src_name)
Creates a new instance of OntologyManipulator and OntologyManipulatorIndex identified by the name dest_name(str) that manipulates a copy of the ontology handled by the OntologyManipulator and OntologyManipulatorIndex src_name(str).
Returns False if the copy fails. Returns True even if the instance already exists.
delete(self, name)
Deletes the instance of OntologyManipulator and OntologyManipulatorIndex identified by the name name(str).
Returns False deletion fails. Returns True even if the instance does not exist.
setVerbose(self, verbose)
If verbose is set to True, the clients will post messages about the failure to call the services and about their restoration.