ClassClient Class
The ClassClient class provides a ROS service abstraction for classes exploration. More...
Ros1 Package: | ontologenius |
Ros2 Package: | ontopy |
Inherits: | OntologyClient |
Public Methods
__init__(self, name) | |
str[] | getDown(self, name, depth = -1) |
str[] | getDisjoint(self, name) |
str[] | getOn(self, name, property, selector = '') |
str[] | getFrom(self, property, name, selector = '') |
str[] | getWith(self, class_from, class_to, selector = '', depth = -1) |
str[] | getRelatedFrom(self, property) |
str[] | getRelatedOn(self, property) |
str[] | getRelatedWith(self, name) |
str[] | getRelationFrom(self, name, depth = -1) |
str[] | getRelationOn(self, name, depth = -1) |
str[] | getRelationWith(self, name) |
str[] | getDomainOf(self, name, selector = '', depth = -1) |
str[] | getRangeOf(self, name, selector = '', depth = -1) |
Reimplemented Methods
- 10 methods inherited from OntologyClient
- 2 methods inherited from ClientBase
Detailed Description
The ClassClient class provides an abstraction of ontologenius classes ROS service.
The ontologenius classes service allows the exploration of classes contained by ontologenius core.
This class is based on ClientBase and so ensure a persistent connection with ontologenius/class service. The persistent connection ensures a minimal response time. A reconnection logic is implemented in the event that the persistent connection fails.
See also IndividualClient, DataPropertyClient and ObjectPropertyClient.
Methods Documentation
__init__(self, name)
Constructs a class client..
Can be used in a multi-ontology mode by specifying the name of the ontology name(str). For classic use, name(str) should be defined as ''.
getDown(self, name, depth = -1)
Gives all classes (str[]) below the one given in the parameter: name(str).
The optional depth(int) parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.
getDisjoint(self, name)
Gives all the disjoint classes (str[]) of the one given in the parameter: name(str).
getOn(self, name, property, selector = '')
Gives all the classes (str[]) pointed by the property property(str) and applied to the class name(str).
The optional selector(str) parameter can be set to only get results inheriting from the selector(str) class. The default value '' represents no restriction on the result.
getFrom(self, property, name, selector = '')
Gives all the classes (str[]) having the given property property(str) and pointing to the class name(str).
The optional selector(str) parameter can be set to only get results inheriting from the selector(str) class. The default value '' represents no restriction on the result.
getWith(self, class_from, class_to, selector = '', depth = -1)
Gives all the properties (str[]) linking the two classes class_from(str) and class_to(str).
The optional selector(str) parameter can be set to only get results inheriting from the selector(str) property. The default value '' represents no restriction on the result.
The optional depth(int) parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.
getRelatedFrom(self, property)
Gives all the classes (str[]) possessing the property property(str).
getRelatedOn(self, property)
Gives all the classes (str[]) pointed to by the property property(str).
getRelatedWith(self, name)
Gives all the classes (str[]) having a property pointing to the class name(str).
getRelationFrom(self, name, depth = -1)
Gives all the properties (str[]) applied to the class name(str).
The optional depth(int) parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.
getRelationOn(self, name, depth = -1)
Gives all the properties (str[]) going to the class name(str).
The optional depth(int) parameter can be set to limit tree propagation to a specific value. The default value -1 represents no propagation limitation.
getRelationWith(self, name)
Gives all the classes (str[]) pointed by a property applied to the class name(str).
getDomainOf(self, name, selector = '', depth = -1)
Gives all the properties (str[]) for which the class name(str) is part of the domain.
The optional selector(str) parameter can be set to only get results inheriting from the selector(str) property. The default value '' represents no restriction on the result.
The optional depth(int) parameter can be set to limit tree propagation of the class to a specific value. The default value -1 represents no propagation limitation.
getRangeOf(self, name, selector = '', depth = -1)
Gives all the properties (str[]) for which the class name(str) is part of the range.
The optional selector(str) parameter can be set to only get results inheriting from the selector(str) property. The default value '' represents no restriction on the result.
The optional depth(int) parameter can be set to limit tree propagation of the class to a specific value. The default value -1 represents no propagation limitation.