Class BaseSesameHttpProtocolConnector
Abstract Base Class for connecting to any Store that supports the Sesame 2.0 HTTP Communication protocol.
Inheritance
Implements
Inherited Members
Namespace: VDS.RDF.Storage
Assembly: dotNetRdf.Client.dll
Syntax
public abstract class BaseSesameHttpProtocolConnector : BaseAsyncHttpConnector, IAsyncQueryableStorage, IAsyncStorageProvider, IConfigurationSerializable, IQueryableStorage, IStorageProvider, IStorageCapabilities, IDisposable
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
Constructors
| Improve this Doc View SourceBaseSesameHttpProtocolConnector(string, string, IWebProxy)
Creates a new connection to a Sesame HTTP Protocol supporting Store.
Declaration
public BaseSesameHttpProtocolConnector(string baseUri, string storeID, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri of the Store. |
string | storeID | Store ID. |
System.Net.IWebProxy | proxy | Proxy Server. |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
BaseSesameHttpProtocolConnector(string, string, string, string, IWebProxy)
Creates a new connection to a Sesame HTTP Protocol supporting Store.
Declaration
public BaseSesameHttpProtocolConnector(string baseUri, string storeID, string username, string password, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri of the Store. |
string | storeID | Store ID. |
string | username | Username to use for requests that require authentication. |
string | password | Password to use for requests that require authentication. |
System.Net.IWebProxy | proxy | Proxy Server. |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
BaseSesameHttpProtocolConnector(string, string, string, string)
Creates a new connection to a Sesame HTTP Protocol supporting Store.
Declaration
public BaseSesameHttpProtocolConnector(string baseUri, string storeID, string username, string password)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri of the Store. |
string | storeID | Store ID. |
string | username | Username to use for requests that require authentication. |
string | password | Password to use for requests that require authentication. |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
BaseSesameHttpProtocolConnector(string, string)
Creates a new connection to a Sesame HTTP Protocol supporting Store.
Declaration
public BaseSesameHttpProtocolConnector(string baseUri, string storeID)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri of the Store. |
string | storeID | Store ID. |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
Fields
| Improve this Doc View Source_baseUri
Base Uri for the Store.
Declaration
protected string _baseUri
Field Value
Type | Description |
---|---|
string |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
_fullContextEncoding
Whether to do full encoding of contexts.
Declaration
protected bool _fullContextEncoding
Field Value
Type | Description |
---|---|
System.Boolean |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
_queryPath
Query Path Prefix.
Declaration
protected string _queryPath
Field Value
Type | Description |
---|---|
string |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
_repositoriesPrefix
Repositories Prefix.
Declaration
protected string _repositoriesPrefix
Field Value
Type | Description |
---|---|
string |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
_server
Server the store is hosted on.
Declaration
protected SesameServer _server
Field Value
Type | Description |
---|---|
SesameServer |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
_store
Store ID.
Declaration
protected string _store
Field Value
Type | Description |
---|---|
string |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
_updatePath
Update Path Prefix.
Declaration
protected string _updatePath
Field Value
Type | Description |
---|---|
string |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
Properties
| Improve this Doc View SourceAsyncParentServer
Gets the parent server.
Declaration
public override IAsyncStorageServer AsyncParentServer { get; }
Property Value
Type | Description |
---|---|
IAsyncStorageServer |
Overrides
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
BaseUri
Gets the Base URI to the repository.
Declaration
public string BaseUri { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
DeleteSupported
Returns that deleting graphs from the Sesame store is supported.
Declaration
public override bool DeleteSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
IOBehaviour
Gets the Save Behaviour of Stores that use the Sesame HTTP Protocol.
Declaration
public override IOBehaviour IOBehaviour { get; }
Property Value
Type | Description |
---|---|
IOBehaviour |
Overrides
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
IsReadOnly
Returns that the Connection is not read-only.
Declaration
public override bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
IsReady
Returns that the Connection is ready.
Declaration
public override bool IsReady { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
ListGraphsSupported
Returns that listing Graphs is supported.
Declaration
public override bool ListGraphsSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
ParentServer
Gets the parent server.
Declaration
public override IStorageServer ParentServer { get; }
Property Value
Type | Description |
---|---|
IStorageServer |
Overrides
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
RepositoryName
Gets the Repository Name that is in use.
Declaration
public string RepositoryName { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
UpdateSupported
Returns that Updates are supported on Sesame HTTP Protocol supporting Stores.
Declaration
public override bool UpdateSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
Methods
| Improve this Doc View SourceCreateRdfWriter()
Creates an RDF Writer to use for saving data to the store.
Declaration
protected virtual IRdfWriter CreateRdfWriter()
Returns
Type | Description |
---|---|
IRdfWriter |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
CreateRequest(string, string, HttpMethod, Dictionary<string, string>)
Helper method for creating HTTP Requests to the Store.
Declaration
protected virtual HttpRequestMessage CreateRequest(string servicePath, string accept, HttpMethod method, Dictionary<string, string> queryParams)
Parameters
Type | Name | Description |
---|---|---|
string | servicePath | Path to the Service requested. |
string | accept | Acceptable Content Types. |
System.Net.Http.HttpMethod | method | HTTP Method. |
System.Collections.Generic.Dictionary<TKey, TValue><string, string> | queryParams | Querystring Parameters. |
Returns
Type | Description |
---|---|
System.Net.Http.HttpRequestMessage |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
CreateRequest(string, string, string, Dictionary<string, string>)
Helper method for creating HTTP Requests to the Store.
Declaration
[Obsolete("This method is obsolete and will be removed in a future release. Use the overload that returns an HttpRequestMessage instead.")]
protected virtual HttpWebRequest CreateRequest(string servicePath, string accept, string method, Dictionary<string, string> queryParams)
Parameters
Type | Name | Description |
---|---|---|
string | servicePath | Path to the Service requested. |
string | accept | Acceptable Content Types. |
string | method | HTTP Method. |
System.Collections.Generic.Dictionary<TKey, TValue><string, string> | queryParams | Querystring Parameters. |
Returns
Type | Description |
---|---|
System.Net.HttpWebRequest |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
DeleteGraph(string, AsyncStorageCallback, object)
Deletes a Graph from the Store.
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
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
DeleteGraph(string)
Deletes a Graph from the Sesame store.
Declaration
public virtual void DeleteGraph(string graphUri)
Parameters
Type | Name | Description |
---|---|---|
string | graphUri | URI of the Graph to delete. |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
DeleteGraph(Uri)
Deletes a Graph from the Sesame store.
Declaration
public virtual void DeleteGraph(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | URI of the Graph to delete. |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
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
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
EscapeQuery(string)
Escapes a Query to avoid a character encoding issue when communicating a query to Sesame.
Declaration
protected virtual string EscapeQuery(string query)
Parameters
Type | Name | Description |
---|---|---|
string | query | Query. |
Returns
Type | Description |
---|---|
string |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
GetSaveContentType()
Gets the Content Type used to save data to the store i.e. the MIME type to use for the Content-Type header.
Declaration
protected virtual string GetSaveContentType()
Returns
Type | Description |
---|---|
string |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
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()
Gets the list of Graphs in the Sesame store.
Declaration
public virtual IEnumerable<Uri> ListGraphs()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><System.Uri> |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
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)
Loads a Graph from the Store.
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
If a Null/Empty Uri is specified then the default graph (statements with no context in Sesame parlance) will be loaded.
LoadGraph(IGraph, Uri)
Loads a Graph from the Store.
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
If a Null Uri is specified then the default graph (statements with no context in Sesame parlance) will be loaded.
LoadGraph(IRdfHandler, string, AsyncStorageCallback, object)
Loads a Graph from the Store asynchronously.
Declaration
public override void LoadGraph(IRdfHandler handler, string graphUri, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | Handler to load with. |
string | graphUri | URI of the Graph to load. |
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Overrides
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
LoadGraph(IRdfHandler, string)
Loads a Graph from the Store.
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
If a Null/Empty Uri is specified then the default graph (statements with no context in Sesame parlance) will be loaded.
LoadGraph(IRdfHandler, Uri)
Loads a Graph from the Store.
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
If a Null Uri is specified then the default graph (statements with no context in Sesame parlance) will be loaded.
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
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
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
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
Query(string)
Makes a SPARQL Query against the underlying Store.
Declaration
public virtual object Query(string sparqlQuery)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlQuery | SPARQL Query. |
Returns
Type | Description |
---|---|
System.Object |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
Query(IRdfHandler, ISparqlResultsHandler, string, AsyncStorageCallback, object)
Makes a SPARQL Query against the underlying store processing the resulting Graph/Result Set with a handler of your choice.
Declaration
public void Query(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string sparqlQuery, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | rdfHandler | RDF Handler. |
ISparqlResultsHandler | resultsHandler | SPARQL Results Handler. |
string | sparqlQuery | SPARQL Query. |
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
Query(IRdfHandler, ISparqlResultsHandler, string)
Makes a SPARQL Query against the underlying Store processing the results with an appropriate handler from those provided.
Declaration
public virtual 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
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
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
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
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
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
SaveGraph(IGraph, AsyncStorageCallback, object)
Saves a Graph to the Store asynchronously.
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
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
SaveGraph(IGraph)
Saves a Graph into the Store (Warning: Completely replaces any existing Graph with the same URI unless there is no URI - see remarks for details).
Declaration
public virtual void SaveGraph(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to save. |
Remarks
If the Graph has no URI then the contents will be appended to the Store, if the Graph has a URI then existing data associated with that URI will be replaced.
SaveGraphAsync(HttpRequestMessage, CancellationToken)
Save a graph to the store asynchronously.
Declaration
public Task SaveGraphAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Net.Http.HttpRequestMessage | request | The HTTP request to make to save the graph. |
System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
SaveGraphAsync(HttpRequestMessage, IGraph, AsyncStorageCallback, object)
Save a graph to the store asynchronously.
Declaration
public void SaveGraphAsync(HttpRequestMessage request, IGraph g, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
System.Net.Http.HttpRequestMessage | request | The HTTP request to make to save the graph. |
IGraph | g | The graph being saved. |
AsyncStorageCallback | callback | The callback to invoke on completion. |
System.Object | state | State to pass to the callback. |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
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
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
SerializeConfiguration(ConfigurationSerializationContext)
Serializes the connection's configuration.
Declaration
public virtual void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationSerializationContext | context | Configuration Serialization Context. |
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
ToString()
Gets a String which gives details of the Connection.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
UpdateGraph(string, IEnumerable<Triple>, IEnumerable<Triple>, AsyncStorageCallback, object)
Updates a Graph in the Store asynchronously.
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
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
UpdateGraph(string, IEnumerable<Triple>, IEnumerable<Triple>)
Updates a Graph.
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
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
UpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>)
Updates a Graph.
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
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
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 graphName, IEnumerable<Triple> additions, IEnumerable<Triple> removals, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | graphName | Name 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. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.