Class InMemoryManager
Provides a wrapper around an in-memory store.
Implements
System.IDisposable
Inherited Members
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 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
| Improve this Doc View SourceInMemoryManager()
Creates a new In-Memory Manager which is a wrapper around a new empty in-memory store.
Declaration
public InMemoryManager()
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. |
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
| Improve this Doc View SourceDeleteSupported
Returns that Graph Deletion is supported.
Declaration
public override bool DeleteSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceIOBehaviour
Gets the IO Behaviour for In-Memory stores.
Declaration
public override IOBehaviour IOBehaviour { get; }
Property Value
Type | Description |
---|---|
IOBehaviour |
Overrides
| Improve this Doc View SourceIsReadOnly
Returns that the Store is not read-only.
Declaration
public override bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceIsReady
Returns that the Store is ready.
Declaration
public override bool IsReady { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceListGraphsSupported
Returns that listing graphs is supported.
Declaration
public override bool ListGraphsSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceUpdateSupported
Returns that Triple level updates are supported.
Declaration
public override bool UpdateSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Methods
| Improve this Doc View SourceDeleteGraph(String)
Deletes a Graph from the Store.
Declaration
public override void DeleteGraph(string graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.String | graphUri | URI of the Graph to delete. |
Overrides
| Improve this Doc View SourceDeleteGraph(Uri)
Deletes a Graph from the Store.
Declaration
public override void DeleteGraph(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | URI of the Graph to delete. |
Overrides
| Improve this Doc View SourceDispose()
Disposes of the Manager.
Declaration
public override void Dispose()
Overrides
| Improve this Doc View SourceListGraphs()
Lists the URIs of Graphs in the Store.
Declaration
public override IEnumerable<Uri> ListGraphs()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Uri> |
Overrides
| Improve this Doc View SourceLoadGraph(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. |
System.String | graphUri | Graph URI to load. |
Overrides
| Improve this Doc View SourceLoadGraph(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. |
System.Uri | graphUri | Graph URI to load. |
Overrides
| Improve this Doc View SourceLoadGraph(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. |
System.String | graphUri | Graph URI to load. |
Overrides
| Improve this Doc View SourceLoadGraph(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. |
System.Uri | graphUri | Graph URI to load. |
Overrides
| Improve this Doc View SourceQuery(String)
Makes a SPARQL Query against the Store.
Declaration
public object Query(string sparqlQuery)
Parameters
Type | Name | Description |
---|---|---|
System.String | sparqlQuery | SPARQL Query. |
Returns
Type | Description |
---|---|
System.Object |
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. |
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. |
System.String | sparqlQuery | SPARQL Query. |
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. |
SaveGraph(IGraph)
Saves a Graph to the Store.
Declaration
public override void SaveGraph(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
Overrides
| Improve this Doc View SourceSerializeConfiguration(ConfigurationSerializationContext)
Serializes the Configuration of the Manager.
Declaration
public void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationSerializationContext | context | Configuration Serialization Context. |
ToString()
Gets a String representation of the Manager.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()
|
Improve this Doc
View Source
Update(String)
Applies SPARQL Updates to the Store.
Declaration
public void Update(string sparqlUpdate)
Parameters
Type | Name | Description |
---|---|---|
System.String | sparqlUpdate | SPARQL Update. |
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. |
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 |
---|---|---|
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. |
Overrides
| Improve this Doc View SourceUpdateGraph(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 |
---|---|---|
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. |
Overrides
Implements
System.IDisposable