SemWeb.Remote.SparqlSource

SemWeb : SemWeb.Remote Namespace
SparqlSource Interface

An interface representing a SPARQL endpoint.

public interface SparqlSource

#### Remarks

This interface is implemented by classes that support methods for accessing a SPARQL endpoint.

## Members

### Methods

| RunSparqlQuery (string, SemWeb.Query.QueryResultSink) Runs a SPARQL SELECT query and returns the results into a QueryResultSink.
| RunSparqlQuery (string, SemWeb.StatementSink) Runs a SPARQL CONSTRUCT or DESCRIBE query and returns the resulting statements into a StatementSink.
| RunSparqlQuery (string, System.IO.TextWriter) Runs a SPARQL query of any type and sends the output into a TextWriter.
| RunSparqlQuery (string, out bool) Runs a SPARQL ASK query and returns the boolean result.

## Member Details

### RunSparqlQuery Method

public void RunSparqlQuery (string sparqlQuery, SemWeb.Query.QueryResultSink selectResults)

Runs a SPARQL SELECT query and returns the results into a QueryResultSink.

#### Parameters

sparqlQuery
  A SPARQL query.
selectResults
  A QueryResultSink into which the resulting variable bindings are streamed.

#### Remarks

Any exception may be thrown by this method depending on the implementation.

### RunSparqlQuery Method

public void RunSparqlQuery (string sparqlQuery, SemWeb.StatementSink statementResults)

Runs a SPARQL CONSTRUCT or DESCRIBE query and returns the resulting statements into a StatementSink.

#### Parameters

sparqlQuery
  A SPARQL query.
statementResults
  A StatementSink into which the statements that result from the query are streamed.

#### Remarks

Any exception may be thrown by this method depending on the implementation.

### RunSparqlQuery Method

public void RunSparqlQuery (string sparqlQuery, System.IO.TextWriter output)

Runs a SPARQL query of any type and sends the output into a TextWriter.

#### Parameters

sparqlQuery
  A SPARQL query.
output
  A TextWriter to which the result of the query is written.

#### Remarks

Any exception may be thrown by this method depending on the implementation.

### RunSparqlQuery Method

public void RunSparqlQuery (string sparqlQuery, out bool askResult)

Runs a SPARQL ASK query and returns the boolean result.

#### Parameters

sparqlQuery
  A SPARQL query.
askResult
  The result of the query is set into this `out` parameter on completion of the method.

#### Remarks

Any exception may be thrown by this method depending on the implementation.