IndividualIndexClient Class

The IndividualIndexClient class provides a ROS service abstraction for individuals exploration. More...

Ros1 Package: ontologenius
Ros2 Package: ontopy
Inherits: OntologyIndexClient

Methods

__init__(self, name)
integer[] getType(self, index)
integer[] getSame(self, index)
integer[] getDistincts(self, index)
integer[] getOn(self, index, property, selector = 0)
integer[] getFrom(self, property, index, selector = 0)
integer[] getWith(self, indiv_from, indiv_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 IndividualIndexClient class provides an abstraction of ontologenius individuals ROS service.

The ontologenius individuals' service allows the exploration of individuals contained by ontologenius core based on indexes.

This class is based on ClientBaseIndex and so ensure a persistent connection with ontologenius/individual_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 IndividualClient class, this one provides access to the interface based on indexes (integers) for better performances.

See also IndividualClient.

See also ClassIndexClient, 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 should be defined as ''.

getType(self, index)

Gives all the individuals (integer[]) of the type of the given class index(integer).

getSame(self, index)

Gives all the individuals (integer[]) that are defined as being identical to the individual index(integer).

getDistincts(self, index)

Gives all the defined individuals (integer[]) as being distinct from the individual index(integer).

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

Gives all the individuals (integer[]) pointed by the property property(integer) and applied to the individual index(integer).

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

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

Gives all the individuals (integer[]) having the given property property(integer) and pointing to the individual index(integer).

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

getWith(self, indiv_from, indiv_to, selector = 0, depth = -1)

Gives all the properties (integer[]) linking the individual indiv_from(integer) to the individual indiv_to(integer).

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

getRelatedOn(self, property)

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

getRelatedWith(self, index)

Gives all the individuals (integer[]) having a property pointing to the individual index(integer).

getRelationFrom(self, index, depth = -1)

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

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 individual index(integer).

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 individuals (integer[]) pointed by a property applied to the individual index(integer).

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

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

The optional selector(integer) parameter can be set to only get results inheriting from the selector 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 individual 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 individual index(integer) is part of the range.

The optional selector(integer) parameter can be set to only get results inheriting from the selector 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 individual to a specific value. The default value -1 represents no propagation limitation.