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.
Inherited Members
Namespace: VDS.RDF.Query.Datasets
Assembly: dotNetRdf.dll
Syntax
public class InMemoryQuadDataset : BaseTransactionalQuadDataset, IThreadSafeDataset, ISparqlDataset, ITripleIndex
Constructors
| Improve this Doc View SourceInMemoryQuadDataset()
Creates a new in-memory dataset using the default in-memory TripleStore as the underlying storage.
Declaration
public InMemoryQuadDataset()
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 |
---|---|---|
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. |
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. |
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. |
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. |
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. |
System.Uri | defaultGraphUri | Default Graph URI. |
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. |
InMemoryQuadDataset(IInMemoryQueryableStore)
Creates a new In-Memory dataset.
Declaration
public InMemoryQuadDataset(IInMemoryQueryableStore store)
Parameters
Type | Name | Description |
---|---|---|
IInMemoryQueryableStore | store | In-Memory queryable store. |
Properties
| Improve this Doc View SourceGraphNames
Gets an enumeration of the names of all graphs in the dataset.
Declaration
public override IEnumerable<IRefNode> GraphNames { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><IRefNode> |
Overrides
| Improve this Doc View SourceGraphs
Gets all the Graphs in the Dataset.
Declaration
public override IEnumerable<IGraph> Graphs { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><IGraph> |
Overrides
| Improve this Doc View SourceGraphUris
Gets all the URIs of Graphs in the Dataset.
Declaration
[Obsolete("Replaced by GraphNames")]
public override IEnumerable<Uri> GraphUris { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><System.Uri> |
Overrides
| Improve this Doc View SourceLock
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 SourceAddGraphInternal(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
| Improve this Doc View SourceAddQuad(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 |
---|---|---|
System.Uri | graphUri | Graph URI. |
Triple | t | Triple. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceAddQuad(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 |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceContainsQuad(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 |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceContainsQuoted(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 |
---|---|
System.Boolean | True if |
Overrides
| Improve this Doc View SourceFlushInternal()
Flushes any changes to the store.
Declaration
protected override void FlushInternal()
Overrides
| Improve this Doc View SourceGetGraphInternal(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
Remarks
For In-Memory datasets the Graph returned from this property is no different from the Graph returned by the GetModifiableGraphInternal() method.
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
| Improve this Doc View SourceGetQuads(IRefNode)
Gets all quads for a given graph.
Declaration
public override IEnumerable<Triple> GetQuads(IRefNode graphName)
Parameters
Type | Name | Description |
---|---|---|
IRefNode | graphName | Graph name. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Overrides
| Improve this Doc View SourceGetQuadsWithObject(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 |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Overrides
| Improve this Doc View SourceGetQuadsWithPredicate(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 |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Overrides
| Improve this Doc View SourceGetQuadsWithPredicateObject(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 |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Overrides
| Improve this Doc View SourceGetQuadsWithSubject(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 |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Overrides
| Improve this Doc View SourceGetQuadsWithSubjectObject(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 |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Overrides
| Improve this Doc View SourceGetQuadsWithSubjectPredicate(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 |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Overrides
| Improve this Doc View SourceGetQuoted(IRefNode)
Declaration
public override IEnumerable<Triple> GetQuoted(IRefNode graphName)
Parameters
Type | Name | Description |
---|---|---|
IRefNode | graphName |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Overrides
| Improve this Doc View SourceGetQuotedWithObject(IRefNode, INode)
Declaration
public override IEnumerable<Triple> GetQuotedWithObject(IRefNode graphName, INode obj)
Parameters
Type | Name | Description |
---|---|---|
IRefNode | graphName | |
INode | obj |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Overrides
| Improve this Doc View SourceGetQuotedWithPredicate(IRefNode, INode)
Declaration
public override IEnumerable<Triple> GetQuotedWithPredicate(IRefNode graphName, INode pred)
Parameters
Type | Name | Description |
---|---|---|
IRefNode | graphName | |
INode | pred |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Overrides
| Improve this Doc View SourceGetQuotedWithPredicateObject(IRefNode, INode, INode)
Declaration
public override IEnumerable<Triple> GetQuotedWithPredicateObject(IRefNode graphName, INode pred, INode obj)
Parameters
Type | Name | Description |
---|---|---|
IRefNode | graphName | |
INode | pred | |
INode | obj |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Overrides
| Improve this Doc View SourceGetQuotedWithSubject(IRefNode, INode)
Declaration
public override IEnumerable<Triple> GetQuotedWithSubject(IRefNode graphName, INode subj)
Parameters
Type | Name | Description |
---|---|---|
IRefNode | graphName | |
INode | subj |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Overrides
| Improve this Doc View SourceGetQuotedWithSubjectObject(IRefNode, INode, INode)
Declaration
public override IEnumerable<Triple> GetQuotedWithSubjectObject(IRefNode graphName, INode subj, INode obj)
Parameters
Type | Name | Description |
---|---|---|
IRefNode | graphName | |
INode | subj | |
INode | obj |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Overrides
| Improve this Doc View SourceGetQuotedWithSubjectPredicate(IRefNode, INode, INode)
Declaration
public override IEnumerable<Triple> GetQuotedWithSubjectPredicate(IRefNode graphName, INode subj, INode pred)
Parameters
Type | Name | Description |
---|---|---|
IRefNode | graphName | |
INode | subj | |
INode | pred |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Triple> |
Overrides
| Improve this Doc View SourceHasGraphInternal(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 |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceRemoveGraphInternal(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 |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceRemoveQuad(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 |
---|---|---|
System.Uri | graphUri | Graph URI. |
Triple | t | Triple. |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceRemoveQuad(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 |
---|---|
System.Boolean |