ClassIndexClient Class

The ClassIndexClient class provides a ROS service abstraction for classes exploration. More...

Ros1 Package: ontologenius
Ros2 Package: ontopy
Inherits: OntologyIndexClient

Public Methods

__init__(self, name)
integer[] getDown(self, index, depth = -1)
integer[] getDisjoint(self, index)
integer[] getOn(self, index, property, selector = 0)
integer[] getFrom(self, property, index, selector = 0)
integer[] getWith(self, class_from, class_to, selector = 0, depth = -1)
integer[] getRelatedFrom(self, property)
integer[] getRelatedOn(self, property)
integer[] getRelatedWith(self, index)
integer[] getRelationFrom(self, index, depth = -1)
integer[] getRelationOn(self, index, depth = -1)
integer[] getRelationWith(self, index)
integer[] getDomainOf(self, index, selector = 0, depth = -1)
integer[] getRangeOf(self, index, selector = 0, depth = -1)

Reimplemented Methods

Detailed Description

The ClassIndexClient class provides an abstraction of ontologenius classes ROS service.

The ontologenius classes service allows the exploration of classes contained by ontologenius core based on integer.

This class is based on ClientIndexBase and so ensure a persistent connection with ontologenius/class_index service. The persistent connection ensures a minimal response time. A reconnection logic is implemented in the event that the persistent connection fails.

At the difference of the usual ClassClient class, this one provides access to the interface based on indexes (integers) for better performances.

See also ClassClient.

See also IndividualIndexClient, DataPropertyIndexClient and ObjectPropertyIndexClient.

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, index, depth = -1)

Gives all classes (integer[]) below the one given in the parameter: index(interger).

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, index)

Gives all the disjoint classes (integer[]) of the one given in the parameter: index(interger).

getOn(self, index, property, selector = 0)

Gives all the classes (integer[]) pointed by the property property(interger) and applied to the class index(interger).

The optional selector(integer) parameter can be set to only get results inheriting from the selector(integer) class. The default value 0 represents no restriction on the result.

getFrom(self, property, index, selector = 0)

Gives all the classes (integer[]) having the given property property(interger) and pointing to the class index(interger).

The optional selector(integer) parameter can be set to only get results inheriting from the selector(integer) class. The default value 0 represents no restriction on the result.

getWith(self, class_from, class_to, selector = 0, depth = -1)

Gives all the properties (integer[]) linking the two classes class_from(interger) and class_to(interger).

The optional selector(integer) parameter can be set to only get results inheriting from the selector(integer) property. The default value 0 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 (integer[]) possessing the property property(interger).

getRelatedOn(self, property)

Gives all the classes (integer[]) pointed to by the property property(interger).

getRelatedWith(self, index)

Gives all the classes (integer[]) having a property pointing to the class index(interger).

getRelationFrom(self, index, depth = -1)

Gives all the properties (integer[]) applied to the class index(interger).

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, index, depth = -1)

Gives all the properties (integer[]) going to the class index(interger).

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, index)

Gives all the classes (integer[]) pointed by a property applied to the class index(interger).

getDomainOf(self, index, selector = 0, depth = -1)

Gives all the properties (integer[]) for which the class index(interger) is part of the domain.

The optional selector(integer) parameter can be set to only get results inheriting from the selector(integer) property. The default value 0 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, index, selector = 0, depth = -1)

Gives all the properties (integer[]) for which the class index(interger) is part of the range.

The optional selector(integer) parameter can be set to only get results inheriting from the selector(integer) property. The default value 0 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.