Show / Hide Table of Contents

Class InMemoryManager

Provides a wrapper around an in-memory store.

Inheritance
object
BaseAsyncSafeConnector
InMemoryManager
Implements
IUpdateableStorage
IQueryableStorage
IStorageProvider
IAsyncUpdateableStorage
IAsyncQueryableStorage
IAsyncStorageProvider
IStorageCapabilities
IDisposable
IConfigurationSerializable
Inherited Members
BaseAsyncSafeConnector.ParentServer
BaseAsyncSafeConnector.AsyncParentServer
BaseAsyncSafeConnector.UriFactory
BaseAsyncSafeConnector.LoadGraph(IGraph, Uri, AsyncStorageCallback, object)
BaseAsyncSafeConnector.LoadGraph(IGraph, string, AsyncStorageCallback, object)
BaseAsyncSafeConnector.LoadGraph(IRdfHandler, Uri, AsyncStorageCallback, object)
BaseAsyncSafeConnector.LoadGraph(IRdfHandler, string, AsyncStorageCallback, object)
BaseAsyncSafeConnector.LoadGraphAsync(IGraph, string, CancellationToken)
BaseAsyncSafeConnector.LoadGraphAsync(IRdfHandler, string, CancellationToken)
BaseAsyncSafeConnector.SaveGraph(IGraph, AsyncStorageCallback, object)
BaseAsyncSafeConnector.SaveGraphAsync(IGraph, CancellationToken)
BaseAsyncSafeConnector.UpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>, AsyncStorageCallback, object)
BaseAsyncSafeConnector.UpdateGraph(string, IEnumerable<Triple>, IEnumerable<Triple>, AsyncStorageCallback, object)
BaseAsyncSafeConnector.UpdateGraphAsync(string, IEnumerable<Triple>, IEnumerable<Triple>, CancellationToken)
BaseAsyncSafeConnector.DeleteGraph(Uri, AsyncStorageCallback, object)
BaseAsyncSafeConnector.DeleteGraph(string, AsyncStorageCallback, object)
BaseAsyncSafeConnector.DeleteGraphAsync(string, CancellationToken)
BaseAsyncSafeConnector.ListGraphs(AsyncStorageCallback, object)
BaseAsyncSafeConnector.ListGraphsAsync(CancellationToken)
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 InMemoryManager : BaseAsyncSafeConnector, IUpdateableStorage, IQueryableStorage, IStorageProvider, IAsyncUpdateableStorage, IAsyncQueryableStorage, IAsyncStorageProvider, IStorageCapabilities, IDisposable, IConfigurationSerializable
Remarks

Useful if you want to test out some code using temporary in-memory data before you run the code against a real store or if you are using some code that requires an IStorageProvider interface but you need the results of that code to be available directly in-memory.

Constructors

| Edit this page View Source

InMemoryManager()

Creates a new In-Memory Manager which is a wrapper around a new empty in-memory store.

Declaration
public InMemoryManager()
| Edit this page View Source

InMemoryManager(IInMemoryQueryableStore)

Creates a new In-Memory Manager which is a wrapper around an in-memory store.

Declaration
public InMemoryManager(IInMemoryQueryableStore store)
Parameters
Type Name Description
IInMemoryQueryableStore store

Triple Store.

| Edit this page View Source

InMemoryManager(ISparqlDataset)

Creates a new In-Memory Manager which is a wrapper around a SPARQL Dataset.

Declaration
public InMemoryManager(ISparqlDataset dataset)
Parameters
Type Name Description
ISparqlDataset dataset

Dataset.

Properties

| Edit this page View Source

DeleteSupported

Returns that Graph Deletion is supported.

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

IOBehaviour

Gets the IO Behaviour for In-Memory stores.

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

IsReadOnly

Returns that the Store is not read-only.

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

IsReady

Returns that the Store is ready.

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

ListGraphsSupported

Returns that listing graphs is supported.

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

UpdateSupported

Returns that Triple level updates are supported.

Declaration
public override bool UpdateSupported { get; }
Property Value
Type Description
bool
Overrides
BaseAsyncSafeConnector.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
BaseAsyncSafeConnector.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
BaseAsyncSafeConnector.DeleteGraph(Uri)
| Edit this page View Source

Dispose()

Disposes of the Manager.

Declaration
public override void Dispose()
Overrides
BaseAsyncSafeConnector.Dispose()
| Edit this page View Source

ListGraphNames()

Gets an enumeration of the names of the graphs in the store.

Declaration
public override IEnumerable<string> ListGraphNames()
Returns
Type Description
IEnumerable<string>
Overrides
BaseAsyncSafeConnector.ListGraphNames()
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.

| Edit this page View Source

ListGraphs()

Lists the URIs of Graphs in the Store.

Declaration
[Obsolete("Replaced by ListGraphNames")]
public override IEnumerable<Uri> ListGraphs()
Returns
Type Description
IEnumerable<Uri>
Overrides
BaseAsyncSafeConnector.ListGraphs()
| Edit this page View Source

LoadGraph(IGraph, string)

Loads a Graph from the Store.

Declaration
public override void LoadGraph(IGraph g, string graphUri)
Parameters
Type Name Description
IGraph g

Graph to load into.

string graphUri

Graph URI to load.

Overrides
BaseAsyncSafeConnector.LoadGraph(IGraph, string)
| Edit this page View Source

LoadGraph(IGraph, Uri)

Loads a Graph from the Store.

Declaration
public override void LoadGraph(IGraph g, Uri graphUri)
Parameters
Type Name Description
IGraph g

Graph to load into.

Uri graphUri

Graph URI to load.

Overrides
BaseAsyncSafeConnector.LoadGraph(IGraph, Uri)
| Edit this page View Source

LoadGraph(IRdfHandler, string)

Loads a Graph from the Store.

Declaration
public override void LoadGraph(IRdfHandler handler, string graphUri)
Parameters
Type Name Description
IRdfHandler handler

RDF Handler.

string graphUri

Graph URI to load.

Overrides
BaseAsyncSafeConnector.LoadGraph(IRdfHandler, string)
| Edit this page View Source

LoadGraph(IRdfHandler, Uri)

Loads a Graph from the Store.

Declaration
public override void LoadGraph(IRdfHandler handler, Uri graphUri)
Parameters
Type Name Description
IRdfHandler handler

RDF Handler.

Uri graphUri

Graph URI to load.

Overrides
BaseAsyncSafeConnector.LoadGraph(IRdfHandler, Uri)
| Edit this page View Source

Query(string)

Makes a SPARQL Query against the Store.

Declaration
public object Query(string sparqlQuery)
Parameters
Type Name Description
string sparqlQuery

SPARQL Query.

Returns
Type Description
object
| Edit this page View Source

Query(string, AsyncStorageCallback, object)

Queries the store asynchronously.

Declaration
public void Query(string sparqlQuery, AsyncStorageCallback callback, object state)
Parameters
Type Name Description
string sparqlQuery

SPARQL Query.

AsyncStorageCallback callback

Callback.

object state

State to pass to the callback.

| Edit this page View Source

Query(IRdfHandler, ISparqlResultsHandler, string)

Makes a SPARQL Query against the Store processing the results with the appropriate processor from those given.

Declaration
public void Query(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string sparqlQuery)
Parameters
Type Name Description
IRdfHandler rdfHandler

RDF Handler.

ISparqlResultsHandler resultsHandler

Results Handler.

string sparqlQuery

SPARQL Query.

| Edit this page 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.

string sparqlQuery

SPARQL Query.

AsyncStorageCallback callback

Callback.

object state

State to pass to the callback.

| Edit this page View Source

QueryAsync(string, CancellationToken)

Queries the store asynchronously.

Declaration
public Task<object> QueryAsync(string sparqlQuery, CancellationToken cancellationToken)
Parameters
Type Name Description
string sparqlQuery

SPARQL Query.

CancellationToken cancellationToken
Returns
Type Description
Task<object>
| Edit this page View Source

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.

CancellationToken cancellationToken
Returns
Type Description
Task
| 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.

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

SerializeConfiguration(ConfigurationSerializationContext)

Serializes the Configuration of the Manager.

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

Configuration Serialization Context.

| Edit this page View Source

ToString()

Gets a String representation of the Manager.

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

Update(string)

Applies SPARQL Updates to the Store.

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

SPARQL Update.

| Edit this page View Source

Update(string, AsyncStorageCallback, object)

Updates the store asynchronously.

Declaration
public void Update(string sparqlUpdates, AsyncStorageCallback callback, object state)
Parameters
Type Name Description
string sparqlUpdates

SPARQL Update.

AsyncStorageCallback callback

Callback.

object state

State to pass to the callback.

| Edit this page View Source

UpdateAsync(string, CancellationToken)

Updates the store asynchronously.

Declaration
public Task UpdateAsync(string sparqlUpdates, CancellationToken cancellationToken)
Parameters
Type Name Description
string sparqlUpdates
CancellationToken cancellationToken
Returns
Type Description
Task
| 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 be added.

IEnumerable<Triple> removals

Triples to be removed.

Overrides
BaseAsyncSafeConnector.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 be added.

IEnumerable<Triple> removals

Triples to be removed.

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

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

Updates a Graph in the Store.

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

Name of the Graph to update.

IEnumerable<Triple> additions

Triples to be added.

IEnumerable<Triple> removals

Triples to be removed.

Overrides
BaseAsyncSafeConnector.UpdateGraph(IRefNode, IEnumerable<Triple>, IEnumerable<Triple>)

Implements

IUpdateableStorage
IQueryableStorage
IStorageProvider
IAsyncUpdateableStorage
IAsyncQueryableStorage
IAsyncStorageProvider
IStorageCapabilities
IDisposable
IConfigurationSerializable

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • InMemoryManager()
    • InMemoryManager(IInMemoryQueryableStore)
    • InMemoryManager(ISparqlDataset)
  • Properties
    • DeleteSupported
    • IOBehaviour
    • IsReadOnly
    • IsReady
    • ListGraphsSupported
    • UpdateSupported
  • Methods
    • DeleteGraph(string)
    • DeleteGraph(Uri)
    • Dispose()
    • ListGraphNames()
    • ListGraphs()
    • LoadGraph(IGraph, string)
    • LoadGraph(IGraph, Uri)
    • LoadGraph(IRdfHandler, string)
    • LoadGraph(IRdfHandler, Uri)
    • Query(string)
    • Query(string, AsyncStorageCallback, object)
    • Query(IRdfHandler, ISparqlResultsHandler, string)
    • Query(IRdfHandler, ISparqlResultsHandler, string, AsyncStorageCallback, object)
    • QueryAsync(string, CancellationToken)
    • QueryAsync(IRdfHandler, ISparqlResultsHandler, string, CancellationToken)
    • SaveGraph(IGraph)
    • SerializeConfiguration(ConfigurationSerializationContext)
    • ToString()
    • Update(string)
    • Update(string, AsyncStorageCallback, object)
    • UpdateAsync(string, CancellationToken)
    • UpdateGraph(string, IEnumerable<Triple>, IEnumerable<Triple>)
    • UpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>)
    • UpdateGraph(IRefNode, IEnumerable<Triple>, IEnumerable<Triple>)
  • Implements
  • Extension Methods
Back to top Generated by DocFX