Class SparqlRemoteEndpoint
A Class for connecting to a remote SPARQL Endpoint and executing Queries against it.
Implements
Inherited Members
Namespace: VDS.RDF.Query
Assembly: dotNetRdf.dll
Syntax
[Obsolete("This class is obsolete and will be removed in a future release. Replaced by VDS.RDF.Query.SparqlQueryClient.")]
public class SparqlRemoteEndpoint : BaseEndpoint, IConfigurationSerializable
Constructors
| Edit this page View SourceSparqlRemoteEndpoint()
Empty Constructor for use by derived classes.
Declaration
protected SparqlRemoteEndpoint()
SparqlRemoteEndpoint(Uri)
Creates a new SPARQL Endpoint for the given Endpoint URI.
Declaration
public SparqlRemoteEndpoint(Uri endpointUri)
Parameters
Type | Name | Description |
---|---|---|
Uri | endpointUri | Remote Endpoint URI. |
SparqlRemoteEndpoint(Uri, IEnumerable<string>)
Creates a new SPARQL Endpoint for the given Endpoint URI using the given Default Graph URI.
Declaration
public SparqlRemoteEndpoint(Uri endpointUri, IEnumerable<string> defaultGraphUris)
Parameters
Type | Name | Description |
---|---|---|
Uri | endpointUri | Remote Endpoint URI. |
IEnumerable<string> | defaultGraphUris | Default Graph URIs to use when Querying the Endpoint. |
SparqlRemoteEndpoint(Uri, IEnumerable<string>, IEnumerable<string>)
Creates a new SPARQL Endpoint for the given Endpoint URI using the given Default Graph URI.
Declaration
public SparqlRemoteEndpoint(Uri endpointUri, IEnumerable<string> defaultGraphUris, IEnumerable<string> namedGraphUris)
Parameters
Type | Name | Description |
---|---|---|
Uri | endpointUri | Remote Endpoint URI. |
IEnumerable<string> | defaultGraphUris | Default Graph URIs to use when Querying the Endpoint. |
IEnumerable<string> | namedGraphUris | Named Graph URIs to use when Querying the Endpoint. |
SparqlRemoteEndpoint(Uri, IEnumerable<string>, IEnumerable<Uri>)
Creates a new SPARQL Endpoint for the given Endpoint URI using the given Default Graph URI.
Declaration
public SparqlRemoteEndpoint(Uri endpointUri, IEnumerable<string> defaultGraphUris, IEnumerable<Uri> namedGraphUris)
Parameters
Type | Name | Description |
---|---|---|
Uri | endpointUri | Remote Endpoint URI. |
IEnumerable<string> | defaultGraphUris | Default Graph URIs to use when Querying the Endpoint. |
IEnumerable<Uri> | namedGraphUris | Named Graph URIs to use when Querying the Endpoint. |
SparqlRemoteEndpoint(Uri, IEnumerable<Uri>)
Creates a new SPARQL Endpoint for the given Endpoint URI using the given Default Graph URI.
Declaration
public SparqlRemoteEndpoint(Uri endpointUri, IEnumerable<Uri> defaultGraphUris)
Parameters
Type | Name | Description |
---|---|---|
Uri | endpointUri | Remote Endpoint URI. |
IEnumerable<Uri> | defaultGraphUris | Default Graph URIs to use when Querying the Endpoint. |
SparqlRemoteEndpoint(Uri, IEnumerable<Uri>, IEnumerable<string>)
Creates a new SPARQL Endpoint for the given Endpoint URI using the given Default Graph URI.
Declaration
public SparqlRemoteEndpoint(Uri endpointUri, IEnumerable<Uri> defaultGraphUris, IEnumerable<string> namedGraphUris)
Parameters
Type | Name | Description |
---|---|---|
Uri | endpointUri | Remote Endpoint URI. |
IEnumerable<Uri> | defaultGraphUris | Default Graph URIs to use when Querying the Endpoint. |
IEnumerable<string> | namedGraphUris | Named Graph URIs to use when Querying the Endpoint. |
SparqlRemoteEndpoint(Uri, IEnumerable<Uri>, IEnumerable<Uri>)
Creates a new SPARQL Endpoint for the given Endpoint URI using the given Default Graph URI.
Declaration
public SparqlRemoteEndpoint(Uri endpointUri, IEnumerable<Uri> defaultGraphUris, IEnumerable<Uri> namedGraphUris)
Parameters
Type | Name | Description |
---|---|---|
Uri | endpointUri | Remote Endpoint URI. |
IEnumerable<Uri> | defaultGraphUris | Default Graph URIs to use when Querying the Endpoint. |
IEnumerable<Uri> | namedGraphUris | Named Graph URIs to use when Querying the Endpoint. |
SparqlRemoteEndpoint(Uri, string)
Creates a new SPARQL Endpoint for the given Endpoint URI using the given Default Graph Uri.
Declaration
public SparqlRemoteEndpoint(Uri endpointUri, string defaultGraphUri)
Parameters
Type | Name | Description |
---|---|---|
Uri | endpointUri | Remote Endpoint URI. |
string | defaultGraphUri | Default Graph URI to use when Querying the Endpoint. |
SparqlRemoteEndpoint(Uri, string, IEnumerable<string>)
Creates a new SPARQL Endpoint for the given Endpoint URI using the given Default Graph URI.
Declaration
public SparqlRemoteEndpoint(Uri endpointUri, string defaultGraphUri, IEnumerable<string> namedGraphUris)
Parameters
Type | Name | Description |
---|---|---|
Uri | endpointUri | Remote Endpoint URI. |
string | defaultGraphUri | Default Graph URI to use when Querying the Endpoint. |
IEnumerable<string> | namedGraphUris | Named Graph URIs to use when Querying the Endpoint. |
SparqlRemoteEndpoint(Uri, Uri)
Creates a new SPARQL Endpoint for the given Endpoint Uri using the given Default Graph Uri.
Declaration
public SparqlRemoteEndpoint(Uri endpointUri, Uri defaultGraphUri)
Parameters
Type | Name | Description |
---|---|---|
Uri | endpointUri | Remote Endpoint URI. |
Uri | defaultGraphUri | Default Graph URI to use when Querying the Endpoint. |
SparqlRemoteEndpoint(Uri, Uri, IEnumerable<string>)
Creates a new SPARQL Endpoint for the given Endpoint URI using the given Default Graph URI.
Declaration
public SparqlRemoteEndpoint(Uri endpointUri, Uri defaultGraphUri, IEnumerable<string> namedGraphUris)
Parameters
Type | Name | Description |
---|---|---|
Uri | endpointUri | Remote Endpoint URI. |
Uri | defaultGraphUri | Default Graph URI to use when Querying the Endpoint. |
IEnumerable<string> | namedGraphUris | Named Graph URIs to use when Querying the Endpoint. |
SparqlRemoteEndpoint(Uri, Uri, IEnumerable<Uri>)
Creates a new SPARQL Endpoint for the given Endpoint URI using the given Default Graph URI.
Declaration
public SparqlRemoteEndpoint(Uri endpointUri, Uri defaultGraphUri, IEnumerable<Uri> namedGraphUris)
Parameters
Type | Name | Description |
---|---|---|
Uri | endpointUri | Remote Endpoint URI. |
Uri | defaultGraphUri | Default Graph URI to use when Querying the Endpoint. |
IEnumerable<Uri> | namedGraphUris | Named Graph URIs to use when Querying the Endpoint. |
Properties
| Edit this page View SourceDefaultGraphs
Gets the Default Graph URIs for Queries made to the SPARQL Endpoint.
Declaration
public List<string> DefaultGraphs { get; }
Property Value
Type | Description |
---|---|
List<string> |
NamedGraphs
Gets the List of Named Graphs used in requests.
Declaration
public List<string> NamedGraphs { get; }
Property Value
Type | Description |
---|---|
List<string> |
RdfAcceptHeader
Gets/Sets the Accept Header sent with CONSTRUCT/DESCRIBE queries.
Declaration
public string RdfAcceptHeader { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
Can be used to workaround buggy endpoints which don't like the broad Accept Header that dotNetRDF sends by default. If not set or explicitly set to null the library uses the default header generated by HttpAcceptHeader.
ResultsAcceptHeader
Gets/Sets the Accept Header sent with ASK/SELECT queries.
Declaration
public string ResultsAcceptHeader { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
Can be used to workaround buggy endpoints which don't like the broad Accept Header that dotNetRDF sends by default. If not set or explicitly set to null the library uses the default header generated by HttpSparqlAcceptHeader.
Methods
| Edit this page View SourceQueryRaw(string)
Makes a Query to a SPARQL Endpoint and returns the raw Response.
Declaration
public virtual HttpWebResponse QueryRaw(string sparqlQuery)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlQuery | SPARQL Query String. |
Returns
Type | Description |
---|---|
HttpWebResponse |
QueryRaw(string, string[])
Makes a Query to a SPARQL Endpoint and returns the raw Response.
Declaration
public virtual HttpWebResponse QueryRaw(string sparqlQuery, string[] mimeTypes)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlQuery | SPARQL Query String. |
string[] | mimeTypes | MIME Types to use for the Accept Header. |
Returns
Type | Description |
---|---|
HttpWebResponse |
QueryWithResultGraph(string)
Makes a Query where the expected Result is an RDF Graph ie. CONSTRUCT and DESCRIBE Queries.
Declaration
public virtual IGraph QueryWithResultGraph(string sparqlQuery)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlQuery | SPARQL Query String. |
Returns
Type | Description |
---|---|
IGraph | RDF Graph. |
QueryWithResultGraph(string, GraphCallback, object)
Makes a Query asynchronously where the expected Result is an RDF Graph ie. CONSTRUCT and DESCRIBE Queries.
Declaration
public void QueryWithResultGraph(string query, GraphCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
string | query | SPARQL Query String. |
GraphCallback | callback | Callback to invoke when the query completes. |
object | state | State to pass to the callback. |
QueryWithResultGraph(IRdfHandler, string)
Makes a Query where the expected Result is an RDF Graph ie. CONSTRUCT and DESCRIBE Queries.
Declaration
public virtual void QueryWithResultGraph(IRdfHandler handler, string sparqlQuery)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | RDF Handler. |
string | sparqlQuery | SPARQL Query String. |
QueryWithResultGraph(IRdfHandler, string, QueryCallback, object)
Makes a Query asynchronously where the expected Result is an RDF Graph ie. CONSTRUCT and DESCRIBE Queries.
Declaration
public void QueryWithResultGraph(IRdfHandler handler, string query, QueryCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | RDF Handler. |
string | query | SPARQL Query String. |
QueryCallback | callback | Callback to invoke when the query completes. |
object | state | State to pass to the callback. |
QueryWithResultSet(string)
Makes a Query where the expected Result is a SparqlResultSet i.e. SELECT and ASK Queries.
Declaration
public virtual SparqlResultSet QueryWithResultSet(string sparqlQuery)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlQuery | SPARQL Query String. |
Returns
Type | Description |
---|---|
SparqlResultSet | A SPARQL Result Set. |
QueryWithResultSet(string, SparqlResultsCallback, object)
Makes a Query asynchronously where the expected Result is a SparqlResultSet i.e. SELECT and ASK Queries.
Declaration
public void QueryWithResultSet(string query, SparqlResultsCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
string | query | SPARQL Query String. |
SparqlResultsCallback | callback | Callback to invoke when the query completes. |
object | state | State to pass to the callback. |
QueryWithResultSet(ISparqlResultsHandler, string)
Makes a Query where the expected Result is a SparqlResultSet i.e. SELECT and ASK Queries.
Declaration
public virtual void QueryWithResultSet(ISparqlResultsHandler handler, string sparqlQuery)
Parameters
Type | Name | Description |
---|---|---|
ISparqlResultsHandler | handler | Results Handler. |
string | sparqlQuery | SPARQL Query String. |
QueryWithResultSet(ISparqlResultsHandler, string, QueryCallback, object)
Makes a Query asynchronously where the expected Result is a SparqlResultSet i.e. SELECT and ASK Queries.
Declaration
public void QueryWithResultSet(ISparqlResultsHandler handler, string query, QueryCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
ISparqlResultsHandler | handler | Results Handler. |
string | query | SPARQL Query String. |
QueryCallback | callback | Callback to invoke when the query completes. |
object | state | State to pass to the callback. |
SerializeConfiguration(ConfigurationSerializationContext)
Serializes the Endpoint's Configuration.
Declaration
public override void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationSerializationContext | context | Configuration Serialization Context. |