Class SparqlHttpProtocolConnector
Class for connecting to any store that implements the SPARQL Graph Store HTTP Protocol for Managing Graphs.
Inheritance
Implements
Inherited Members
Namespace: VDS.RDF.Storage
Assembly: dotNetRdf.dll
Syntax
public class SparqlHttpProtocolConnector : BaseAsyncHttpConnector, IConfigurationSerializable, IAsyncStorageProvider, IStorageProvider, IStorageCapabilities, IDisposable
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
Constructors
| Improve this Doc View SourceSparqlHttpProtocolConnector(string, IWebProxy)
Creates a new SPARQL Graph Store HTTP Protocol Connector.
Declaration
public SparqlHttpProtocolConnector(string serviceUri, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
string | serviceUri | URI of the Protocol Server. |
System.Net.IWebProxy | proxy | Proxy Server. |
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
SparqlHttpProtocolConnector(string, MimeTypeDefinition)
Creates a new SPARQL Graph Store HTTP Protocol Connector.
Declaration
public SparqlHttpProtocolConnector(string serviceUri, MimeTypeDefinition writerMimeTypeDefinition = null)
Parameters
Type | Name | Description |
---|---|---|
string | serviceUri | URI of the Protocol Server. |
MimeTypeDefinition | writerMimeTypeDefinition | The MIME type specifying the syntax to use when sending RDF data to the server. Defaults to "application/rdf+xml". |
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
SparqlHttpProtocolConnector(Uri, IWebProxy)
Creates a new SPARQL Graph Store HTTP Protocol Connector.
Declaration
public SparqlHttpProtocolConnector(Uri serviceUri, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | serviceUri | URI of the Protocol Server. |
System.Net.IWebProxy | proxy | Proxy Server. |
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
SparqlHttpProtocolConnector(Uri)
Creates a new SPARQL Graph Store HTTP Protocol Connector.
Declaration
public SparqlHttpProtocolConnector(Uri serviceUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | serviceUri | URI of the Protocol Server. |
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
Fields
| Improve this Doc View Source_serviceUri
URI of the Protocol Server.
Declaration
protected string _serviceUri
Field Value
Type | Description |
---|---|
string |
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
_writerMimeTypeDefinition
The MIME type of the syntax to use when sending RDF data to the server.
Declaration
protected MimeTypeDefinition _writerMimeTypeDefinition
Field Value
Type | Description |
---|---|
MimeTypeDefinition |
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
Properties
| Improve this Doc View SourceDeleteSupported
Returns that deleting Graphs is supported.
Declaration
public override bool DeleteSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
IOBehaviour
Gets the IO Behaviour of SPARQL Graph Store protocol based stores.
Declaration
public override IOBehaviour IOBehaviour { get; }
Property Value
Type | Description |
---|---|
IOBehaviour |
Overrides
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
IsReadOnly
Gets that the Store is not read-only.
Declaration
public override bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
IsReady
Gets that the Store is ready.
Declaration
public override bool IsReady { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
ListGraphsSupported
Returns that listing Graphs is not supported.
Declaration
public override bool ListGraphsSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
UpdateSupported
Gets that Updates are supported.
Declaration
public override bool UpdateSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
Methods
| Improve this Doc View SourceDeleteGraph(string, AsyncStorageCallback, object)
Deletes a Graph from the store asynchronously.
Declaration
public override void DeleteGraph(string graphUri, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
string | graphUri | URI of the graph to delete. |
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Overrides
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
DeleteGraph(string)
Deletes a Graph from the store.
Declaration
public virtual void DeleteGraph(string graphUri)
Parameters
Type | Name | Description |
---|---|---|
string | graphUri | URI of the Graph to delete. |
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
DeleteGraph(Uri)
Deletes a Graph from the store.
Declaration
public virtual void DeleteGraph(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | URI of the Graph to delete. |
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
DeleteGraphAsync(string, CancellationToken)
Deletes a graph from the store asynchronously.
Declaration
public override Task DeleteGraphAsync(string graphName, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | graphName | Name of the graph to delete. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
HasGraph(string)
Sends a HEAD Command to the Protocol Server to determine whether a given Graph exists.
Declaration
public virtual bool HasGraph(string graphUri)
Parameters
Type | Name | Description |
---|---|---|
string | graphUri | URI of the Graph to check for. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
HasGraph(Uri)
Sends a HEAD Command to the Protocol Server to determine whether a given Graph exists.
Declaration
public virtual bool HasGraph(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | URI of the Graph to check for. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
ListGraphNames()
Gets an enumeration of the names of the graphs in the store.
Declaration
public virtual IEnumerable<string> ListGraphNames()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><string> |
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()
Throws an exception as listing graphs in a SPARQL Graph Store HTTP Protocol does not support listing graphs.
Declaration
[Obsolete("Replaced by ListGraphNames")]
public virtual IEnumerable<Uri> ListGraphs()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><System.Uri> |
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown since SPARQL Graph Store HTTP Protocol does not support listing graphs. |
ListGraphs(AsyncStorageCallback, object)
Lists the Graphs in 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
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
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. |
LoadGraph(IGraph, string, AsyncStorageCallback, object)
Loads a Graph from the Protocol Server.
Declaration
public override void LoadGraph(IGraph g, string graphUri, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to load into. |
string | graphUri | URI of the Graph to load. |
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Overrides
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
LoadGraph(IGraph, string)
Loads a Graph from the Protocol Server.
Declaration
public virtual void LoadGraph(IGraph g, string graphUri)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to load into. |
string | graphUri | URI of the Graph to load. |
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
LoadGraph(IGraph, Uri)
Loads a Graph from the Protocol Server.
Declaration
public virtual void LoadGraph(IGraph g, Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to load into. |
System.Uri | graphUri | URI of the Graph to load. |
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
LoadGraph(IRdfHandler, string, AsyncStorageCallback, object)
Loads a Graph from the Protocol Server.
Declaration
public override void LoadGraph(IRdfHandler handler, string graphUri, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | RDF Handler. |
string | graphUri | URI of the Graph to load. |
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Overrides
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
LoadGraph(IRdfHandler, string)
Loads a Graph from the Protocol Server.
Declaration
public virtual void LoadGraph(IRdfHandler handler, string graphUri)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | RDF Handler. |
string | graphUri | URI of the Graph to load. |
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
LoadGraph(IRdfHandler, Uri)
Loads a Graph from the Protocol Server.
Declaration
public virtual void LoadGraph(IRdfHandler handler, Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | RDF Handler. |
System.Uri | graphUri | URI of the Graph to load. |
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
LoadGraphAsync(IRdfHandler, string, CancellationToken)
Loads a graph from the store asynchronously.
Declaration
public override Task LoadGraphAsync(IRdfHandler handler, string graphName, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | The handler to receive the loaded triples. |
string | graphName | Name of the graph to load. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
SaveGraph(IGraph, AsyncStorageCallback, object)
Saves a Graph to the Protocol Server.
Declaration
public override void SaveGraph(IGraph g, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to save. |
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Overrides
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
SaveGraph(IGraph)
Saves a Graph to the Protocol Server.
Declaration
public virtual void SaveGraph(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to save. |
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
SaveGraphAsync(IGraph, CancellationToken)
Saves a Graph to the Store asynchronously.
Declaration
public override Task SaveGraphAsync(IGraph g, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to save. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
SerializeConfiguration(ConfigurationSerializationContext)
Serializes the connection's configuration.
Declaration
public virtual void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationSerializationContext | context | Configuration Serialization Context. |
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
ToString()
Gets a String representation of the connection.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
Remarks
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.
UpdateGraph(string, IEnumerable<Triple>, IEnumerable<Triple>, AsyncStorageCallback, object)
Updates a Graph on the Protocol 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
Note: The SPARQL Graph Store HTTP Protocol for Graph Management only supports the addition of Triples to a Graph and does not support removal of Triples from a Graph. If you attempt to remove Triples then an RdfStorageException will be thrown.
UpdateGraph(string, IEnumerable<Triple>, IEnumerable<Triple>)
Updates a Graph on the Protocol Server.
Declaration
public virtual 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. |
Remarks
Note: The SPARQL Graph Store HTTP Protocol for Graph Management only supports the addition of Triples to a Graph and does not support removal of Triples from a Graph. If you attempt to remove Triples then an RdfStorageException will be thrown.
UpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>)
Updates a Graph on the Protocol Server.
Declaration
public virtual 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. |
Remarks
Note: The SPARQL Graph Store HTTP Protocol for Graph Management only supports the addition of Triples to a Graph and does not support removal of Triples from a Graph. If you attempt to remove Triples then an RdfStorageException will be thrown.
UpdateGraph(IRefNode, IEnumerable<Triple>, IEnumerable<Triple>)
Updates a Graph in the Store.
Declaration
public virtual void UpdateGraph(IRefNode graphName, IEnumerable<Triple> additions, IEnumerable<Triple> removals)
Parameters
Type | Name | Description |
---|---|---|
IRefNode | graphName | Name of the Graph to update. |
System.Collections.Generic.IEnumerable<T><Triple> | additions | Triples to add to the Graph. |
System.Collections.Generic.IEnumerable<T><Triple> | removals | Triples to remove from the Graph. |
Remarks
Note: Not all Stores are capable of supporting update at the individual Triple level and as such it is acceptable for such a Store to throw a NotSupportedException or an RdfStorageException if the Store cannot provide this functionality.
Behaviour of this method with regards to non-existent Graph is up to the implementor, it may create a new empty Graph and apply the updates to that or it may throw an error. Implementors should state in the XML comments for their implementation what behaviour is implemented.
Implementers MUST allow for either the additions or removals argument to be null.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | May be thrown if the underlying Store is not capable of doing Updates at the Triple level. |
RdfStorageException | May be thrown if the underlying Store is not capable of doing Updates at the Triple level or if some error occurs while attempting the 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
The SPARQL Graph Store HTTP Protocol is defined as part of SPARQL 1.1 and is currently a working draft so implementations are not guaranteed to be fully compliant with the draft and the protocol may change in the future.
Note: While this connector supports the update of a Graph the Graph Store HTTP Protocol only allows for the addition of data to an existing Graph and not the removal of data, therefore any calls to UpdateGraph() that would require the removal of Triple(s) will result in an error.