Interface ISparqlQueryClient
Interface to be implemented by classes that provide a client for accessing a remote SPARQL query service.
Namespace: VDS.RDF.Query
Assembly: dotNetRdf.dll
Syntax
public interface ISparqlQueryClient
Methods
| Edit this page View SourceQueryWithResultGraphAsync(string, CancellationToken)
Execute a SPARQL query that is intended to return an RDF Graph.
Declaration
Task<IGraph> QueryWithResultGraphAsync(string sparqlQuery, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlQuery | The query to be executed. |
CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<IGraph> | An RDF Graph. |
Remarks
This method should be used when processing SPARQL CONSTRUCT or DESCRIBE queries.
QueryWithResultGraphAsync(string, IRdfHandler, CancellationToken)
Execute a SPARQL query that is intended to return an RDF Graph.
Declaration
Task QueryWithResultGraphAsync(string sparqlQuery, IRdfHandler handler, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlQuery | The query to be executed. |
IRdfHandler | handler | The handler to use when parsing the graph data returned by the server. |
CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task | An RDF Graph. |
Remarks
This method should be used when processing SPARQL CONSTRUCT or DESCRIBE queries.
QueryWithResultSetAsync(string, CancellationToken)
Execute a SPARQL query that is intended to return a SPARQL results set.
Declaration
Task<SparqlResultSet> QueryWithResultSetAsync(string sparqlQuery, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlQuery | The query to be executed. |
CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task<SparqlResultSet> | The query results. |
Remarks
This method should be used when processing SPARQL SELECT or ASK queries.
QueryWithResultSetAsync(string, ISparqlResultsHandler, CancellationToken)
Execute a SPARQL query that is intended to return a SPARQL results set.
Declaration
Task QueryWithResultSetAsync(string sparqlQuery, ISparqlResultsHandler resultsHandler, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlQuery | The query to be executed. |
ISparqlResultsHandler | resultsHandler | The handler to use when parsing the results returned by the server. |
CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
Task | The query results. |
Remarks
This method should be used when processing SPARQL SELECT or ASK queries.