IndividualClient Class
The IndividualClient class provides a ROS service abstraction for individuals exploration. More...
Ros1 Package: | ontologenius |
Ros2 Package: | ontopy |
Inherits: | OntologyClient |
Methods
__init__(self, name) | |
str[] | getType(self, name) |
str[] | getSame(self, name) |
str[] | getDistincts(self, name) |
str[] | getOn(self, name, property, selector = '') |
str[] | getFrom(self, property, name, selector = '') |
str[] | getWith(self, indiv_from, indiv_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) |
bool | isRelationInferred(self, subject, property, object) |
bool | isInheritanceInferred(self, subject, class_name) |
str[] | getRelationInferenceExplanation(self, subject, property, object) |
str[] | getInheritanceInferenceExplanation(self, subject, class_name) |
Reimplemented Methods
- 10 methods inherited from OntologyClient
- 2 methods inherited from ClientBase
Detailed Description
The IndividualClient class provides an abstraction of ontologenius individuals ROS service.
The ontologenius individuals' service allows the exploration of individuals contained by ontologenius core.
This class is based on ClientBase and so ensure a persistent connection with ontologenius/individual service. The persistent connection ensures a minimal response time. A reconnection logic is implemented in the event that the persistent connection fails.
See also ClassClient, 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 should be defined as ''.
getType(self, name)
Gives all the individuals (str[]) of the type of the given class name(str).
getSame(self, name)
Gives all the individuals (str[]) that are defined as being identical to the individual name(str).
getDistincts(self, name)
Gives all the defined individuals (str[]) as being distinct from the individual name(str).
getOn(self, name, property, selector = '')
Gives all the individuals (str[]) pointed by the property property(str) and applied to the individual name(str).
The optional selector(str) parameter can be set to only get results inheriting from the selector class. The default value '' represents no restriction on the result.
getFrom(self, property, name, selector = '')
Gives all the individuals (str[]) having the given property property(str) and pointing to the individual name(str).
The optional selector(str) parameter can be set to only get results inheriting from the selector class. The default value '' represents no restriction on the result.
getWith(self, indiv_from, indiv_to, selector = '', depth = -1)
Gives all the properties (str[]) linking the individual indiv_from(str) to the individual indiv_to(str).
The optional selector(str) parameter can be set to only get results inheriting from the selector 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 individuals (str[]) possessing the property property(str).
getRelatedOn(self, property)
Gives all the individuals (str[]) pointed to by the property property(str).
getRelatedWith(self, name)
Gives all the individuals (str[]) having a property pointing to the individual name(str).
getRelationFrom(self, name, depth = -1)
Gives all the properties (str[]) applied to the individual 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 individual 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 individuals (str[]) pointed by a property applied to the individual name(str).
getDomainOf(self, name, selector = '', depth = -1)
Gives all the properties (str[]) for which the individual name(str) is part of the domain.
The optional selector(str) parameter can be set to only get results inheriting from the selector property. The default value '' represents no restriction on the result.
The optional depth(int) parameter can be set to limit tree propagation of the individual 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 individual name(str) is part of the range.
The optional selector(str) parameter can be set to only get results inheriting from the selector property. The default value '' represents no restriction on the result.
The optional depth(int) parameter can be set to limit tree propagation of the individual to a specific value. The default value -1 represents no propagation limitation.
isRelationInferred(self, subject, property, object)
Tests if the relation (str, str, str) has been inferred or not.
isInheritanceInferred(self, subject, class_name)
Tests if the inheritance (str, str) has been inferred or not.
getRelationInferenceExplanation(self, subject, property, object)
Gives all the relations (str[]) used in the inference of the provided relation (str, str, str).
getInheritanceInferenceExplanation(self, subject, class_name)
Gives all the relations (str[]) used in the inference of the provided inheritage (str, str).