ConversionClient Class
The ConversionClient class provides an abstraction to the ontologenius conversion ROS services. More...
Header: | #include "ontologenius/clients/ConversionClient.h" |
Namespace: | onto |
Public Functions
ConversionClient(const std::string& name) | |
verbose(bool verbose) | |
std::vector<std::string> | individualsIndex2Id(const std::vector<int64_t>& indexes) |
std::vector<std::string> | classesIndex2Id(const std::vector<int64_t>& indexes) |
std::vector<std::string> | dataPropertiesIndex2Id(const std::vector<int64_t>& indexes) |
std::vector<std::string> | objectPropertiesIndex2Id(const std::vector<int64_t>& indexes) |
std::vector<std::string> | literalsIndex2Id(const std::vector<int64_t>& indexes) |
std::string | individualsIndex2Id(int64_t index) |
std::string | classesIndex2Id(int64_t index) |
std::string | dataPropertiesIndex2Id(int64_t index) |
std::string | objectPropertiesIndex2Id(int64_t index) |
std::string | literalsIndex2Id(int64_t index) |
std::vector<int64_t> | individualsId2Index(const std::vector<std::string>& ids) |
std::vector<int64_t> | classesId2Index(const std::vector<std::string>& ids) |
std::vector<int64_t> | dataPropertiesId2Index(const std::vector<std::string>& ids) |
std::vector<int64_t> | objectPropertiesId2Index(const std::vector<std::string>& ids) |
std::vector<int64_t> | literalsId2Index(const std::vector<std::string>& ids) |
int64_t | individualsId2Index(const std::string& id) |
int64_t | classesId2Index(const std::string& id) |
int64_t | dataPropertiesId2Index(const std::string& id) |
int64_t | objectPropertiesId2Index(const std::string& id) |
int64_t | literalsId2Index(const std::string& 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.
Public Function Documentation
ConversionClient::ConversionClient(const std::string& name)
Constructs an conversion client.
Can be used in a multi-ontology mode by specifying the name of the ontology name. For classic use, name should be defined as "".
void ConversionClient::verbose(bool verbose)
If verbose is set to true, the clients will post messages about the failure to call the services and about their restoration.
std::vector<std::string> ConversionClient::individualsIndex2Id(const std::vector<int64_t>& indexes)
Converts a vector of indexes representing individuals to identifiers.
Returns a vector of identifiers whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.
std::vector<std::string> ConversionClient::classesIndex2Id(const std::vector<int64_t>& indexes)
Converts a vector of indexes representing classes to identifiers.
Returns a vector of identifiers whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.
std::vector<std::string> ConversionClient::dataPropertiesIndex2Id(const std::vector<int64_t>& indexes)
Converts a vector of indexes representing data properties to identifiers.
Returns a vector of identifiers whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.
std::vector<std::string> ConversionClient::objectPropertiesIndex2Id(const std::vector<int64_t>& indexes)
Converts a vector of indexes representing object properties to identifiers.
Returns a vector of identifiers whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.
std::vector<std::string> ConversionClient::literalsIndex2Id(const std::vector<int64_t>& indexes)
Converts a vector of indexes representing literals to identifiers.
Returns a vector of identifiers whose order matches the original indexes order. Unknown concepts (or from wrong types) will be return as empty strings.
std::string ConversionClient::individualsIndex2Id(int64_t index)
Converts an index representing an individual to its identifier.
Returns a single identifier. Unknown concept (or from wrong types) will be return as an empty string.
std::string ConversionClient::classesIndex2Id(int64_t index)
Converts an index representing a class to its identifier.
Returns a single identifier. Unknown concept (or from wrong types) will be return as an empty string.
std::string ConversionClient::dataPropertiesIndex2Id(int64_t index)
Converts an index representing a data property to its identifier.
Returns a single identifier. Unknown concept (or from wrong types) will be return as an empty string.
std::string ConversionClient::objectPropertiesIndex2Id(int64_t index)
Converts an index representing an object to its identifier.
Returns a single identifier. Unknown concept (or from wrong types) will be return as an empty string.
std::string ConversionClient::literalsIndex2Id(int64_t index)
Converts an index representing a literal to its identifier.
Returns a single identifier. Unknown concept (or from wrong types) will be return as an empty string.
std::vector<int64_t> ConversionClient::individualsId2Index(const std::vector<std::string>& ids)
Converts a vector of identifiers representing individuals to indexes.
Returns a vector of indexes whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.
std::vector<int64_t> ConversionClient::classesId2Index(const std::vector<std::string>& ids)
Converts a vector of identifiers representing classes to indexes.
Returns a vector of indexes whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.
std::vector<int64_t> ConversionClient::dataPropertiesId2Index(const std::vector<std::string>& ids)
Converts a vector of identifiers representing data properties to indexes.
Returns a vector of indexes whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.
std::vector<int64_t> ConversionClient::objectPropertiesId2Index(const std::vector<std::string>& ids)
Converts a vector of identifiers representing object properties to indexes.
Returns a vector of indexes whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.
std::vector<int64_t> ConversionClient::literalsId2Index(const std::vector<std::string>& ids)
Converts a vector of identifiers representing literals to indexes.
Returns a vector of indexes whose order matches the original identifiers order. Unknown concepts (or from wrong types) will be return as index 0.
int64_t ConversionClient::individualsId2Index(const std::string& id)
Converts an identifier representing an individual to its index.
Returns a single index. Unknown concept (or from wrong types) will be return as index 0.
int64_t ConversionClient::classesId2Index(const std::string& id)
Converts an identifier representing a class to its index.
Returns a single index. Unknown concept (or from wrong types) will be return as index 0.
int64_t ConversionClient::dataPropertiesId2Index(const std::string& id)
Converts an identifier representing a data property to its index.
Returns a single index. Unknown concept (or from wrong types) will be return as index 0.
int64_t ConversionClient::objectPropertiesId2Index(const std::string& id)
Converts an identifier representing an object property to its index.
Returns a single index. Unknown concept (or from wrong types) will be return as index 0.
int64_t ConversionClient::literalsId2Index(const std::string& id)
Converts an identifier representing a literal to its index.
Returns a single index. Unknown concept (or from wrong types) will be return as index 0.