ConversionClient Class

The ConversionClient class provides an abstraction to the ontologenius conversion ROS services. More...

Ros1 Package: ontologenius
Ros2 Package: ontopy

Methods

__init__(self, name)
setVerbose(self, verbose)
str[] individualsIndexes2Ids(self, indexes)
str[] classesIndexes2Ids(self, indexes)
str[] dataPropertiesIndexes2Ids(self, indexes)
str[] objectPropertiesIndexes2Ids(self, indexes)
str[] literalsIndexes2Ids(self, indexes)
str individualsIndex2Id(self, index)
str classesIndex2Id(self, index)
str dataPropertiesIndex2Id(self, index)
str objectPropertiesIndex2Id(self, index)
str literalsIndex2Id(self, index)
int[] individualsIds2Indexes(self, ids)
int[] classesIds2Indexes(self, ids)
int[] dataPropertiesIds2Indexes(self, ids)
int[] objectPropertiesIds2Indexes(self, ids)
int[] literalsIds2Indexes(self, ids)
int individualsId2Index(self, id)
int classesId2Index(self, id)
int dataPropertiesId2Index(self, id)
int objectPropertiesId2Index(self, id)
int literalsId2Index(self, id)

Detailed Description

The ConversionClient class provides an abstraction to the ontologenius conversion ROS services to pass from identifiers to indexes and inverse.

This class ensures a persistent connection with the service based on. The persistent connection ensures a minimal response time. A reconnection logic is implemented in the event that the persistent connection fails.

Methods Documentation

__init__(self, name)

Constructs a ROS client linked to the service /ontologenius/conversion.

Can be used in a multi-ontology mode by specifying the name of the ontology name. For classic use, name should be defined as "".

setVerbose(self, verbose)

If verbose(bool) is set to True, the clients will post messages about the failure to call the services and about their restoration.

individualsIndexes2Ids(self, indexes)

Converts an array of indexes(int[]) representing individuals to identifiers.

Returns an array of identifiers (str[]) whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.

classesIndexes2Ids(self, indexes)

Converts an array of indexes(int[]) representing classes to identifiers.

Returns an array of identifiers (str[]) whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.

dataPropertiesIndexes2Ids(self, indexes)

Converts an array of indexes(int[]) representing data properties to identifiers.

Returns an array of identifiers (str[]) whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.

objectPropertiesIndexes2Ids(self, indexes)

Converts an array of indexes(int[]) representing object properties to identifiers.

Returns an array of identifiers (str[]) whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.

literalsIndexes2Ids(self, indexes)

Converts an array of indexes(int[]) representing literals to identifiers.

Returns an array of identifiers (str[]) whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.

individualsIndex2Id(self, index)

Converts an index(int) representing an individual to its identifier.

Returns a single identifier (str). Unknown concept (or from wrong types) will be return as an empty string.

classesIndex2Id(self, index)

Converts an index(int) representing a class to its identifier.

Returns a single identifier (str). Unknown concept (or from wrong types) will be return as an empty string.

dataPropertiesIndex2Id(self, index)

Converts an index(int) representing a data property to its identifier.

Returns a single identifier (str). Unknown concept (or from wrong types) will be return as an empty string.

objectPropertiesIndex2Id(self, index)

Converts an index(int) representing an object property to its identifier.

Returns a single identifier (str). Unknown concept (or from wrong types) will be return as an empty string.

literalsIndex2Id(self, index)

Converts an index(int) representing a literal to its identifier.

Returns a single identifier (str). Unknown concept (or from wrong types) will be return as an empty string.

individualsIds2Indexes(self, ids)

Converts an array of ids(str[]) representing individuals to indexes.

Returns an array of indexes (int[]) whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.

classesIds2Indexes(self, ids)

Converts an array of ids(str[]) representing classes to indexes.

Returns an array of indexes (int[]) whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.

dataPropertiesIds2Indexes(self, ids)

Converts an array of ids(str[]) representing data properties to indexes.

Returns an array of indexes (int[]) whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.

objectPropertiesIds2Indexes(self, ids)

Converts an array of ids(str[]) representing object properties to indexes.

Returns an array of indexes (int[]) whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.

literalsIds2Indexes(self, ids)

Converts an array of ids(str[]) representing literals to indexes.

Returns an array of indexes (int[]) whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.

individualsId2Index(self, id)

Converts an id(str) representing an individual to its index.

Returns a single index (int). Unknown concept (or from wrong types) will be return as index 0.

classesId2Index(self, id)

Converts an id(str) representing a class to its index.

Returns a single index (int). Unknown concept (or from wrong types) will be return as index 0.

dataPropertiesId2Index(self, id)

Converts an id(str) representing a data property to its index.

Returns a single index (int). Unknown concept (or from wrong types) will be return as index 0.

objectPropertiesId2Index(self, id)

Converts an id(str) representing an object property to its index.

Returns a single index (int). Unknown concept (or from wrong types) will be return as index 0.

literalsId2Index(self, id)

Converts an id(str) representing a literal to its index.

Returns a single index (int). Unknown concept (or from wrong types) will be return as index 0.