Class FederatedSparqlRemoteEndpoint
A Class for connecting to multiple remote SPARQL Endpoints and federating queries over them with the data merging done locally.
Implements
Inherited Members
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
| Improve this Doc View SourceFederatedSparqlRemoteEndpoint(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 |
---|---|---|
System.Collections.Generic.IEnumerable<T><System.Uri> | endpointUris | Endpoint URIs. |
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.
FederatedSparqlRemoteEndpoint(IEnumerable<SparqlRemoteEndpoint>)
Creates a new Federated SPARQL Endpoint using the given Endpoints.
Declaration
public FederatedSparqlRemoteEndpoint(IEnumerable<SparqlRemoteEndpoint> endpoints)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T><SparqlRemoteEndpoint> | endpoints | Endpoints. |
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.
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 |
---|---|---|
System.Uri | endpointUri | Endpoint URI. |
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.
FederatedSparqlRemoteEndpoint(SparqlRemoteEndpoint)
Creates a new Federated SPARQL Endpoint using a given Endpoint.
Declaration
public FederatedSparqlRemoteEndpoint(SparqlRemoteEndpoint endpoint)
Parameters
Type | Name | Description |
---|---|---|
SparqlRemoteEndpoint | endpoint | Endpoint. |
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.
Properties
| Improve this Doc View SourceIgnoreFailedRequests
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 |
---|---|
System.Boolean |
Remarks
By default if a request on any of the endpoint fails or times out then the entire request will fail.
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 |
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.
Methods
| Improve this Doc View SourceAddEndpoint(Uri)
Adds an additional endpoint to be used by this endpoint.
Declaration
public void AddEndpoint(Uri endpointUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | endpointUri | Endpoint URI. |
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.
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. |
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.
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 |
---|---|
System.Net.HttpWebResponse |
Overrides
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.
Exceptions
Type | Condition |
---|---|
System.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. |
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 |
---|---|
System.Net.HttpWebResponse |
Overrides
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.
Exceptions
Type | Condition |
---|---|
System.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. |
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
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. |
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
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.
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
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. |
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
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.
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. |
RemoveEndpoint(Uri)
Removes all endpoints with the given URI from this endpoint.
Declaration
public void RemoveEndpoint(Uri endpointUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | endpointUri | Endpoint URI. |
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.
RemoveEndpoint(SparqlRemoteEndpoint)
Removes a given endpoint from this endpoint.
Declaration
public void RemoveEndpoint(SparqlRemoteEndpoint endpoint)
Parameters
Type | Name | Description |
---|---|---|
SparqlRemoteEndpoint | endpoint | Endpoint. |
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.
SerializeConfiguration(ConfigurationSerializationContext)
Serializes the Endpoint's Configuration.
Declaration
public override void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationSerializationContext | context | Configuration Serialization Context. |
Overrides
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.