Show / Hide Table of Contents

Class FederatedSparqlRemoteEndpoint

A Class for connecting to multiple remote SPARQL Endpoints and federating queries over them with the data merging done locally.

Inheritance
object
BaseEndpoint
SparqlRemoteEndpoint
FederatedSparqlRemoteEndpoint
Implements
IConfigurationSerializable
Inherited Members
SparqlRemoteEndpoint.DefaultGraphs
SparqlRemoteEndpoint.NamedGraphs
SparqlRemoteEndpoint.ResultsAcceptHeader
SparqlRemoteEndpoint.RdfAcceptHeader
SparqlRemoteEndpoint.QueryWithResultSet(string, SparqlResultsCallback, object)
SparqlRemoteEndpoint.QueryWithResultSet(ISparqlResultsHandler, string, QueryCallback, object)
SparqlRemoteEndpoint.QueryWithResultGraph(string, GraphCallback, object)
SparqlRemoteEndpoint.QueryWithResultGraph(IRdfHandler, string, QueryCallback, object)
BaseEndpoint.Uri
BaseEndpoint.Credentials
BaseEndpoint.UserAgent
BaseEndpoint.HttpMode
BaseEndpoint.Timeout
BaseEndpoint.SetCredentials(string, string)
BaseEndpoint.SetCredentials(string, string, string)
BaseEndpoint.ClearCredentials()
BaseEndpoint.UseCredentialsForProxy
BaseEndpoint.SetProxy(string)
BaseEndpoint.SetProxy(Uri)
BaseEndpoint.Proxy
BaseEndpoint.ClearProxy()
BaseEndpoint.SetProxyCredentials(string, string)
BaseEndpoint.SetProxyCredentials(string, string, string)
BaseEndpoint.ProxyCredentials
BaseEndpoint.ClearProxyCredentials()
BaseEndpoint.ApplyRequestOptions(HttpWebRequest)
BaseEndpoint.ApplyCustomRequestOptions(HttpWebRequest)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VDS.RDF.Query
Assembly: dotNetRdf.dll
Syntax
[Obsolete("Replaced by VDS.RDF.Query.FederatedSparqlQueryClient")]
public class FederatedSparqlRemoteEndpoint : SparqlRemoteEndpoint, IConfigurationSerializable
Remarks

Queries are federated by executing multiple requesting simultaneously and asynchronously against the endpoints in question with the data then merged locally. The merging process does not attempt to remove duplicate data it just naively merges the data.

Constructors

| Edit this page View Source

FederatedSparqlRemoteEndpoint(IEnumerable<Uri>)

Creates a new Federated SPARQL Endpoint by creating a SparqlRemoteEndpoint for each of the given URI.

Declaration
public FederatedSparqlRemoteEndpoint(IEnumerable<Uri> endpointUris)
Parameters
Type Name Description
IEnumerable<Uri> endpointUris

Endpoint URIs.

| Edit this page View Source

FederatedSparqlRemoteEndpoint(IEnumerable<SparqlRemoteEndpoint>)

Creates a new Federated SPARQL Endpoint using the given Endpoints.

Declaration
public FederatedSparqlRemoteEndpoint(IEnumerable<SparqlRemoteEndpoint> endpoints)
Parameters
Type Name Description
IEnumerable<SparqlRemoteEndpoint> endpoints

Endpoints.

| Edit this page View Source

FederatedSparqlRemoteEndpoint(Uri)

Creates a new Federated SPARQL Endpoint by creating a new SparqlRemoteEndpoint for the given URI.

Declaration
public FederatedSparqlRemoteEndpoint(Uri endpointUri)
Parameters
Type Name Description
Uri endpointUri

Endpoint URI.

| Edit this page View Source

FederatedSparqlRemoteEndpoint(SparqlRemoteEndpoint)

Creates a new Federated SPARQL Endpoint using a given Endpoint.

Declaration
public FederatedSparqlRemoteEndpoint(SparqlRemoteEndpoint endpoint)
Parameters
Type Name Description
SparqlRemoteEndpoint endpoint

Endpoint.

Properties

| Edit this page View Source

IgnoreFailedRequests

Gets/Sets whether a failed request on one endpoint should cause the entire request to fail.

Declaration
public bool IgnoreFailedRequests { get; set; }
Property Value
Type Description
bool
Remarks

By default if a request on any of the endpoint fails or times out then the entire request will fail.

| Edit this page View Source

MaxSimultaneousRequests

Gets/Sets the maximum number of endpoints this endpoint will issue queries to at any one time.

Declaration
public int MaxSimultaneousRequests { get; set; }
Property Value
Type Description
int

Methods

| Edit this page View Source

AddEndpoint(Uri)

Adds an additional endpoint to be used by this endpoint.

Declaration
public void AddEndpoint(Uri endpointUri)
Parameters
Type Name Description
Uri endpointUri

Endpoint URI.

| Edit this page View Source

AddEndpoint(SparqlRemoteEndpoint)

Adds a additional endpoint to be used by this endpoint.

Declaration
public void AddEndpoint(SparqlRemoteEndpoint endpoint)
Parameters
Type Name Description
SparqlRemoteEndpoint endpoint

Endpoint.

| Edit this page View Source

QueryRaw(string)

Makes a Query to a Sparql Endpoint and returns the raw Response.

Declaration
public override HttpWebResponse QueryRaw(string sparqlQuery)
Parameters
Type Name Description
string sparqlQuery

Sparql Query String.

Returns
Type Description
HttpWebResponse
Overrides
SparqlRemoteEndpoint.QueryRaw(string)
Exceptions
Type Condition
NotSupportedException

Thrown if more than one endpoint is in use since for any federated endpoint which used more than one endpoint there is no logical/sensible way to combine the result streams.

| Edit this page View Source

QueryRaw(string, string[])

Makes a Query to a Sparql Endpoint and returns the raw Response.

Declaration
public override 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
Overrides
SparqlRemoteEndpoint.QueryRaw(string, string[])
Exceptions
Type Condition
NotSupportedException

Thrown if more than one endpoint is in use since for any federated endpoint which used more than one endpoint there is no logical/sensible way to combine the result streams.

| Edit this page View Source

QueryWithResultGraph(string)

Makes a Query where the expected Result is an RDF Graph ie. CONSTRUCT and DESCRIBE Queries.

Declaration
public override IGraph QueryWithResultGraph(string sparqlQuery)
Parameters
Type Name Description
string sparqlQuery

SPARQL Query String.

Returns
Type Description
IGraph

RDF Graph.

Overrides
SparqlRemoteEndpoint.QueryWithResultGraph(string)
Remarks

The query is executed by sending it federating it to all the endpoints this endpoint contains using simultaneous asychronous calls. Once these calls complete the results are naivley merged together (no duplicate data removal) and returned as a single result.

By default if any of the endpoints used return an error then the entire query will fail and an exception will be thrown, this behaviour can be overridden by setting the IgnoreFailedRequests property to be true in which case the result will be the merge of the results from all endpoints which successfully provided a result.

Exceptions
Type Condition
RdfQueryException

Thrown if any of the requests to the endpoints fail.

RdfQueryTimeoutException

Thrown if not all the requests complete within the set timeout.

| Edit this page View Source

QueryWithResultGraph(IRdfHandler, string)

Makes a Query where the expected result is a Graph i.e. a CONSTRUCT or DESCRIBE query.

Declaration
public override void QueryWithResultGraph(IRdfHandler handler, string sparqlQuery)
Parameters
Type Name Description
IRdfHandler handler

RDF Handler to process the results.

string sparqlQuery

SPARQL Query.

Overrides
SparqlRemoteEndpoint.QueryWithResultGraph(IRdfHandler, string)
| Edit this page View Source

QueryWithResultSet(string)

Makes a Query where the expected Result is a SparqlResultSet ie. SELECT and ASK Queries.

Declaration
public override SparqlResultSet QueryWithResultSet(string sparqlQuery)
Parameters
Type Name Description
string sparqlQuery

Sparql Query String.

Returns
Type Description
SparqlResultSet

A Sparql Result Set.

Overrides
SparqlRemoteEndpoint.QueryWithResultSet(string)
Remarks

The query is executed by sending it federating it to all the endpoints this endpoint contains using simultaneous asychronous calls. Once these calls complete the results are naivley merged together (no duplicate data removal) and returned as a single result.

By default if any of the endpoints used return an error then the entire query will fail and an exception will be thrown, this behaviour can be overridden by setting the IgnoreFailedRequests property to be true in which case the result will be the merge of the results from all endpoints which successfully provided a result.

Exceptions
Type Condition
RdfQueryException

Thrown if any of the requests to the endpoints fail.

RdfQueryTimeoutException

Thrown if not all the requests complete within the set timeout.

| Edit this page View Source

QueryWithResultSet(ISparqlResultsHandler, string)

Makes a Query where the expected Result is a SparqlResultSet ie. SELECT and ASK Queries.

Declaration
public override void QueryWithResultSet(ISparqlResultsHandler handler, string sparqlQuery)
Parameters
Type Name Description
ISparqlResultsHandler handler

Results Handler to process the results.

string sparqlQuery

SPARQL Query String.

Overrides
SparqlRemoteEndpoint.QueryWithResultSet(ISparqlResultsHandler, string)
Exceptions
Type Condition
RdfQueryException

Thrown if any of the requests to the endpoints fail.

RdfQueryTimeoutException

Thrown if not all the requests complete within the set timeout.

| Edit this page View Source

RemoveEndpoint(Uri)

Removes all endpoints with the given URI from this endpoint.

Declaration
public void RemoveEndpoint(Uri endpointUri)
Parameters
Type Name Description
Uri endpointUri

Endpoint URI.

| Edit this page View Source

RemoveEndpoint(SparqlRemoteEndpoint)

Removes a given endpoint from this endpoint.

Declaration
public void RemoveEndpoint(SparqlRemoteEndpoint endpoint)
Parameters
Type Name Description
SparqlRemoteEndpoint endpoint

Endpoint.

| Edit this page View Source

SerializeConfiguration(ConfigurationSerializationContext)

Serializes the Endpoint's Configuration.

Declaration
public override void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type Name Description
ConfigurationSerializationContext context

Configuration Serialization Context.

Overrides
SparqlRemoteEndpoint.SerializeConfiguration(ConfigurationSerializationContext)

Implements

IConfigurationSerializable

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • FederatedSparqlRemoteEndpoint(IEnumerable<Uri>)
    • FederatedSparqlRemoteEndpoint(IEnumerable<SparqlRemoteEndpoint>)
    • FederatedSparqlRemoteEndpoint(Uri)
    • FederatedSparqlRemoteEndpoint(SparqlRemoteEndpoint)
  • Properties
    • IgnoreFailedRequests
    • MaxSimultaneousRequests
  • Methods
    • AddEndpoint(Uri)
    • AddEndpoint(SparqlRemoteEndpoint)
    • QueryRaw(string)
    • QueryRaw(string, string[])
    • QueryWithResultGraph(string)
    • QueryWithResultGraph(IRdfHandler, string)
    • QueryWithResultSet(string)
    • QueryWithResultSet(ISparqlResultsHandler, string)
    • RemoveEndpoint(Uri)
    • RemoveEndpoint(SparqlRemoteEndpoint)
    • SerializeConfiguration(ConfigurationSerializationContext)
  • Implements
  • Extension Methods
Back to top Generated by DocFX