Show / Hide Table of Contents

Class InMemoryQuadDataset

An in-memory dataset that operates in terms of quads, underlying storage is identical to a InMemoryDataset though this dataset should be more performant for queries that access named graphs frequently.

Inheritance
object
BaseQuadDataset
BaseTransactionalQuadDataset
InMemoryQuadDataset
Implements
IThreadSafeDataset
ISparqlDataset
ITripleIndex
Inherited Members
BaseTransactionalQuadDataset.AddGraph(IGraph)
BaseTransactionalQuadDataset.RemoveGraph(Uri)
BaseTransactionalQuadDataset.RemoveGraph(IRefNode)
BaseTransactionalQuadDataset.this[Uri]
BaseTransactionalQuadDataset.this[IRefNode]
BaseTransactionalQuadDataset.GetModifiableGraph(Uri)
BaseTransactionalQuadDataset.GetModifiableGraph(IRefNode)
BaseTransactionalQuadDataset.Flush()
BaseTransactionalQuadDataset.Discard()
BaseTransactionalQuadDataset.DiscardInternal()
BaseQuadDataset.SetActiveGraph(IEnumerable<Uri>)
BaseQuadDataset.SetActiveGraph(IList<IRefNode>)
BaseQuadDataset.SetActiveGraph(Uri)
BaseQuadDataset.SetActiveGraph(IRefNode)
BaseQuadDataset.SetDefaultGraph(Uri)
BaseQuadDataset.SetDefaultGraph(IRefNode)
BaseQuadDataset.SetDefaultGraph(IEnumerable<Uri>)
BaseQuadDataset.SetDefaultGraph(IList<IRefNode>)
BaseQuadDataset.ResetActiveGraph()
BaseQuadDataset.ResetDefaultGraph()
BaseQuadDataset.DefaultGraphUris
BaseQuadDataset.DefaultGraphNames
BaseQuadDataset.ActiveGraphUris
BaseQuadDataset.ActiveGraphNames
BaseQuadDataset.UsesUnionDefaultGraph
BaseQuadDataset.IsDefaultGraph(Uri)
BaseQuadDataset.IsDefaultGraph(IRefNode)
BaseQuadDataset.HasGraph(Uri)
BaseQuadDataset.HasGraph(IRefNode)
BaseQuadDataset.HasTriples
BaseQuadDataset.ContainsTriple(Triple)
BaseQuadDataset.ContainsQuotedTriple(Triple)
BaseQuadDataset.Triples
BaseQuadDataset.QuotedTriples
BaseQuadDataset.GetTriplesWithSubject(INode)
BaseQuadDataset.GetTriplesWithSubject(Uri)
BaseQuadDataset.GetQuotedWithSubject(Uri)
BaseQuadDataset.GetQuotedWithSubject(INode)
BaseQuadDataset.GetTriplesWithPredicate(Uri)
BaseQuadDataset.GetTriplesWithPredicate(INode)
BaseQuadDataset.GetQuotedWithPredicate(Uri)
BaseQuadDataset.GetQuotedWithPredicate(INode)
BaseQuadDataset.GetTriples(Uri)
BaseQuadDataset.GetTriples(INode)
BaseQuadDataset.GetQuoted(Uri)
BaseQuadDataset.GetQuoted(INode)
BaseQuadDataset.GetTriplesWithObject(Uri)
BaseQuadDataset.GetTriplesWithObject(INode)
BaseQuadDataset.GetQuotedWithObject(Uri)
BaseQuadDataset.GetQuotedWithObject(INode)
BaseQuadDataset.GetTriplesWithSubjectPredicate(INode, INode)
BaseQuadDataset.GetQuotedWithSubjectPredicate(INode, INode)
BaseQuadDataset.GetTriplesWithSubjectObject(INode, INode)
BaseQuadDataset.GetQuotedWithSubjectObject(INode, INode)
BaseQuadDataset.GetTriplesWithPredicateObject(INode, INode)
BaseQuadDataset.GetQuotedWithPredicateObject(INode, INode)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VDS.RDF.Query.Datasets
Assembly: dotNetRdf.dll
Syntax
public class InMemoryQuadDataset : BaseTransactionalQuadDataset, IThreadSafeDataset, ISparqlDataset, ITripleIndex

Constructors

| Edit this page View Source

InMemoryQuadDataset()

Creates a new in-memory dataset using the default in-memory TripleStore as the underlying storage.

Declaration
public InMemoryQuadDataset()
| Edit this page View Source

InMemoryQuadDataset(bool)

Creates a new in-memory dataset using the default in-memory TripleStore as the underlying storage.

Declaration
public InMemoryQuadDataset(bool unionDefaultGraph)
Parameters
Type Name Description
bool unionDefaultGraph

Whether the Default Graph when no Active/Default Graph is explicitly set should be the union of all Graphs in the Dataset.

| Edit this page View Source

InMemoryQuadDataset(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 InMemoryQuadDataset(IGraph g)
Parameters
Type Name Description
IGraph g

Graph.

| Edit this page View Source

InMemoryQuadDataset(IInMemoryQueryableStore)

Creates a new In-Memory dataset.

Declaration
public InMemoryQuadDataset(IInMemoryQueryableStore store)
Parameters
Type Name Description
IInMemoryQueryableStore store

In-Memory queryable store.

| Edit this page View Source

InMemoryQuadDataset(IInMemoryQueryableStore, bool)

Creates a new In-Memory dataset.

Declaration
public InMemoryQuadDataset(IInMemoryQueryableStore store, bool unionDefaultGraph)
Parameters
Type Name Description
IInMemoryQueryableStore store

In-Memory queryable store.

bool unionDefaultGraph

Whether the Default Graph when no Active/Default Graph is explicitly set should be the union of all Graphs in the Dataset.

| Edit this page View Source

InMemoryQuadDataset(IInMemoryQueryableStore, Uri)

Creates a new In-Memory dataset.

Declaration
public InMemoryQuadDataset(IInMemoryQueryableStore store, Uri defaultGraphUri)
Parameters
Type Name Description
IInMemoryQueryableStore store

In-Memory queryable store.

Uri defaultGraphUri

Default Graph URI.

| Edit this page View Source

InMemoryQuadDataset(IInMemoryQueryableStore, IRefNode)

Creates a new In-Memory dataset.

Declaration
public InMemoryQuadDataset(IInMemoryQueryableStore store, IRefNode defaultGraphName)
Parameters
Type Name Description
IInMemoryQueryableStore store

In-Memory queryable store.

IRefNode defaultGraphName

Default Graph name.

Properties

| Edit this page View Source

GraphNames

Gets an enumeration of the names of all graphs in the dataset.

Declaration
public override IEnumerable<IRefNode> GraphNames { get; }
Property Value
Type Description
IEnumerable<IRefNode>
Overrides
BaseQuadDataset.GraphNames
| Edit this page View Source

GraphUris

Gets all the URIs of Graphs in the Dataset.

Declaration
[Obsolete("Replaced by GraphNames")]
public override IEnumerable<Uri> GraphUris { get; }
Property Value
Type Description
IEnumerable<Uri>
Overrides
BaseQuadDataset.GraphUris
| Edit this page View Source

Graphs

Gets all the Graphs in the Dataset.

Declaration
public override IEnumerable<IGraph> Graphs { get; }
Property Value
Type Description
IEnumerable<IGraph>
Overrides
BaseQuadDataset.Graphs
| Edit this page 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
ReaderWriterLockSlim

Methods

| Edit this page 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
bool
Overrides
BaseTransactionalQuadDataset.AddGraphInternal(IGraph)
| Edit this page View Source

AddQuad(Uri, Triple)

Adds a quad to the dataset.

Declaration
[Obsolete("Replaced by AddQuad(IRefNode, Triple)")]
public override bool AddQuad(Uri graphUri, Triple t)
Parameters
Type Name Description
Uri graphUri

Graph URI.

Triple t

Triple.

Returns
Type Description
bool
Overrides
BaseQuadDataset.AddQuad(Uri, Triple)
| Edit this page View Source

AddQuad(IRefNode, Triple)

Adds a Quad to the Dataset.

Declaration
public override bool AddQuad(IRefNode graphName, Triple t)
Parameters
Type Name Description
IRefNode graphName

Graph name.

Triple t

Triple.

Returns
Type Description
bool
Overrides
BaseQuadDataset.AddQuad(IRefNode, Triple)
| Edit this page View Source

ContainsQuad(IRefNode, Triple)

Gets whether a triple is asserted in a specific graph of the dataset.

Declaration
public override bool ContainsQuad(IRefNode graphName, Triple t)
Parameters
Type Name Description
IRefNode graphName

Graph name.

Triple t

Triple.

Returns
Type Description
bool
Overrides
BaseQuadDataset.ContainsQuad(IRefNode, Triple)
| Edit this page View Source

ContainsQuoted(IRefNode, Triple)

Gets whether a triple is quoted in a specified graph of the dataset.

Declaration
public override bool ContainsQuoted(IRefNode graphName, Triple t)
Parameters
Type Name Description
IRefNode graphName

Graph name.

Triple t

Triple.

Returns
Type Description
bool

True if t is quoted in the graph, false otherwise.

Overrides
BaseQuadDataset.ContainsQuoted(IRefNode, Triple)
| Edit this page View Source

FlushInternal()

Flushes any changes to the store.

Declaration
protected override void FlushInternal()
Overrides
BaseTransactionalQuadDataset.FlushInternal()
| Edit this page View Source

GetGraphInternal(IRefNode)

Gets the Graph with the given URI from the Dataset.

Declaration
protected override IGraph GetGraphInternal(IRefNode graphUri)
Parameters
Type Name Description
IRefNode graphUri

Graph URI.

Returns
Type Description
IGraph
Overrides
BaseQuadDataset.GetGraphInternal(IRefNode)
Remarks

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

| Edit this page View Source

GetModifiableGraphInternal(IRefNode)

Gets a Modifiable wrapper around a Graph in the Dataset.

Declaration
protected override ITransactionalGraph GetModifiableGraphInternal(IRefNode graphUri)
Parameters
Type Name Description
IRefNode graphUri

Graph URI.

Returns
Type Description
ITransactionalGraph
Overrides
BaseTransactionalQuadDataset.GetModifiableGraphInternal(IRefNode)
| Edit this page View Source

GetQuads(IRefNode)

Gets all asserted triples for a given graph.

Declaration
public override IEnumerable<Triple> GetQuads(IRefNode graphName)
Parameters
Type Name Description
IRefNode graphName

Graph name.

Returns
Type Description
IEnumerable<Triple>
Overrides
BaseQuadDataset.GetQuads(IRefNode)
| Edit this page View Source

GetQuadsWithObject(IRefNode, INode)

Gets all Quads with a given object.

Declaration
public override IEnumerable<Triple> GetQuadsWithObject(IRefNode graphName, INode obj)
Parameters
Type Name Description
IRefNode graphName

Graph name.

INode obj

Object.

Returns
Type Description
IEnumerable<Triple>
Overrides
BaseQuadDataset.GetQuadsWithObject(IRefNode, INode)
| Edit this page View Source

GetQuadsWithPredicate(IRefNode, INode)

Gets all Quads with a given predicate.

Declaration
public override IEnumerable<Triple> GetQuadsWithPredicate(IRefNode graphName, INode pred)
Parameters
Type Name Description
IRefNode graphName

Graph name.

INode pred

Predicate.

Returns
Type Description
IEnumerable<Triple>
Overrides
BaseQuadDataset.GetQuadsWithPredicate(IRefNode, INode)
| Edit this page View Source

GetQuadsWithPredicateObject(IRefNode, INode, INode)

Gets all Quads with a given predicate and object.

Declaration
public override IEnumerable<Triple> GetQuadsWithPredicateObject(IRefNode graphName, INode pred, INode obj)
Parameters
Type Name Description
IRefNode graphName

Graph URI.

INode pred

Predicate.

INode obj

Object.

Returns
Type Description
IEnumerable<Triple>
Overrides
BaseQuadDataset.GetQuadsWithPredicateObject(IRefNode, INode, INode)
| Edit this page View Source

GetQuadsWithSubject(IRefNode, INode)

Gets all Quads with a given subject.

Declaration
public override IEnumerable<Triple> GetQuadsWithSubject(IRefNode graphName, INode subj)
Parameters
Type Name Description
IRefNode graphName

Graph URI.

INode subj

Subject.

Returns
Type Description
IEnumerable<Triple>
Overrides
BaseQuadDataset.GetQuadsWithSubject(IRefNode, INode)
| Edit this page View Source

GetQuadsWithSubjectObject(IRefNode, INode, INode)

Gets all Quads with a given subject and object.

Declaration
public override IEnumerable<Triple> GetQuadsWithSubjectObject(IRefNode graphName, INode subj, INode obj)
Parameters
Type Name Description
IRefNode graphName

Graph URI.

INode subj

Subject.

INode obj

Object.

Returns
Type Description
IEnumerable<Triple>
Overrides
BaseQuadDataset.GetQuadsWithSubjectObject(IRefNode, INode, INode)
| Edit this page View Source

GetQuadsWithSubjectPredicate(IRefNode, INode, INode)

Gets all Quads with a given subject and predicate.

Declaration
public override IEnumerable<Triple> GetQuadsWithSubjectPredicate(IRefNode graphName, INode subj, INode pred)
Parameters
Type Name Description
IRefNode graphName

Graph URI.

INode subj

Subject.

INode pred

Predicate.

Returns
Type Description
IEnumerable<Triple>
Overrides
BaseQuadDataset.GetQuadsWithSubjectPredicate(IRefNode, INode, INode)
| Edit this page View Source

GetQuoted(IRefNode)

Gets all quoted triples for a given graph.

Declaration
public override IEnumerable<Triple> GetQuoted(IRefNode graphName)
Parameters
Type Name Description
IRefNode graphName
Returns
Type Description
IEnumerable<Triple>
Overrides
BaseQuadDataset.GetQuoted(IRefNode)
| Edit this page View Source

GetQuotedWithObject(IRefNode, INode)

Get the quoted triples with a given object in the specified graph.

Declaration
public override IEnumerable<Triple> GetQuotedWithObject(IRefNode graphName, INode obj)
Parameters
Type Name Description
IRefNode graphName

Graph name.

INode obj

Object.

Returns
Type Description
IEnumerable<Triple>
Overrides
BaseQuadDataset.GetQuotedWithObject(IRefNode, INode)
| Edit this page View Source

GetQuotedWithPredicate(IRefNode, INode)

Gets all the quoted triples in the specified graph that have the specified predicate.

Declaration
public override IEnumerable<Triple> GetQuotedWithPredicate(IRefNode graphName, INode pred)
Parameters
Type Name Description
IRefNode graphName

Graph name.

INode pred

Predicate.

Returns
Type Description
IEnumerable<Triple>
Overrides
BaseQuadDataset.GetQuotedWithPredicate(IRefNode, INode)
| Edit this page View Source

GetQuotedWithPredicateObject(IRefNode, INode, INode)

Get all the quoted triples in the specified graph that have the specified predicate and object.

Declaration
public override IEnumerable<Triple> GetQuotedWithPredicateObject(IRefNode graphName, INode pred, INode obj)
Parameters
Type Name Description
IRefNode graphName

Graph name.

INode pred

Predicate.

INode obj

Object.

Returns
Type Description
IEnumerable<Triple>
Overrides
BaseQuadDataset.GetQuotedWithPredicateObject(IRefNode, INode, INode)
| Edit this page View Source

GetQuotedWithSubject(IRefNode, INode)

Get all the quoted triples in the specified graph that have the specified subject.

Declaration
public override IEnumerable<Triple> GetQuotedWithSubject(IRefNode graphName, INode subj)
Parameters
Type Name Description
IRefNode graphName

Graph name.

INode subj

Subject.

Returns
Type Description
IEnumerable<Triple>
Overrides
BaseQuadDataset.GetQuotedWithSubject(IRefNode, INode)
| Edit this page View Source

GetQuotedWithSubjectObject(IRefNode, INode, INode)

Get all the quoted triples in the specified graph that have the specified subject and object.

Declaration
public override IEnumerable<Triple> GetQuotedWithSubjectObject(IRefNode graphName, INode subj, INode obj)
Parameters
Type Name Description
IRefNode graphName

Graph name.

INode subj

Subject.

INode obj

Object.

Returns
Type Description
IEnumerable<Triple>
Overrides
BaseQuadDataset.GetQuotedWithSubjectObject(IRefNode, INode, INode)
| Edit this page View Source

GetQuotedWithSubjectPredicate(IRefNode, INode, INode)

Get all the quoted triples in the specified graph that have the specified subject and predicate.

Declaration
public override IEnumerable<Triple> GetQuotedWithSubjectPredicate(IRefNode graphName, INode subj, INode pred)
Parameters
Type Name Description
IRefNode graphName

Graph name.

INode subj

Subject.

INode pred

Predicate.

Returns
Type Description
IEnumerable<Triple>
Overrides
BaseQuadDataset.GetQuotedWithSubjectPredicate(IRefNode, INode, INode)
| Edit this page View Source

HasGraphInternal(IRefNode)

Gets whether a Graph with the given URI is the Dataset.

Declaration
protected override bool HasGraphInternal(IRefNode graphUri)
Parameters
Type Name Description
IRefNode graphUri

Graph URI.

Returns
Type Description
bool
Overrides
BaseQuadDataset.HasGraphInternal(IRefNode)
| Edit this page View Source

RemoveGraphInternal(IRefNode)

Removes a graph from the dataset.

Declaration
protected override bool RemoveGraphInternal(IRefNode graphName)
Parameters
Type Name Description
IRefNode graphName

Graph name.

Returns
Type Description
bool
Overrides
BaseTransactionalQuadDataset.RemoveGraphInternal(IRefNode)
| Edit this page View Source

RemoveQuad(Uri, Triple)

Removes a quad from the dataset.

Declaration
[Obsolete("Replaced by RemoveQuad(IRefNode, Triple)")]
public override bool RemoveQuad(Uri graphUri, Triple t)
Parameters
Type Name Description
Uri graphUri

Graph URI.

Triple t

Triple.

Returns
Type Description
bool
Overrides
BaseQuadDataset.RemoveQuad(Uri, Triple)
| Edit this page View Source

RemoveQuad(IRefNode, Triple)

Removes a quad from the dataset.

Declaration
public override bool RemoveQuad(IRefNode graphName, Triple t)
Parameters
Type Name Description
IRefNode graphName

Graph name.

Triple t

Triple to remove.

Returns
Type Description
bool
Overrides
BaseQuadDataset.RemoveQuad(IRefNode, Triple)

Implements

IThreadSafeDataset
ISparqlDataset
ITripleIndex

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • InMemoryQuadDataset()
    • InMemoryQuadDataset(bool)
    • InMemoryQuadDataset(IGraph)
    • InMemoryQuadDataset(IInMemoryQueryableStore)
    • InMemoryQuadDataset(IInMemoryQueryableStore, bool)
    • InMemoryQuadDataset(IInMemoryQueryableStore, Uri)
    • InMemoryQuadDataset(IInMemoryQueryableStore, IRefNode)
  • Properties
    • GraphNames
    • GraphUris
    • Graphs
    • Lock
  • Methods
    • AddGraphInternal(IGraph)
    • AddQuad(Uri, Triple)
    • AddQuad(IRefNode, Triple)
    • ContainsQuad(IRefNode, Triple)
    • ContainsQuoted(IRefNode, Triple)
    • FlushInternal()
    • GetGraphInternal(IRefNode)
    • GetModifiableGraphInternal(IRefNode)
    • GetQuads(IRefNode)
    • GetQuadsWithObject(IRefNode, INode)
    • GetQuadsWithPredicate(IRefNode, INode)
    • GetQuadsWithPredicateObject(IRefNode, INode, INode)
    • GetQuadsWithSubject(IRefNode, INode)
    • GetQuadsWithSubjectObject(IRefNode, INode, INode)
    • GetQuadsWithSubjectPredicate(IRefNode, INode, INode)
    • GetQuoted(IRefNode)
    • GetQuotedWithObject(IRefNode, INode)
    • GetQuotedWithPredicate(IRefNode, INode)
    • GetQuotedWithPredicateObject(IRefNode, INode, INode)
    • GetQuotedWithSubject(IRefNode, INode)
    • GetQuotedWithSubjectObject(IRefNode, INode, INode)
    • GetQuotedWithSubjectPredicate(IRefNode, INode, INode)
    • HasGraphInternal(IRefNode)
    • RemoveGraphInternal(IRefNode)
    • RemoveQuad(Uri, Triple)
    • RemoveQuad(IRefNode, Triple)
  • Implements
  • Extension Methods
Back to top Generated by DocFX