Class RemoteQueryProcessor
A SPARQL Query Processor where the query is processed by passing it to a remote SPARQL endpoint.
Implements
Inherited Members
Namespace: VDS.RDF.Query
Assembly: dotNetRdf.dll
Syntax
public class RemoteQueryProcessor : ISparqlQueryProcessor
Constructors
| Edit this page View SourceRemoteQueryProcessor(ISparqlQueryClient)
Create a new Remote Query Processor.
Declaration
public RemoteQueryProcessor(ISparqlQueryClient client)
Parameters
Type | Name | Description |
---|---|---|
ISparqlQueryClient | client | The remote SPARQL client to use. |
RemoteQueryProcessor(SparqlRemoteEndpoint)
Creates a new Remote Query Processor.
Declaration
[Obsolete("This constructor is obsolete and will be removed in a future version. Use the constructor that accepts a SparqlClient")]
public RemoteQueryProcessor(SparqlRemoteEndpoint endpoint)
Parameters
Type | Name | Description |
---|---|---|
SparqlRemoteEndpoint | endpoint | SPARQL Endpoint. |
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
public 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
public 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. |
Remarks
In the event of a success the callback will be invoked, if there is an error the callback will be invoked and passed an instance of AsyncError which contains details of the error and the original state information passed in.
ProcessQuery(SparqlQuery)
Processes a SPARQL Query.
Declaration
public object ProcessQuery(SparqlQuery query)
Parameters
Type | Name | Description |
---|---|---|
SparqlQuery | query | SPARQL Query. |
Returns
Type | Description |
---|---|
object |
ProcessQuery(SparqlQuery, GraphCallback, SparqlResultsCallback, object)
Processes a SPARQL Query asynchronously invoking the relevant callback when the query completes.
Declaration
public 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. |
Remarks
In the event of a success the appropriate callback will be invoked, if there is an error both callbacks will be invoked and passed an instance of AsyncError which contains details of the error and the original state information passed in.
ProcessQueryAsync(IRdfHandler, ISparqlResultsHandler, SparqlQuery)
Process a SPARQL query asynchronously, passing the results to teh relevant handler.
Declaration
public 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
public 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. |