Show / Hide Table of Contents

Class InMemoryDataset

Represents an in-memory dataset (i.e. a IInMemoryQueryableStore) for querying and updating using SPARQL.
Inheritance
System.Object
BaseDataset
BaseTransactionalDataset
InMemoryDataset
Implements
IThreadSafeDataset
ISparqlDataset
Inherited Members
BaseTransactionalDataset.AddGraph(IGraph)
BaseTransactionalDataset.RemoveGraph(Uri)
BaseTransactionalDataset.Item[Uri]
BaseTransactionalDataset.GetModifiableGraph(Uri)
BaseTransactionalDataset.Flush()
BaseTransactionalDataset.Discard()
BaseTransactionalDataset.DiscardInternal()
BaseDataset.InternalDefaultGraph
BaseDataset.SetDefaultGraph(Uri)
BaseDataset.SetDefaultGraph(IEnumerable<Uri>)
BaseDataset.SetActiveGraph(Uri)
BaseDataset.SetActiveGraph(IEnumerable<Uri>)
BaseDataset.ResetActiveGraph()
BaseDataset.ResetDefaultGraph()
BaseDataset.DefaultGraphUris
BaseDataset.ActiveGraphUris
BaseDataset.UsesUnionDefaultGraph
BaseDataset.HasGraph(Uri)
BaseDataset.HasTriples
BaseDataset.ContainsTriple(Triple)
BaseDataset.Triples
BaseDataset.GetTriplesWithSubject(INode)
BaseDataset.GetTriplesWithPredicate(INode)
BaseDataset.GetTriplesWithObject(INode)
BaseDataset.GetTriplesWithSubjectPredicate(INode, INode)
BaseDataset.GetTriplesWithSubjectObject(INode, INode)
BaseDataset.GetTriplesWithPredicateObject(INode, INode)
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)
System.Object.ToString()
Namespace: VDS.RDF.Query.Datasets
Assembly: dotNetRDF.dll
Syntax
public class InMemoryDataset : BaseTransactionalDataset, IThreadSafeDataset, ISparqlDataset

Constructors

| Improve this Doc View Source

InMemoryDataset()

Creates a new in-memory dataset using the default in-memory TripleStore as the underlying storage.
Declaration
public InMemoryDataset()
| Improve this Doc View Source

InMemoryDataset(Boolean)

Creates a new in-memory dataset using the default in-memory TripleStore as the underlying storage.
Declaration
public InMemoryDataset(bool unionDefaultGraph)
Parameters
Type Name Description
System.Boolean unionDefaultGraph Whether the Default Graph when no Active/Default Graph is explicitly set should be the union of all Graphs in the Dataset.
| Improve this Doc View Source

InMemoryDataset(IGraph)

Creates a new in-memory dataset containing initially just the given graph and treating the given graph as the default graph of the dataset.
Declaration
public InMemoryDataset(IGraph g)
Parameters
Type Name Description
IGraph g Graph.
| Improve this Doc View Source

InMemoryDataset(IInMemoryQueryableStore)

Creates a new In-Memory dataset.
Declaration
public InMemoryDataset(IInMemoryQueryableStore store)
Parameters
Type Name Description
IInMemoryQueryableStore store In-Memory queryable store.
| Improve this Doc View Source

InMemoryDataset(IInMemoryQueryableStore, Boolean)

Creates a new In-Memory dataset.
Declaration
public InMemoryDataset(IInMemoryQueryableStore store, bool unionDefaultGraph)
Parameters
Type Name Description
IInMemoryQueryableStore store In-Memory queryable store.
System.Boolean unionDefaultGraph Whether the Default Graph when no Active/Default Graph is explicitly set should be the union of all Graphs in the Dataset.
| Improve this Doc View Source

InMemoryDataset(IInMemoryQueryableStore, Uri)

Creates a new In-Memory dataset.
Declaration
public InMemoryDataset(IInMemoryQueryableStore store, Uri defaultGraphUri)
Parameters
Type Name Description
IInMemoryQueryableStore store In-Memory queryable store.
System.Uri defaultGraphUri Default Graph URI.

Properties

| Improve this Doc View Source

Graphs

Gets all the Graphs in the Dataset.
Declaration
public override IEnumerable<IGraph> Graphs { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<IGraph>
Overrides
BaseDataset.Graphs
| Improve this Doc View Source

GraphUris

Gets all the URIs of Graphs in the Dataset.
Declaration
public override IEnumerable<Uri> GraphUris { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<System.Uri>
Overrides
BaseDataset.GraphUris
| Improve this Doc View Source

Lock

Gets the Lock used to ensure MRSW concurrency on the dataset when available.
Declaration
public ReaderWriterLockSlim Lock { get; }
Property Value
Type Description
System.Threading.ReaderWriterLockSlim

Methods

| Improve this Doc View Source

AddGraphInternal(IGraph)

Adds a Graph to the Dataset merging it with any existing Graph with the same URI.
Declaration
protected override bool AddGraphInternal(IGraph g)
Parameters
Type Name Description
IGraph g Graph.
Returns
Type Description
System.Boolean
Overrides
BaseTransactionalDataset.AddGraphInternal(IGraph)
| Improve this Doc View Source

ContainsTripleInternal(Triple)

Gets whether the Dataset contains a specific Triple.
Declaration
protected override bool ContainsTripleInternal(Triple t)
Parameters
Type Name Description
Triple t Triple.
Returns
Type Description
System.Boolean
Overrides
BaseDataset.ContainsTripleInternal(Triple)
| Improve this Doc View Source

FlushInternal()

If there have been changes made to the Dataset and the underlying in-memory store is a ITransactionalStore ensures the underlying store is notified to flush those changes.
Declaration
protected override void FlushInternal()
Overrides
BaseTransactionalDataset.FlushInternal()
| Improve this Doc View Source

GetAllTriples()

Gets all the Triples in the underlying in-memory store.
Declaration
protected override IEnumerable<Triple> GetAllTriples()
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple>
Overrides
BaseDataset.GetAllTriples()
| Improve this Doc View Source

GetGraphInternal(Uri)

Gets the Graph with the given URI from the Dataset.
Declaration
protected override IGraph GetGraphInternal(Uri graphUri)
Parameters
Type Name Description
System.Uri graphUri Graph URI.
Returns
Type Description
IGraph
Overrides
BaseDataset.GetGraphInternal(Uri)
Remarks

For In-Memory datasets the Graph returned from this property is no different from the Graph returned by the GetModifiableGraphInternal(Uri) method.

| Improve this Doc View Source

GetModifiableGraphInternal(Uri)

Gets a Modifiable wrapper around a Graph in the Dataset.
Declaration
protected override ITransactionalGraph GetModifiableGraphInternal(Uri graphUri)
Parameters
Type Name Description
System.Uri graphUri Graph URI.
Returns
Type Description
ITransactionalGraph
Overrides
BaseTransactionalDataset.GetModifiableGraphInternal(Uri)
| Improve this Doc View Source

GetTriplesWithObjectInternal(INode)

Gets all the Triples in the Dataset with the given Object.
Declaration
protected override IEnumerable<Triple> GetTriplesWithObjectInternal(INode obj)
Parameters
Type Name Description
INode obj Object.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple>
Overrides
BaseDataset.GetTriplesWithObjectInternal(INode)
| Improve this Doc View Source

GetTriplesWithPredicateInternal(INode)

Gets all the Triples in the Dataset with the given Predicate.
Declaration
protected override IEnumerable<Triple> GetTriplesWithPredicateInternal(INode pred)
Parameters
Type Name Description
INode pred Predicate.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple>
Overrides
BaseDataset.GetTriplesWithPredicateInternal(INode)
| Improve this Doc View Source

GetTriplesWithPredicateObjectInternal(INode, INode)

Gets all the Triples in the Dataset with the given Predicate and Object.
Declaration
protected override IEnumerable<Triple> GetTriplesWithPredicateObjectInternal(INode pred, INode obj)
Parameters
Type Name Description
INode pred Predicate.
INode obj Object.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple>
Overrides
BaseDataset.GetTriplesWithPredicateObjectInternal(INode, INode)
| Improve this Doc View Source

GetTriplesWithSubjectInternal(INode)

Gets all the Triples in the Dataset with the given Subject.
Declaration
protected override IEnumerable<Triple> GetTriplesWithSubjectInternal(INode subj)
Parameters
Type Name Description
INode subj Subject.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple>
Overrides
BaseDataset.GetTriplesWithSubjectInternal(INode)
| Improve this Doc View Source

GetTriplesWithSubjectObjectInternal(INode, INode)

Gets all the Triples in the Dataset with the given Subject and Object.
Declaration
protected override IEnumerable<Triple> GetTriplesWithSubjectObjectInternal(INode subj, INode obj)
Parameters
Type Name Description
INode subj Subject.
INode obj Object.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple>
Overrides
BaseDataset.GetTriplesWithSubjectObjectInternal(INode, INode)
| Improve this Doc View Source

GetTriplesWithSubjectPredicateInternal(INode, INode)

Gets all the Triples in the Dataset with the given Subject and Predicate.
Declaration
protected override IEnumerable<Triple> GetTriplesWithSubjectPredicateInternal(INode subj, INode pred)
Parameters
Type Name Description
INode subj Subject.
INode pred Predicate.
Returns
Type Description
System.Collections.Generic.IEnumerable<Triple>
Overrides
BaseDataset.GetTriplesWithSubjectPredicateInternal(INode, INode)
| Improve this Doc View Source

HasGraphInternal(Uri)

Gets whether a Graph with the given URI is the Dataset.
Declaration
protected override bool HasGraphInternal(Uri graphUri)
Parameters
Type Name Description
System.Uri graphUri Graph URI.
Returns
Type Description
System.Boolean
Overrides
BaseDataset.HasGraphInternal(Uri)
| Improve this Doc View Source

RemoveGraphInternal(Uri)

Removes a Graph from the Dataset.
Declaration
protected override bool RemoveGraphInternal(Uri graphUri)
Parameters
Type Name Description
System.Uri graphUri Graph URI.
Returns
Type Description
System.Boolean
Overrides
BaseDataset.RemoveGraphInternal(Uri)

Implements

IThreadSafeDataset
ISparqlDataset

Extension Methods

Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Constructors
    • InMemoryDataset()
    • InMemoryDataset(Boolean)
    • InMemoryDataset(IGraph)
    • InMemoryDataset(IInMemoryQueryableStore)
    • InMemoryDataset(IInMemoryQueryableStore, Boolean)
    • InMemoryDataset(IInMemoryQueryableStore, Uri)
  • Properties
    • Graphs
    • GraphUris
    • Lock
  • Methods
    • AddGraphInternal(IGraph)
    • ContainsTripleInternal(Triple)
    • FlushInternal()
    • GetAllTriples()
    • GetGraphInternal(Uri)
    • GetModifiableGraphInternal(Uri)
    • GetTriplesWithObjectInternal(INode)
    • GetTriplesWithPredicateInternal(INode)
    • GetTriplesWithPredicateObjectInternal(INode, INode)
    • GetTriplesWithSubjectInternal(INode)
    • GetTriplesWithSubjectObjectInternal(INode, INode)
    • GetTriplesWithSubjectPredicateInternal(INode, INode)
    • HasGraphInternal(Uri)
    • RemoveGraphInternal(Uri)
  • Implements
  • Extension Methods
Back to top Generated by DocFX