Show / Hide Table of Contents

Class ReadWriteSparqlConnector

Class for connecting to any SPARQL server that provides both a query and update endpoint.

Inheritance
object
SparqlConnector
ReadWriteSparqlConnector
Implements
IConfigurationSerializable
IUpdateableStorage
IQueryableStorage
IStorageProvider
IStorageCapabilities
IDisposable
Inherited Members
SparqlConnector._endpoint
SparqlConnector._mode
SparqlConnector._timeout
SparqlConnector.ParentServer
SparqlConnector.SkipLocalParsing
SparqlConnector.Endpoint
SparqlConnector.QueryClient
SparqlConnector.Query(string)
SparqlConnector.Query(IRdfHandler, ISparqlResultsHandler, string)
SparqlConnector.LoadGraph(IGraph, Uri)
SparqlConnector.LoadGraph(IRdfHandler, Uri)
SparqlConnector.LoadGraph(IGraph, string)
SparqlConnector.LoadGraph(IRdfHandler, string)
SparqlConnector.UpdateGraph(IRefNode, IEnumerable<Triple>, IEnumerable<Triple>)
SparqlConnector.ListGraphs()
SparqlConnector.ListGraphNames()
SparqlConnector.ListGraphsSupported
SparqlConnector.IsReady
SparqlConnector.Dispose()
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VDS.RDF.Storage
Assembly: dotNetRdf.dll
Syntax
public class ReadWriteSparqlConnector : SparqlConnector, IConfigurationSerializable, IUpdateableStorage, IQueryableStorage, IStorageProvider, IStorageCapabilities, IDisposable
Remarks

This class is a wrapper around a SparqlRemoteEndpoint and a SparqlRemoteUpdateEndpoint. The former is used for the query functionality while the latter is used for the update functionality. As updates happen via SPARQL the behaviour with respects to adding and removing blank nodes will be somewhat up to the underlying SPARQL implementation. This connector is not able to carry out UpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>) operations which attempt to delete blank nodes and cannot guarantee that added blank nodes bear any relation to existing blank nodes in the store.

Unlike other HTTP based connectors this connector does not derive from BaseHttpConnector - if you need to specify proxy information you should do so on the SPARQL Endpoint you are wrapping either by providing endpoint instance pre-configured with the proxy settings or by accessing the endpoint via the Endpoint and UpdateEndpoint properties and programmatically adding the settings.

Constructors

| Edit this page View Source

ReadWriteSparqlConnector(Uri, Uri)

Creates a new connection.

Declaration
public ReadWriteSparqlConnector(Uri queryEndpoint, Uri updateEndpoint)
Parameters
Type Name Description
Uri queryEndpoint

Query Endpoint.

Uri updateEndpoint

Update Endpoint.

| Edit this page View Source

ReadWriteSparqlConnector(Uri, Uri, SparqlConnectorLoadMethod)

Creates a new connection.

Declaration
public ReadWriteSparqlConnector(Uri queryEndpoint, Uri updateEndpoint, SparqlConnectorLoadMethod mode)
Parameters
Type Name Description
Uri queryEndpoint

Query Endpoint.

Uri updateEndpoint

Update Endpoint.

SparqlConnectorLoadMethod mode

Method for loading graphs.

| Edit this page View Source

ReadWriteSparqlConnector(SparqlQueryClient, SparqlUpdateClient, SparqlConnectorLoadMethod)

Creates a new connector.

Declaration
public ReadWriteSparqlConnector(SparqlQueryClient queryClient, SparqlUpdateClient updateClient, SparqlConnectorLoadMethod loadMethod = SparqlConnectorLoadMethod.Construct)
Parameters
Type Name Description
SparqlQueryClient queryClient

The SPARQL query client to use.

SparqlUpdateClient updateClient

The SPARQL update client to use.

SparqlConnectorLoadMethod loadMethod

The method to use for loading graphs.

| Edit this page View Source

ReadWriteSparqlConnector(SparqlRemoteEndpoint, SparqlRemoteUpdateEndpoint)

Creates a new connection.

Declaration
[Obsolete("Replaced by ReadWriteSparqlConnector(SparqlQueryClient, SparqlUpdateClient, SparqlConnectorLoadMethod")]
public ReadWriteSparqlConnector(SparqlRemoteEndpoint queryEndpoint, SparqlRemoteUpdateEndpoint updateEndpoint)
Parameters
Type Name Description
SparqlRemoteEndpoint queryEndpoint

Query Endpoint.

SparqlRemoteUpdateEndpoint updateEndpoint

Update Endpoint.

| Edit this page View Source

ReadWriteSparqlConnector(SparqlRemoteEndpoint, SparqlRemoteUpdateEndpoint, SparqlConnectorLoadMethod)

Creates a new connection.

Declaration
[Obsolete("Replaced by ReadWriteSparqlConnector(SparqlQueryClient, SparqlUpdateClient, SparqlConnectorLoadMethod")]
public ReadWriteSparqlConnector(SparqlRemoteEndpoint queryEndpoint, SparqlRemoteUpdateEndpoint updateEndpoint, SparqlConnectorLoadMethod mode)
Parameters
Type Name Description
SparqlRemoteEndpoint queryEndpoint

Query Endpoint.

SparqlRemoteUpdateEndpoint updateEndpoint

Update Endpoint.

SparqlConnectorLoadMethod mode

Method for loading graphs.

Properties

| Edit this page View Source

DeleteSupported

Gets that deleting graphs is supported.

Declaration
public override bool DeleteSupported { get; }
Property Value
Type Description
bool
Overrides
SparqlConnector.DeleteSupported
| Edit this page View Source

IOBehaviour

Gets the IO behaviour for the store.

Declaration
public override IOBehaviour IOBehaviour { get; }
Property Value
Type Description
IOBehaviour
Overrides
SparqlConnector.IOBehaviour
| Edit this page View Source

IsReadOnly

Gets that the store is not read-only.

Declaration
public override bool IsReadOnly { get; }
Property Value
Type Description
bool
Overrides
SparqlConnector.IsReadOnly
| Edit this page View Source

Timeout

Gets/Sets the HTTP Timeout in milliseconds used for communicating with the SPARQL Endpoint.

Declaration
[Obsolete("This property is only used by the obsolete SparqlRemoteEndpoint-backed implementation.")]
public override int Timeout { get; set; }
Property Value
Type Description
int
Overrides
SparqlConnector.Timeout
| Edit this page View Source

UpdateClient

Gets the underlying SparqlUpdateClient which this class is a wrapper around.

Declaration
public SparqlUpdateClient UpdateClient { get; }
Property Value
Type Description
SparqlUpdateClient
| Edit this page View Source

UpdateEndpoint

Gets the underlying SparqlRemoteUpdateEndpoint which this class is a wrapper around.

Declaration
[TypeConverter(typeof(ExpandableObjectConverter))]
[Obsolete]
public SparqlRemoteUpdateEndpoint UpdateEndpoint { get; }
Property Value
Type Description
SparqlRemoteUpdateEndpoint
| Edit this page View Source

UpdateSupported

Gets that triple level updates are supported, see the remarks section of the ReadWriteSparqlConnector for exactly what is and isn't supported.

Declaration
public override bool UpdateSupported { get; }
Property Value
Type Description
bool
Overrides
SparqlConnector.UpdateSupported

Methods

| Edit this page View Source

DeleteGraph(string)

Deletes a graph from the store.

Declaration
public override void DeleteGraph(string graphUri)
Parameters
Type Name Description
string graphUri

URI of the graph to delete.

Overrides
SparqlConnector.DeleteGraph(string)
| Edit this page View Source

DeleteGraph(Uri)

Deletes a graph from the store.

Declaration
public override void DeleteGraph(Uri graphUri)
Parameters
Type Name Description
Uri graphUri

URI of the graph to delete.

Overrides
SparqlConnector.DeleteGraph(Uri)
| Edit this page View Source

SaveGraph(IGraph)

Saves a graph to the store.

Declaration
public override void SaveGraph(IGraph g)
Parameters
Type Name Description
IGraph g

Graph to save.

Overrides
SparqlConnector.SaveGraph(IGraph)
| Edit this page View Source

SerializeConfiguration(ConfigurationSerializationContext)

Serializes the connection's configuration.

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

Configuration Serialization Context.

Overrides
SparqlConnector.SerializeConfiguration(ConfigurationSerializationContext)
| Edit this page View Source

ToString()

Gets a String which gives details of the Connection.

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
SparqlConnector.ToString()
| Edit this page View Source

Update(string)

Makes a SPARQL Update against the store.

Declaration
public void Update(string sparqlUpdate)
Parameters
Type Name Description
string sparqlUpdate

SPARQL Update.

| Edit this page View Source

UpdateGraph(string, IEnumerable<Triple>, IEnumerable<Triple>)

Updates a graph in the 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.

IEnumerable<Triple> additions

Triples to add.

IEnumerable<Triple> removals

Triples to remove.

Overrides
SparqlConnector.UpdateGraph(string, IEnumerable<Triple>, IEnumerable<Triple>)
| Edit this page View Source

UpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>)

Updates a graph in the store.

Declaration
public override void UpdateGraph(Uri graphUri, IEnumerable<Triple> additions, IEnumerable<Triple> removals)
Parameters
Type Name Description
Uri graphUri

URI of the graph to update.

IEnumerable<Triple> additions

Triples to add.

IEnumerable<Triple> removals

Triples to remove.

Overrides
SparqlConnector.UpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>)

Implements

IConfigurationSerializable
IUpdateableStorage
IQueryableStorage
IStorageProvider
IStorageCapabilities
IDisposable

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • ReadWriteSparqlConnector(Uri, Uri)
    • ReadWriteSparqlConnector(Uri, Uri, SparqlConnectorLoadMethod)
    • ReadWriteSparqlConnector(SparqlQueryClient, SparqlUpdateClient, SparqlConnectorLoadMethod)
    • ReadWriteSparqlConnector(SparqlRemoteEndpoint, SparqlRemoteUpdateEndpoint)
    • ReadWriteSparqlConnector(SparqlRemoteEndpoint, SparqlRemoteUpdateEndpoint, SparqlConnectorLoadMethod)
  • Properties
    • DeleteSupported
    • IOBehaviour
    • IsReadOnly
    • Timeout
    • UpdateClient
    • UpdateEndpoint
    • UpdateSupported
  • Methods
    • DeleteGraph(string)
    • DeleteGraph(Uri)
    • SaveGraph(IGraph)
    • SerializeConfiguration(ConfigurationSerializationContext)
    • ToString()
    • Update(string)
    • UpdateGraph(string, IEnumerable<Triple>, IEnumerable<Triple>)
    • UpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>)
  • Implements
  • Extension Methods
Back to top Generated by DocFX