SparqlIndexClient Class
The SparqlIndexClient class provides a ROS service to explore ontologenius with SPARQL-like queries. More...
| Ros1 Package: | ontologenius |
| Ros2 Package: | ontopy |
Methods
Detailed Description
The SparqlIndexClient class provides a ROS service to explore ontologenius with SPARQL-like queries.
The variables start with the symbol ? (e.g. ?my_var) and each triplet is separated by a dot.
At the difference of the usual SparqlClient class, this one provides access to the interface based on indexes (integers) for better performances.
See also SparqlClient.
Methods Documentation
__init__(self, name)
Constructs a sparql 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 ''.
(str[], OntologeniusSparqlIndexResponse[])call(self, query)
Basic query Examples
The general structure is always the same:
SELECT * // or ?x to get specific variables
WHERE {
// pattern
}
You can also add the DISTINCT keyword just after the SELECT to ensure unique results. The following blocks are examples of possible patterns.