Show / Hide Table of Contents

Class FourStoreConnector

Class for connecting to 4store.
Inheritance
System.Object
BaseHttpConnector
BaseAsyncHttpConnector
FourStoreConnector
Implements
IAsyncUpdateableStorage
IAsyncQueryableStorage
IAsyncStorageProvider
IConfigurationSerializable
IUpdateableStorage
IQueryableStorage
IStorageProvider
IStorageCapabilities
System.IDisposable
Inherited Members
BaseAsyncHttpConnector.ParentServer
BaseAsyncHttpConnector.AsyncParentServer
BaseAsyncHttpConnector.LoadGraph(IGraph, Uri, AsyncStorageCallback, Object)
BaseAsyncHttpConnector.LoadGraph(IGraph, String, AsyncStorageCallback, Object)
BaseAsyncHttpConnector.LoadGraph(IRdfHandler, Uri, AsyncStorageCallback, Object)
BaseAsyncHttpConnector.LoadGraphAsync(HttpWebRequest, IRdfHandler, AsyncStorageCallback, Object)
BaseAsyncHttpConnector.SaveGraphAsync(HttpWebRequest, IRdfWriter, IGraph, AsyncStorageCallback, Object)
BaseAsyncHttpConnector.UpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>, AsyncStorageCallback, Object)
BaseAsyncHttpConnector.UpdateGraphAsync(HttpWebRequest, IRdfWriter, Uri, IEnumerable<Triple>, AsyncStorageCallback, Object)
BaseAsyncHttpConnector.DeleteGraph(Uri, AsyncStorageCallback, Object)
BaseAsyncHttpConnector.DeleteGraphAsync(HttpWebRequest, Boolean, String, AsyncStorageCallback, Object)
BaseAsyncHttpConnector.ListGraphs(AsyncStorageCallback, Object)
BaseAsyncHttpConnector.MakeRequestSequence(IEnumerable<HttpWebRequest>, AsyncStorageCallback, Object)
BaseHttpConnector.SetProxy(String)
BaseHttpConnector.SetProxy(Uri)
BaseHttpConnector.Proxy
BaseHttpConnector.ClearProxy()
BaseHttpConnector.SetProxyCredentials(String, String)
BaseHttpConnector.SetProxyCredentials(String, String, String)
BaseHttpConnector.ProxyCredentials
BaseHttpConnector.ClearProxyCredentials()
BaseHttpConnector.Timeout
BaseHttpConnector.Username
BaseHttpConnector.Password
BaseHttpConnector.ApplyRequestOptions(HttpWebRequest)
BaseHttpConnector.SerializeStandardConfig(INode, ConfigurationSerializationContext)
BaseHttpConnector.SetCredentials(String, String)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: VDS.RDF.Storage
Assembly: dotNetRDF.dll
Syntax
public class FourStoreConnector : BaseAsyncHttpConnector, IAsyncUpdateableStorage, IAsyncQueryableStorage, IAsyncStorageProvider, IConfigurationSerializable, IUpdateableStorage, IQueryableStorage, IStorageProvider, IStorageCapabilities, IDisposable
Remarks

Depending on the version of RASQAL used for your 4store instance and the options it was built with some kinds of queries may not suceed or return unexpected results.

Prior to the 1.x releases 4store did not permit the saving of unamed Graphs to the Store or Triple level updates. There was a branch of 4store that supports Triple level updates and you could tell the connector if your 4store instance supports this when you instantiate it. From the 0.4.0 release of the library onwards this support was enabled by default since the 1.x builds of 4store have this feature integrated into them by default.

Constructors

| Improve this Doc View Source

FourStoreConnector(String)

Creates a new 4store connector which manages access to the services provided by a 4store server.
Declaration
public FourStoreConnector(string baseUri)
Parameters
Type Name Description
System.String baseUri Base Uri of the 4store.
Remarks
Note: As of the 0.4.0 release 4store support defaults to Triple Level updates enabled as all recent 4store releases have supported this. You can still optionally disable this with the two argument version of the constructor.
| Improve this Doc View Source

FourStoreConnector(String, Boolean)

Creates a new 4store connector which manages access to the services provided by a 4store server.
Declaration
public FourStoreConnector(string baseUri, bool enableUpdateSupport)
Parameters
Type Name Description
System.String baseUri Base Uri of the 4store.
System.Boolean enableUpdateSupport Indicates to the connector that you are using a 4store instance that supports Triple level updates.
Remarks
If you enable Update support but are using a 4store instance that does not support Triple level updates then you will almost certainly experience errors while using the connector.
| Improve this Doc View Source

FourStoreConnector(String, Boolean, IWebProxy)

Creates a new 4store connector which manages access to the services provided by a 4store server.
Declaration
public FourStoreConnector(string baseUri, bool enableUpdateSupport, IWebProxy proxy)
Parameters
Type Name Description
System.String baseUri Base Uri of the 4store.
System.Boolean enableUpdateSupport Indicates to the connector that you are using a 4store instance that supports Triple level updates.
System.Net.IWebProxy proxy Proxy Server.
Remarks
If you enable Update support but are using a 4store instance that does not support Triple level updates then you will almost certainly experience errors while using the connector.
| Improve this Doc View Source

FourStoreConnector(String, IWebProxy)

Creates a new 4store connector which manages access to the services provided by a 4store server.
Declaration
public FourStoreConnector(string baseUri, IWebProxy proxy)
Parameters
Type Name Description
System.String baseUri Base Uri of the 4store.
System.Net.IWebProxy proxy Proxy Server.
Remarks
Note: As of the 0.4.0 release 4store support defaults to Triple Level updates enabled as all recent 4store releases have supported this. You can still optionally disable this with the two argument version of the constructor.

Properties

| Improve this Doc View Source

DeleteSupported

Returns that deleting Graph is supported.
Declaration
public override bool DeleteSupported { get; }
Property Value
Type Description
System.Boolean
Overrides
BaseAsyncHttpConnector.DeleteSupported
| Improve this Doc View Source

IOBehaviour

Gets the IO Behaviour of 4store.
Declaration
public override IOBehaviour IOBehaviour { get; }
Property Value
Type Description
IOBehaviour
Overrides
BaseAsyncHttpConnector.IOBehaviour
| Improve this Doc View Source

IsReadOnly

Returns that the Connection is not read-only.
Declaration
public override bool IsReadOnly { get; }
Property Value
Type Description
System.Boolean
Overrides
BaseAsyncHttpConnector.IsReadOnly
| Improve this Doc View Source

IsReady

Returns that the Connection is ready.
Declaration
public override bool IsReady { get; }
Property Value
Type Description
System.Boolean
Overrides
BaseAsyncHttpConnector.IsReady
| Improve this Doc View Source

ListGraphsSupported

Returns that Listing Graphs is supported.
Declaration
public override bool ListGraphsSupported { get; }
Property Value
Type Description
System.Boolean
Overrides
BaseAsyncHttpConnector.ListGraphsSupported
| Improve this Doc View Source

UpdateSupported

Returns whether this connector has been instantiated with update support or not.
Declaration
public override bool UpdateSupported { get; }
Property Value
Type Description
System.Boolean
Overrides
BaseAsyncHttpConnector.UpdateSupported
Remarks
If this property returns true it does not guarantee that the 4store instance actually supports updates it simply indicates that the user has enabled updates on the connector. If Updates are enabled and the 4store server being connected to does not support updates then errors will occur.

Methods

| Improve this Doc View Source

DeleteGraph(String)

Deletes a Graph from the 4store server.
Declaration
public void DeleteGraph(string graphUri)
Parameters
Type Name Description
System.String graphUri Uri of Graph to delete.
| Improve this Doc View Source

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
System.String graphUri URI of the Graph to delete.
AsyncStorageCallback callback Callback.
System.Object state State to pass to the callback.
Overrides
BaseAsyncHttpConnector.DeleteGraph(String, AsyncStorageCallback, Object)
| Improve this Doc View Source

DeleteGraph(Uri)

Deletes a Graph from the 4store server.
Declaration
public void DeleteGraph(Uri graphUri)
Parameters
Type Name Description
System.Uri graphUri Uri of Graph to delete.
| Improve this Doc View Source

Dispose()

Disposes of a 4store connection.
Declaration
public override void Dispose()
Overrides
BaseAsyncHttpConnector.Dispose()
| Improve this Doc View Source

ListGraphs()

Lists the Graphs in the Store.
Declaration
public IEnumerable<Uri> ListGraphs()
Returns
Type Description
System.Collections.Generic.IEnumerable<System.Uri>
| Improve this Doc View Source

LoadGraph(IGraph, String)

Loads a Graph from the 4store instance.
Declaration
public void LoadGraph(IGraph g, string graphUri)
Parameters
Type Name Description
IGraph g Graph to load into.
System.String graphUri URI of the Graph to load.
| Improve this Doc View Source

LoadGraph(IGraph, Uri)

Loads a Graph from the 4store instance.
Declaration
public 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.
| Improve this Doc View Source

LoadGraph(IRdfHandler, String)

Loads a Graph from the 4store instance.
Declaration
public void LoadGraph(IRdfHandler handler, string graphUri)
Parameters
Type Name Description
IRdfHandler handler RDF Handler.
System.String graphUri URI of the Graph to load.
| Improve this Doc View Source

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.
System.String graphUri URI of the Graph to load.
AsyncStorageCallback callback Callback.
System.Object state State to pass to the callback.
Overrides
BaseAsyncHttpConnector.LoadGraph(IRdfHandler, String, AsyncStorageCallback, Object)
| Improve this Doc View Source

LoadGraph(IRdfHandler, Uri)

Loads a Graph from the 4store instance using an RDF Handler.
Declaration
public void LoadGraph(IRdfHandler handler, Uri graphUri)
Parameters
Type Name Description
IRdfHandler handler RDF Handler.
System.Uri graphUri URI of the Graph to load.
| Improve this Doc View Source

Query(String)

Makes a SPARQL Query against the underlying 4store Instance.
Declaration
public object Query(string sparqlQuery)
Parameters
Type Name Description
System.String sparqlQuery SPARQL Query.
Returns
Type Description
System.Object A Graph or a SparqlResultSet.
Remarks
Depending on the version of RASQAL used and the options it was built with some kinds of queries may not suceed or return unexpected results.
| Improve this Doc View Source

Query(String, AsyncStorageCallback, Object)

Queries the store asynchronously.
Declaration
public void Query(string sparqlQuery, AsyncStorageCallback callback, object state)
Parameters
Type Name Description
System.String sparqlQuery SPARQL Query.
AsyncStorageCallback callback Callback.
System.Object state State to pass to the callback.
| Improve this Doc View Source

Query(IRdfHandler, ISparqlResultsHandler, String)

Makes a SPARQL Query against the underlying 4store Instance processing the results with the 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.
System.String sparqlQuery SPARQL Query.
| Improve this Doc View Source

Query(IRdfHandler, ISparqlResultsHandler, String, AsyncStorageCallback, Object)

Queries the store asynchronously.
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.
System.String sparqlQuery SPARQL Query.
AsyncStorageCallback callback Callback.
System.Object state State to pass to the callback.
| Improve this Doc View Source

SaveGraph(IGraph)

Saves a Graph to a 4store instance (Warning: Completely replaces any existing Graph with the same URI).
Declaration
public void SaveGraph(IGraph g)
Parameters
Type Name Description
IGraph g Graph to save.
Remarks

Completely replaces any existing Graph with the same Uri in the store.

Attempting to save a Graph which doesn't have a Base Uri will result in an error.

Exceptions
Type Condition
RdfStorageException Thrown if you try and save a Graph without a Base Uri or if there is an error communicating with the 4store instance.
| Improve this Doc View Source

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
BaseAsyncHttpConnector.SaveGraph(IGraph, AsyncStorageCallback, Object)
| Improve this Doc View Source

SerializeConfiguration(ConfigurationSerializationContext)

Serializes the connection's configuration.
Declaration
public void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type Name Description
ConfigurationSerializationContext context
| Improve this Doc View Source

ToString()

Gets a String which gives details of the Connection.
Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()
| Improve this Doc View Source

Update(String)

Applies a SPARQL Update against 4store.
Declaration
public void Update(string sparqlUpdate)
Parameters
Type Name Description
System.String sparqlUpdate SPARQL Update.
Remarks
Note: Please be aware that some valid SPARQL Updates may not be accepted by 4store since the SPARQL parser used by 4store does not support some of the latest editors draft syntax changes.
| Improve this Doc View Source

Update(String, AsyncStorageCallback, Object)

Updates the store asynchronously.
Declaration
public void Update(string sparqlUpdates, AsyncStorageCallback callback, object state)
Parameters
Type Name Description
System.String sparqlUpdates SPARQL Update.
AsyncStorageCallback callback Callback.
System.Object state State to pass to the callback.
| Improve this Doc View Source

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

Updates a Graph in the store.
Declaration
public void UpdateGraph(string graphUri, IEnumerable<Triple> additions, IEnumerable<Triple> removals)
Parameters
Type Name Description
System.String graphUri Uri of the Graph to Update.
System.Collections.Generic.IEnumerable<Triple> additions Triples to be added.
System.Collections.Generic.IEnumerable<Triple> removals Triples to be removed.
Remarks
May throw an error since the default builds of 4store don't support Triple level updates. There are builds that do support this and the user can instantiate the connector with support for this enabled if they wish, if they do so and the underlying 4store doesn't support updates errors will occur when updates are attempted.
| Improve this Doc View Source

UpdateGraph(String, IEnumerable<Triple>, IEnumerable<Triple>, AsyncStorageCallback, Object)

Updates a Graph in the Store asychronously.
Declaration
public override void UpdateGraph(string graphUri, IEnumerable<Triple> additions, IEnumerable<Triple> removals, AsyncStorageCallback callback, object state)
Parameters
Type Name Description
System.String graphUri URI of the Graph to update.
System.Collections.Generic.IEnumerable<Triple> additions Triples to be added.
System.Collections.Generic.IEnumerable<Triple> removals Triples to be removed.
AsyncStorageCallback callback Callback.
System.Object state State to pass to the callback.
Overrides
BaseAsyncHttpConnector.UpdateGraph(String, IEnumerable<Triple>, IEnumerable<Triple>, AsyncStorageCallback, Object)
| Improve this Doc View Source

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

Updates a Graph in the store.
Declaration
public 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<Triple> additions Triples to be added.
System.Collections.Generic.IEnumerable<Triple> removals Triples to be removed.
Remarks
May throw an error since the default builds of 4store don't support Triple level updates. There are builds that do support this and the user can instantiate the connector with support for this enabled if they wish, if they do so and the underlying 4store doesn't support updates errors will occur when updates are attempted.

Implements

IAsyncUpdateableStorage
IAsyncQueryableStorage
IAsyncStorageProvider
IConfigurationSerializable
IUpdateableStorage
IQueryableStorage
IStorageProvider
IStorageCapabilities
System.IDisposable

Extension Methods

Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • FourStoreConnector(String)
    • FourStoreConnector(String, Boolean)
    • FourStoreConnector(String, Boolean, IWebProxy)
    • FourStoreConnector(String, IWebProxy)
  • Properties
    • DeleteSupported
    • IOBehaviour
    • IsReadOnly
    • IsReady
    • ListGraphsSupported
    • UpdateSupported
  • Methods
    • DeleteGraph(String)
    • DeleteGraph(String, AsyncStorageCallback, Object)
    • DeleteGraph(Uri)
    • Dispose()
    • ListGraphs()
    • LoadGraph(IGraph, String)
    • LoadGraph(IGraph, Uri)
    • LoadGraph(IRdfHandler, String)
    • LoadGraph(IRdfHandler, String, AsyncStorageCallback, Object)
    • LoadGraph(IRdfHandler, Uri)
    • Query(String)
    • Query(String, AsyncStorageCallback, Object)
    • Query(IRdfHandler, ISparqlResultsHandler, String)
    • Query(IRdfHandler, ISparqlResultsHandler, String, AsyncStorageCallback, Object)
    • SaveGraph(IGraph)
    • SaveGraph(IGraph, AsyncStorageCallback, Object)
    • SerializeConfiguration(ConfigurationSerializationContext)
    • ToString()
    • Update(String)
    • Update(String, AsyncStorageCallback, Object)
    • UpdateGraph(String, IEnumerable<Triple>, IEnumerable<Triple>)
    • UpdateGraph(String, IEnumerable<Triple>, IEnumerable<Triple>, AsyncStorageCallback, Object)
    • UpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>)
  • Implements
  • Extension Methods
Back to top Generated by DocFX