The sparql module contains several functions that wrap commonly used SPARQL queries in Python code.
Return all triples in a graph’
| Parameter: | graph (rdflib.graph.Graph) – the graph to search |
|---|---|
| Return type: | list |
| Parameters: |
|
|---|---|
| Return type: | list |
Return all comments associated with some URI
| Parameters: |
|
|---|---|
| Return type: | list |
getIndividuals returns a dictionary where keys are URIRefs of individuals and values are lists of types (ie OWL class URIs)
| Parameter: | graph (rdflib.graph.Graph) – the relevant graph to process |
|---|---|
| Returns: | (keys) individual URIs, (values) lists of types, OWL class URIs |
| Return type: | dict |
Return all OWL Classes in a graph’
| Parameter: | graph (rdflib.graph.Graph) – the graph to search |
|---|---|
| Return type: | list |
Return all OWL DataProperties in a graph’
| Parameter: | graph (rdflib.graph.Graph) – the graph to search |
|---|---|
| Return type: | list |
Return all OWL ObjectProperties in a graph’
| Parameter: | graph (rdflib.graph.Graph) – the graph to search |
|---|---|
| Return type: | list |
Given an rdflib.graph.Graph and a URIRef of some OWL class, return a list of subclasses
| Parameters: |
|
|---|---|
| Return type: | list |
Return linguistic units accordings to a particular form
| Parameters: |
|
|---|---|
| Return type: | list |
sparqlQuery is a wrapper function for making queries over specific contexts within the store.
| Parameters: |
|
|---|---|
| Returns: | A list of tuples containing the results |
| Return type: | list |