Show / Hide Table of Contents

Class DatasetFileManager

Allows you to treat an RDF Dataset File - NQuads, TriG or TriX - as a read-only generic store.

Inheritance
object
BaseAsyncSafeConnector
DatasetFileManager
Implements
IAsyncStorageProvider
IQueryableStorage
IStorageProvider
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 DatasetFileManager : BaseAsyncSafeConnector, IAsyncStorageProvider, IQueryableStorage, IStorageProvider, IStorageCapabilities, IDisposable, IConfigurationSerializable

Constructors

| Edit this page View Source

DatasetFileManager(string, bool)

Creates a new Dataset File Manager.

Declaration
public DatasetFileManager(string filename, bool isAsync)
Parameters
Type Name Description
string filename

File to load from.

bool isAsync

Whether to load asynchronously.

Properties

| Edit this page View Source

DeleteSupported

Returns that deleting graphs is not supported.

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

IOBehaviour

Gets the Save Behaviour of the Store.

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

IsReadOnly

Returns that the Manager is 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 Manager is ready if the underlying file has been loaded.

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

SourceFile

Gets the Source File this manager represents a read-only view of.

Declaration
public string SourceFile { get; }
Property Value
Type Description
string
| Edit this page View Source

UpdateSupported

Returns that Updates are not supported since this is a read-only connection.

Declaration
public override bool UpdateSupported { get; }
Property Value
Type Description
bool
Overrides
BaseAsyncSafeConnector.UpdateSupported

Methods

| Edit this page View Source

DeleteGraph(string)

Throws an error since this connection is read-only.

Declaration
public override void DeleteGraph(string graphUri)
Parameters
Type Name Description
string graphUri

URI of the Graph to delete.

Overrides
BaseAsyncSafeConnector.DeleteGraph(string)
Exceptions
Type Condition
RdfStorageException

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

| Edit this page View Source

DeleteGraph(Uri)

Throws an error since this connection is read-only.

Declaration
public override void DeleteGraph(Uri graphUri)
Parameters
Type Name Description
Uri graphUri

URI of the Graph to delete.

Overrides
BaseAsyncSafeConnector.DeleteGraph(Uri)
Exceptions
Type Condition
RdfStorageException

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

| 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()

Gets the list of 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 Dataset.

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

Graph to load into.

string graphUri

URI of the Graph to load.

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

LoadGraph(IGraph, Uri)

Loads a Graph from the Dataset.

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

Graph to load into.

Uri graphUri

URI of the Graph to load.

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

LoadGraph(IRdfHandler, string)

Loads a Graph from the Dataset with the given Handler.

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

RDF Handler.

string graphUri

URI of the Graph to load.

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

LoadGraph(IRdfHandler, Uri)

Loads a Graph from the Dataset with the given Handler.

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

RDF Handler.

Uri graphUri

URI of the Graph to load.

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

Query(string)

Makes a query against the in-memory copy of the Stores data.

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

SPARQL Query.

Returns
Type Description
object
| Edit this page View Source

Query(IRdfHandler, ISparqlResultsHandler, string)

Makes a query against the in-memory copy of the Stores data processing the results with one of the given handlers.

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

SaveGraph(IGraph)

Throws an error since this Manager is read-only.

Declaration
public override void SaveGraph(IGraph g)
Parameters
Type Name Description
IGraph g

Graph to save.

Overrides
BaseAsyncSafeConnector.SaveGraph(IGraph)
Exceptions
Type Condition
RdfStorageException

Always thrown since this Manager provides a read-only connection.

| Edit this page View Source

SerializeConfiguration(ConfigurationSerializationContext)

Serializes the connection's configuration.

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

Configuration Serialization Context.

| Edit this page View Source

ToString()

Gets the String representation of the Connection.

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

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

Throws an error since this Manager is read-only.

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

Graph URI.

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

Throws an error since this Manager is read-only.

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

Graph URI.

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

IAsyncStorageProvider
IQueryableStorage
IStorageProvider
IStorageCapabilities
IDisposable
IConfigurationSerializable

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • DatasetFileManager(string, bool)
  • Properties
    • DeleteSupported
    • IOBehaviour
    • IsReadOnly
    • IsReady
    • ListGraphsSupported
    • SourceFile
    • UpdateSupported
  • Methods
    • DeleteGraph(string)
    • DeleteGraph(Uri)
    • Dispose()
    • ListGraphNames()
    • ListGraphs()
    • LoadGraph(IGraph, string)
    • LoadGraph(IGraph, Uri)
    • LoadGraph(IRdfHandler, string)
    • LoadGraph(IRdfHandler, Uri)
    • Query(string)
    • Query(IRdfHandler, ISparqlResultsHandler, string)
    • 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