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
| Edit this page 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 |
---|---|---|
bool | 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)
Creates a new In-Memory dataset.
Declaration
public InMemoryQuadDataset(IInMemoryQueryableStore store)
Parameters
Type | Name | Description |
---|---|---|
IInMemoryQueryableStore | store | In-Memory queryable store. |
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. |
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. |
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 SourceGraphNames
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
| Edit this page 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 |
---|---|
IEnumerable<Uri> |
Overrides
| Edit this page View SourceGraphs
Gets all the Graphs in the Dataset.
Declaration
public override IEnumerable<IGraph> Graphs { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IGraph> |
Overrides
| Edit this page View SourceLock
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 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 |
---|---|
bool |
Overrides
| Edit this page 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 |
---|---|---|
Uri | graphUri | Graph URI. |
Triple | t | Triple. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page 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 |
---|---|
bool |
Overrides
| Edit this page 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 |
---|---|
bool |
Overrides
| Edit this page 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 |
---|---|
bool | True if |
Overrides
| Edit this page View SourceFlushInternal()
Flushes any changes to the store.
Declaration
protected override void FlushInternal()
Overrides
| Edit this page 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
| Edit this page View SourceGetQuads(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
| Edit this page 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 |
---|---|
IEnumerable<Triple> |
Overrides
| Edit this page 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 |
---|---|
IEnumerable<Triple> |
Overrides
| Edit this page 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 |
---|---|
IEnumerable<Triple> |
Overrides
| Edit this page 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 |
---|---|
IEnumerable<Triple> |
Overrides
| Edit this page 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 |
---|---|
IEnumerable<Triple> |
Overrides
| Edit this page 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 |
---|---|
IEnumerable<Triple> |
Overrides
| Edit this page View SourceGetQuoted(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
| Edit this page View SourceGetQuotedWithObject(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
| Edit this page View SourceGetQuotedWithPredicate(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
| Edit this page View SourceGetQuotedWithPredicateObject(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
| Edit this page View SourceGetQuotedWithSubject(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
| Edit this page View SourceGetQuotedWithSubjectObject(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
| Edit this page View SourceGetQuotedWithSubjectPredicate(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
| Edit this page 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 |
---|---|
bool |
Overrides
| Edit this page 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 |
---|---|
bool |
Overrides
| Edit this page 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 |
---|---|---|
Uri | graphUri | Graph URI. |
Triple | t | Triple. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page 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 |
---|---|
bool |