Show / Hide Table of Contents

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 Source

QueryWithResultGraphAsync(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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Methods
    • QueryWithResultGraphAsync(string, CancellationToken)
    • QueryWithResultGraphAsync(string, IRdfHandler, CancellationToken)
    • QueryWithResultSetAsync(string, CancellationToken)
    • QueryWithResultSetAsync(string, ISparqlResultsHandler, CancellationToken)
  • Extension Methods
Back to top Generated by DocFX