Class SparqlRemoteEndpoint
A Class for connecting to a remote SPARQL Endpoint and executing Queries against it.
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: VDS.RDF.Query
Assembly: dotNetRDF.dll
Syntax
public class SparqlRemoteEndpoint : BaseEndpoint, IConfigurationSerializable
Constructors
| Improve this Doc 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 |
---|---|---|
System.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 |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
System.Collections.Generic.IEnumerable<System.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 |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
System.Collections.Generic.IEnumerable<System.String> | defaultGraphUris | Default Graph URIs to use when Querying the Endpoint. |
System.Collections.Generic.IEnumerable<System.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<System.String> | defaultGraphUris | Default Graph URIs to use when Querying the Endpoint. |
System.Collections.Generic.IEnumerable<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<System.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 |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
System.Collections.Generic.IEnumerable<System.Uri> | defaultGraphUris | Default Graph URIs to use when Querying the Endpoint. |
System.Collections.Generic.IEnumerable<System.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<System.Uri> | defaultGraphUris | Default Graph URIs to use when Querying the Endpoint. |
System.Collections.Generic.IEnumerable<System.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 |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
System.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 |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
System.String | defaultGraphUri | Default Graph URI to use when Querying the Endpoint. |
System.Collections.Generic.IEnumerable<System.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 |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
System.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 |
---|---|---|
System.Uri | endpointUri | Remote Endpoint URI. |
System.Uri | defaultGraphUri | Default Graph URI to use when Querying the Endpoint. |
System.Collections.Generic.IEnumerable<System.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<System.Uri> | namedGraphUris | Named Graph URIs to use when Querying the Endpoint. |
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<System.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<System.String> |
RdfAcceptHeader
Gets/Sets the Accept Header sent with CONSTRUCT/DESCRIBE queries.
Declaration
public string RdfAcceptHeader { get; set; }
Property Value
Type | Description |
---|---|
System.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 |
---|---|
System.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)
Makes a Query to a SPARQL Endpoint and returns the raw Response.
Declaration
public virtual HttpWebResponse QueryRaw(string sparqlQuery)
Parameters
Type | Name | Description |
---|---|---|
System.String | sparqlQuery | SPARQL Query String. |
Returns
Type | Description |
---|---|
System.Net.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 |
---|---|---|
System.String | sparqlQuery | SPARQL Query String. |
System.String[] | mimeTypes | MIME Types to use for the Accept Header. |
Returns
Type | Description |
---|---|
System.Net.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 |
---|---|---|
System.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 |
---|---|---|
System.String | query | SPARQL Query String. |
GraphCallback | 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. |
System.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. |
System.String | query | SPARQL Query String. |
QueryCallback | 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 |
---|---|---|
System.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 |
---|---|---|
System.String | query | SPARQL Query String. |
SparqlResultsCallback | 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. |
System.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. |
System.String | query | SPARQL Query String. |
QueryCallback | callback | Callback to invoke when the query completes. |
System.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. |