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
| Improve this Doc View SourceSparqlRemoteEndpoint()
Empty Constructor for use by derived classes.
Declaration
protected SparqlRemoteEndpoint()
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 |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
System.Collections.Generic.IEnumerable<T><string> | defaultGraphUris | Default Graph URIs to use when Querying the Endpoint. |
System.Collections.Generic.IEnumerable<T><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 |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
System.Collections.Generic.IEnumerable<T><string> | defaultGraphUris | Default Graph URIs to use when Querying the Endpoint. |
System.Collections.Generic.IEnumerable<T><System.Uri> | namedGraphUris | Named Graph URIs to use when Querying the Endpoint. |
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 |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
System.Collections.Generic.IEnumerable<T><string> | 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 |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
System.Collections.Generic.IEnumerable<T><System.Uri> | defaultGraphUris | Default Graph URIs to use when Querying the Endpoint. |
System.Collections.Generic.IEnumerable<T><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 |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
System.Collections.Generic.IEnumerable<T><System.Uri> | defaultGraphUris | Default Graph URIs to use when Querying the Endpoint. |
System.Collections.Generic.IEnumerable<T><System.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 |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
System.Collections.Generic.IEnumerable<T><System.Uri> | defaultGraphUris | Default Graph URIs 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 |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
string | defaultGraphUri | Default Graph URI to use when Querying the Endpoint. |
System.Collections.Generic.IEnumerable<T><string> | 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 |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
string | 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 |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
System.Uri | defaultGraphUri | Default Graph URI to use when Querying the Endpoint. |
System.Collections.Generic.IEnumerable<T><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 |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
System.Uri | defaultGraphUri | Default Graph URI to use when Querying the Endpoint. |
System.Collections.Generic.IEnumerable<T><System.Uri> | 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 |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
System.Uri | defaultGraphUri | Default Graph URI to use when Querying the Endpoint. |
SparqlRemoteEndpoint(Uri)
Creates a new SPARQL Endpoint for the given Endpoint URI.
Declaration
public SparqlRemoteEndpoint(Uri endpointUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
Properties
| Improve this Doc View SourceDefaultGraphs
Gets the Default Graph URIs for Queries made to the SPARQL Endpoint.
Declaration
public List<string> DefaultGraphs { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<T><string> |
NamedGraphs
Gets the List of Named Graphs used in requests.
Declaration
public List<string> NamedGraphs { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<T><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
| Improve this Doc View SourceQueryRaw(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 |
---|---|
System.Net.HttpWebResponse |
QueryRaw(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 |
---|---|
System.Net.HttpWebResponse |
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. |
System.Object | state | State to pass to the callback. |
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(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. |
System.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. |
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. |
System.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(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. |
System.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. |
SerializeConfiguration(ConfigurationSerializationContext)
Serializes the Endpoint's Configuration.
Declaration
public override void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationSerializationContext | context | Configuration Serialization Context. |