Class FusekiConnector
Class for connecting to any dataset that can be exposed via Fuseki.
Inheritance
Implements
Inherited Members
Namespace: VDS.RDF.Storage
Assembly: dotNetRdf.Client.dll
Syntax
public class FusekiConnector : SparqlHttpProtocolConnector, IConfigurationSerializable, IAsyncUpdateableStorage, IAsyncQueryableStorage, IAsyncStorageProvider, IUpdateableStorage, IQueryableStorage, IStorageProvider, IStorageCapabilities, IDisposable
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
Constructors
| Improve this Doc View SourceFusekiConnector(string, IWebProxy)
Creates a new connection to a Fuseki Server.
Declaration
public FusekiConnector(string serviceUri, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
string | serviceUri | The /data URI of the Fuseki Server. |
System.Net.IWebProxy | proxy | Proxy Server. |
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
FusekiConnector(string, MimeTypeDefinition)
Creates a new connection to a Fuseki Server.
Declaration
public FusekiConnector(string serviceUri, MimeTypeDefinition writerMimeTypeDefinition = null)
Parameters
Type | Name | Description |
---|---|---|
string | serviceUri | The /data URI of the Fuseki Server. |
MimeTypeDefinition | writerMimeTypeDefinition | The MIME type of the syntax to use when sending RDF data to the server. Defaults to RDF/XML. |
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
FusekiConnector(Uri, IWebProxy)
Creates a new connection to a Fuseki Server.
Declaration
public FusekiConnector(Uri serviceUri, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | serviceUri | The /data URI of the Fuseki Server. |
System.Net.IWebProxy | proxy | Proxy Server. |
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
FusekiConnector(Uri, MimeTypeDefinition)
Creates a new connection to a Fuseki Server.
Declaration
public FusekiConnector(Uri serviceUri, MimeTypeDefinition writerMimeTypeDefinition = null)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | serviceUri | The /data URI of the Fuseki Server. |
MimeTypeDefinition | writerMimeTypeDefinition | The MIME type of the syntax to use when sending RDF data to the server. Defaults to RDF/XML. |
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
Properties
| Improve this Doc View SourceIOBehaviour
Gets the IO Behaviour of the Store.
Declaration
public override IOBehaviour IOBehaviour { get; }
Property Value
Type | Description |
---|---|
IOBehaviour |
Overrides
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
ListGraphsSupported
Returns that Listing Graphs is supported.
Declaration
public override bool ListGraphsSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
UpdateSupported
Returns that Triple level updates are supported using Fuseki.
Declaration
public override bool UpdateSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
Methods
| Improve this Doc View SourceListGraphNames()
Gets an enumeration of the names of the graphs in the store.
Declaration
public override IEnumerable<string> ListGraphNames()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><string> |
Overrides
Remarks
Implementations should implement this method only if they need to provide a custom way of listing Graphs. If the Store for which you are providing a manager can efficiently return the Graphs using a SELECT DISTINCT ?g WHERE { GRAPH ?g { ?s ?p ?o } } query then there should be no need to implement this function.
ListGraphs()
Gets the List of Graphs from the store.
Declaration
[Obsolete("Replaced by ListGraphNames")]
public override IEnumerable<Uri> ListGraphs()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><System.Uri> |
Overrides
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
ListGraphs(AsyncStorageCallback, object)
Lists the graph sin the Store asynchronously.
Declaration
[Obsolete("Replaced with ListGraphsAsync(CancellationToken)")]
public override void ListGraphs(AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Overrides
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
ListGraphsAsync(CancellationToken)
List the names of the graph on the remote server asynchronously.
Declaration
public override Task<IEnumerable<string>> ListGraphsAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult><System.Collections.Generic.IEnumerable<T><string>> | Task that returns the list of graph names. |
Overrides
Remarks
This implementation uses a SPARQL query to list the names of the graphs in the store. Many stores support more efficient means of listing graphs and so this method SHOULD be overridden. If the store does not implement the IAsyncQueryableStorage interface, then this method MUST be overridden.
Exceptions
Type | Condition |
---|---|
RdfStorageException | Raised if the store does not support the asynchronous SPARQL query required to retrieve a list of graph names. |
Query(string, AsyncStorageCallback, object)
Makes a SPARQL Query against the underlying store.
Declaration
public void Query(string sparqlQuery, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlQuery | SPARQL Query. |
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
Query(string)
Executes a SPARQL Query on the Fuseki store.
Declaration
public object Query(string sparqlQuery)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlQuery | SPARQL Query. |
Returns
Type | Description |
---|---|
System.Object |
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
Query(IRdfHandler, ISparqlResultsHandler, string, AsyncStorageCallback, object)
Executes a SPARQL Query on the Fuseki store processing the results using an appropriate handler from those provided.
Declaration
public void Query(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string sparqlQuery, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | rdfHandler | RDF Handler. |
ISparqlResultsHandler | resultsHandler | Results Handler. |
string | sparqlQuery | SPARQL Query. |
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
Query(IRdfHandler, ISparqlResultsHandler, string)
Executes a SPARQL Query on the Fuseki store processing the results using an appropriate handler from those provided.
Declaration
public void Query(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string sparqlQuery)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | rdfHandler | RDF Handler. |
ISparqlResultsHandler | resultsHandler | Results Handler. |
string | sparqlQuery | SPARQL Query. |
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
QueryAsync(string, CancellationToken)
Queries the store asynchronously.
Declaration
public Task<object> QueryAsync(string sparqlQuery, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlQuery | SPARQL Query. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult><System.Object> |
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
QueryAsync(IRdfHandler, ISparqlResultsHandler, string, CancellationToken)
Queries the store asynchronously.
Declaration
public Task QueryAsync(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string sparqlQuery, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | rdfHandler | RDF Handler that will receive graph results from CONSTRUCT or DESCRIBE queries. |
ISparqlResultsHandler | resultsHandler | SPARQL Results set handler that will receive results from ASK or SELECT queries. |
string | sparqlQuery | The SPARQL query to execute. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
SerializeConfiguration(ConfigurationSerializationContext)
Serializes the connection's configuration.
Declaration
public override void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationSerializationContext | context | Configuration Serialization Context. |
Overrides
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
ToString()
Gets a String which gives details of the Connection.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
Update(string, AsyncStorageCallback, object)
Executes SPARQL Updates against the Fuseki store.
Declaration
public void Update(string sparqlUpdate, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlUpdate | SPARQL Update. |
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
Update(string)
Executes SPARQL Updates against the Fuseki store.
Declaration
public void Update(string sparqlUpdate)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlUpdate | SPARQL Update. |
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
UpdateAsync(string, CancellationToken)
Updates the store asynchronously.
Declaration
public Task UpdateAsync(string sparqlUpdates, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlUpdates | |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
UpdateGraph(string, IEnumerable<Triple>, IEnumerable<Triple>, AsyncStorageCallback, object)
Updates a Graph on the Fuseki Server.
Declaration
public override void UpdateGraph(string graphUri, IEnumerable<Triple> additions, IEnumerable<Triple> removals, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
string | graphUri | URI of the Graph to update. |
System.Collections.Generic.IEnumerable<T><Triple> | additions | Triples to be added. |
System.Collections.Generic.IEnumerable<T><Triple> | removals | Triples to be removed. |
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Overrides
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
UpdateGraph(string, IEnumerable<Triple>, IEnumerable<Triple>)
Updates a Graph in the Fuseki store.
Declaration
public override void UpdateGraph(string graphUri, IEnumerable<Triple> additions, IEnumerable<Triple> removals)
Parameters
Type | Name | Description |
---|---|---|
string | graphUri | URI of the Graph to update. |
System.Collections.Generic.IEnumerable<T><Triple> | additions | Triples to be added. |
System.Collections.Generic.IEnumerable<T><Triple> | removals | Triples to be removed. |
Overrides
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
UpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>)
Updates a Graph in the Fuseki store.
Declaration
public override void UpdateGraph(Uri graphUri, IEnumerable<Triple> additions, IEnumerable<Triple> removals)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | URI of the Graph to update. |
System.Collections.Generic.IEnumerable<T><Triple> | additions | Triples to be added. |
System.Collections.Generic.IEnumerable<T><Triple> | removals | Triples to be removed. |
Overrides
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.
UpdateGraphAsync(string, IEnumerable<Triple>, IEnumerable<Triple>, CancellationToken)
Updates a graph in the store asynchronously.
Declaration
public override Task UpdateGraphAsync(string graphUri, IEnumerable<Triple> additions, IEnumerable<Triple> removals, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | graphUri | |
System.Collections.Generic.IEnumerable<T><Triple> | additions | Triples to be added. |
System.Collections.Generic.IEnumerable<T><Triple> | removals | Triples to be removed. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
Remarks
Uses all three Services provided by a Fuseki instance - Query, Update and HTTP Update.