Class ReadOnlyConnector
Provides a Read-Only wrapper that can be placed around another IStorageProvider instance.
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 ReadOnlyConnector : IStorageProvider, IStorageCapabilities, IDisposable, IConfigurationSerializable
Remarks
This is useful if you want to allow some code read-only access to a mutable store and ensure that it cannot modify the store via the manager instance.
Constructors
| Improve this Doc View SourceReadOnlyConnector(IStorageProvider)
Creates a new Read-Only connection which is a read-only wrapper around another store.
Declaration
public ReadOnlyConnector(IStorageProvider manager)
Parameters
Type | Name | Description |
---|---|---|
IStorageProvider | manager | Manager for the Store you want to wrap as read-only. |
Properties
| Improve this Doc View SourceDeleteSupported
Returns that deleting graphs is not supported.
Declaration
public bool DeleteSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IOBehaviour
Gets the IO Behaviour of the read-only connection taking into account the IO Behaviour of the underlying store.
Declaration
public IOBehaviour IOBehaviour { get; }
Property Value
Type | Description |
---|---|
IOBehaviour |
IsReadOnly
Returns that the Store is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsReady
Returns whether the Store is ready.
Declaration
public bool IsReady { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ListGraphsSupported
Returns whether listing graphs is supported by the underlying store.
Declaration
public virtual bool ListGraphsSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ParentServer
Gets the parent server (if any).
Declaration
public virtual IStorageServer ParentServer { get; }
Property Value
Type | Description |
---|---|
IStorageServer |
UpdateSupported
Returns that Update is not supported.
Declaration
public bool UpdateSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceDeleteGraph(String)
Throws an exception as you cannot delete a Graph using a read-only connection.
Declaration
public void DeleteGraph(string graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.String | graphUri | URI of the Graph to delete. |
Exceptions
Type | Condition |
---|---|
RdfStorageException | Thrown since you cannot delete a Graph using a read-only connection. |
DeleteGraph(Uri)
Throws an exception as you cannot delete a Graph using a read-only connection.
Declaration
public void DeleteGraph(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | URI of the Graph to delete. |
Exceptions
Type | Condition |
---|---|
RdfStorageException | Thrown since you cannot delete a Graph using a read-only connection. |
Dispose()
Disposes of the Store.
Declaration
public void Dispose()
ListGraphs()
Gets the list of graphs in the underlying store.
Declaration
public virtual IEnumerable<Uri> ListGraphs()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Uri> |
LoadGraph(IGraph, String)
Loads a Graph from the underlying Store.
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. |
LoadGraph(IGraph, Uri)
Loads a Graph from the underlying Store.
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. |
LoadGraph(IRdfHandler, String)
Loads a Graph from the underlying Store.
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. |
LoadGraph(IRdfHandler, Uri)
Loads a Graph from the underlying Store.
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. |
SaveGraph(IGraph)
Throws an exception since you cannot save a Graph using a read-only connection.
Declaration
public void SaveGraph(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to save. |
Exceptions
Type | Condition |
---|---|
RdfStorageException | Thrown since you cannot save a Graph using a read-only connection. |
SerializeConfiguration(ConfigurationSerializationContext)
Serializes the Configuration of the Manager.
Declaration
public virtual void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationSerializationContext | context | Configuration Serialization Context. |
ToString()
Gets the String representation of the Manager.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()
|
Improve this Doc
View Source
UpdateGraph(String, IEnumerable<Triple>, IEnumerable<Triple>)
Throws an exception since you cannot update a Graph using a read-only connection.
Declaration
public void UpdateGraph(string graphUri, IEnumerable<Triple> additions, IEnumerable<Triple> removals)
Parameters
Type | Name | Description |
---|---|---|
System.String | graphUri | URI of the Graph. |
System.Collections.Generic.IEnumerable<Triple> | additions | Triples to be added. |
System.Collections.Generic.IEnumerable<Triple> | removals | Triples to be removed. |
Exceptions
Type | Condition |
---|---|
RdfStorageException | Thrown since you cannot update a Graph using a read-only connection. |
UpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>)
Throws an exception since you cannot update a Graph using a read-only connection.
Declaration
public void UpdateGraph(Uri graphUri, IEnumerable<Triple> additions, IEnumerable<Triple> removals)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | URI of the Graph. |
System.Collections.Generic.IEnumerable<Triple> | additions | Triples to be added. |
System.Collections.Generic.IEnumerable<Triple> | removals | Triples to be removed. |
Exceptions
Type | Condition |
---|---|
RdfStorageException | Thrown since you cannot update a Graph using a read-only connection. |
Implements
System.IDisposable