Show / Hide Table of Contents

Class ReadOnlyConnector

Provides a Read-Only wrapper that can be placed around another IStorageProvider instance.

Inheritance
System.Object
ReadOnlyConnector
QueryableReadOnlyConnector
Implements
IStorageProvider
IStorageCapabilities
System.IDisposable
IConfigurationSerializable
Inherited Members
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 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 Source

ReadOnlyConnector(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.

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.

Properties

| Improve this Doc View Source

DeleteSupported

Returns that deleting graphs is not supported.

Declaration
public bool DeleteSupported { get; }
Property Value
Type Description
System.Boolean
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.

| Improve this Doc View Source

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
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.

| Improve this Doc View Source

IsReadOnly

Returns that the Store is read-only.

Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
System.Boolean
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.

| Improve this Doc View Source

IsReady

Returns whether the Store is ready.

Declaration
public bool IsReady { get; }
Property Value
Type Description
System.Boolean
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.

| Improve this Doc View Source

ListGraphsSupported

Returns whether listing graphs is supported by the underlying store.

Declaration
public virtual bool ListGraphsSupported { get; }
Property Value
Type Description
System.Boolean
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.

| Improve this Doc View Source

ParentServer

Gets the parent server (if any).

Declaration
public virtual IStorageServer ParentServer { get; }
Property Value
Type Description
IStorageServer
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.

| Improve this Doc View Source

UpdateSupported

Returns that Update is not supported.

Declaration
public bool UpdateSupported { get; }
Property Value
Type Description
System.Boolean
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.

Methods

| Improve this Doc View Source

DeleteGraph(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
string graphUri

URI of the Graph to delete.

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.

Exceptions
Type Condition
RdfStorageException

Thrown since you cannot delete a Graph using a read-only connection.

| Improve this Doc View Source

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.

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.

Exceptions
Type Condition
RdfStorageException

Thrown since you cannot delete a Graph using a read-only connection.

| Improve this Doc View Source

Dispose()

Disposes of the Store.

Declaration
public void Dispose()
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.

| Improve this Doc View Source

ListGraphNames()

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

Declaration
public virtual IEnumerable<string> ListGraphNames()
Returns
Type Description
System.Collections.Generic.IEnumerable<T><string>
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.

| Improve this Doc View Source

ListGraphs()

Gets the list of graphs in the underlying store.

Declaration
[Obsolete("Replaced by ListGraphNames")]
public virtual IEnumerable<Uri> ListGraphs()
Returns
Type Description
System.Collections.Generic.IEnumerable<T><System.Uri>
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.

| Improve this Doc View Source

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.

string graphUri

URI of the Graph to load.

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.

| Improve this Doc View Source

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.

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.

| Improve this Doc View Source

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.

string graphUri

URI of the Graph to load.

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.

| Improve this Doc View Source

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.

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.

| Improve this Doc View Source

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.

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.

Exceptions
Type Condition
RdfStorageException

Thrown since you cannot save a Graph using a read-only connection.

| Improve this Doc View Source

SerializeConfiguration(ConfigurationSerializationContext)

Serializes the Configuration of the Manager.

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

Configuration Serialization Context.

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.

| Improve this Doc View Source

ToString()

Gets the String representation of the Manager.

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()
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.

| 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
string graphUri

URI of the Graph.

System.Collections.Generic.IEnumerable<T><Triple> additions

Triples to be added.

System.Collections.Generic.IEnumerable<T><Triple> removals

Triples to be removed.

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.

Exceptions
Type Condition
RdfStorageException

Thrown since you cannot update a Graph using a read-only connection.

| Improve this Doc View Source

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<T><Triple> additions

Triples to be added.

System.Collections.Generic.IEnumerable<T><Triple> removals

Triples to be removed.

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.

Exceptions
Type Condition
RdfStorageException

Thrown since you cannot update a Graph using a read-only connection.

| Improve this Doc View Source

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

Throws an exception since you cannot update a Graph using a read-only connection.

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

Name of the Graph.

System.Collections.Generic.IEnumerable<T><Triple> additions

Triples to be added.

System.Collections.Generic.IEnumerable<T><Triple> removals

Triples to be removed.

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.

Exceptions
Type Condition
RdfStorageException

Thrown since you cannot update a Graph using a read-only connection.

Implements

IStorageProvider
IStorageCapabilities
System.IDisposable
IConfigurationSerializable

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • ReadOnlyConnector(IStorageProvider)
  • Properties
    • DeleteSupported
    • IOBehaviour
    • IsReadOnly
    • IsReady
    • ListGraphsSupported
    • ParentServer
    • UpdateSupported
  • Methods
    • DeleteGraph(string)
    • DeleteGraph(Uri)
    • Dispose()
    • ListGraphNames()
    • ListGraphs()
    • LoadGraph(IGraph, string)
    • LoadGraph(IGraph, Uri)
    • LoadGraph(IRdfHandler, string)
    • LoadGraph(IRdfHandler, Uri)
    • SaveGraph(IGraph)
    • SerializeConfiguration(ConfigurationSerializationContext)
    • ToString()
    • 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