Interface ISparqlQueryProcessor
Interface for SPARQL Query Processors.
Namespace: VDS.RDF.Query
Assembly: dotNetRdf.dll
Syntax
public interface ISparqlQueryProcessor
Remarks
A SPARQL Query Processor is a class that knows how to evaluate SPARQL queries against some data source to which the processor has access.
The point of this interface is to allow for end users to implement custom query processors or to extend and modify the behaviour of the default Leviathan engine as required.
Methods
| Edit this page View SourceProcessQuery(IRdfHandler, ISparqlResultsHandler, SparqlQuery)
Processes a SPARQL Query passing the results to the RDF or Results handler as appropriate.
Declaration
void ProcessQuery(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, SparqlQuery query)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | rdfHandler | RDF Handler. |
ISparqlResultsHandler | resultsHandler | Results Handler. |
SparqlQuery | query | SPARQL Query. |
ProcessQuery(IRdfHandler, ISparqlResultsHandler, SparqlQuery, QueryCallback, object)
Processes a SPARQL Query asynchronously passing the results to the relevant handler and invoking the callback when the query completes.
Declaration
[Obsolete("This method is obsolete and will be removed in a future version. Use the ProcessQueryAsync method instead.")]
void ProcessQuery(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, SparqlQuery query, QueryCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | rdfHandler | RDF Handler. |
ISparqlResultsHandler | resultsHandler | Results Handler. |
SparqlQuery | query | SPARQL Query. |
QueryCallback | callback | Callback. |
object | state | State to pass to the callback. |
ProcessQuery(SparqlQuery)
Processes a SPARQL Query returning a IGraph instance or a SparqlResultSet depending on the type of the query.
Declaration
object ProcessQuery(SparqlQuery query)
Parameters
Type | Name | Description |
---|---|---|
SparqlQuery | query | SPARQL Query. |
Returns
Type | Description |
---|---|
object | Either an IGraph instance of a SparqlResultSet depending on the type of the query. |
ProcessQuery(SparqlQuery, GraphCallback, SparqlResultsCallback, object)
Processes a SPARQL Query asynchronously invoking the relevant callback when the query completes.
Declaration
[Obsolete("This method is obsolete and will be removed in a future version. Use the ProcessQueryAsync method instead.")]
void ProcessQuery(SparqlQuery query, GraphCallback rdfCallback, SparqlResultsCallback resultsCallback, object state)
Parameters
Type | Name | Description |
---|---|---|
SparqlQuery | query | SPARQL QUery. |
GraphCallback | rdfCallback | Callback for queries that return a Graph. |
SparqlResultsCallback | resultsCallback | Callback for queries that return a Result Set. |
object | state | State to pass to the callback. |
ProcessQueryAsync(IRdfHandler, ISparqlResultsHandler, SparqlQuery)
Process a SPARQL query asynchronously, passing the results to teh relevant handler.
Declaration
Task ProcessQueryAsync(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, SparqlQuery query)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | rdfHandler | RDF handler invoked for queries that return RDF graphs. |
ISparqlResultsHandler | resultsHandler | Results handler invoked for queries that return SPARQL results sets. |
SparqlQuery | query | SPARQL query. |
Returns
Type | Description |
---|---|
Task |
ProcessQueryAsync(SparqlQuery)
Process a SPARQL query asynchronously returning either a SparqlResultSet or a IGraph depending on the type of the query.
Declaration
Task<object> ProcessQueryAsync(SparqlQuery query)
Parameters
Type | Name | Description |
---|---|---|
SparqlQuery | query | SPARQL query. |
Returns
Type | Description |
---|---|
Task<object> | Either an <see cref="IGraph">IGraph</see> instance of a <see cref="SparqlResultSet">SparqlResultSet</see> depending on the type of the query. |