Class InMemoryDataset
Represents an in-memory dataset (i.e. a IInMemoryQueryableStore ) for querying and updating using SPARQL.
Inherited Members
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 SourceInMemoryDataset()
Creates a new in-memory dataset using the default in-memory TripleStore as the underlying storage.
Declaration
public InMemoryDataset()
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. |
unionDefaultGraph | Whether the Default Graph when no Active/Default Graph is explicitly set should be the union of all Graphs in the Dataset. |
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. |
InMemoryDataset(IInMemoryQueryableStore)
Creates a new In-Memory dataset.
Declaration
public InMemoryDataset(IInMemoryQueryableStore store)
Parameters
Type | Name | Description |
---|---|---|
IIn |
store | In-Memory queryable store. |
InMemoryDataset(IInMemoryQueryableStore, Boolean)
Creates a new In-Memory dataset.
Declaration
public InMemoryDataset(IInMemoryQueryableStore store, bool unionDefaultGraph)
Parameters
Type | Name | Description |
---|---|---|
IIn |
store | In-Memory queryable store. |
System. |
unionDefaultGraph | Whether the Default Graph when no Active/Default Graph is explicitly set should be the union of all Graphs in the Dataset. |
InMemoryDataset(IInMemoryQueryableStore, Uri)
Creates a new In-Memory dataset.
Declaration
public InMemoryDataset(IInMemoryQueryableStore store, Uri defaultGraphUri)
Parameters
Type | Name | Description |
---|---|---|
IIn |
store | In-Memory queryable store. |
System. |
defaultGraphUri | Default Graph URI. |
Properties
| Improve this Doc View SourceGraphs
Gets all the Graphs in the Dataset.
Declaration
public override IEnumerable<IGraph> Graphs { get; }
Property Value
Type | Description |
---|---|
System. |
Overrides
| Improve this Doc View SourceGraphUris
Gets all the URIs of Graphs in the Dataset.
Declaration
public override IEnumerable<Uri> GraphUris { get; }
Property Value
Type | Description |
---|---|
System. |
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. |
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. |
Overrides
| Improve this Doc View SourceContainsTripleInternal(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. |
Overrides
| Improve this Doc View SourceFlushInternal()
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
| Improve this Doc View SourceGetAllTriples()
Gets all the Triples in the underlying in-memory store.
Declaration
protected override IEnumerable<Triple> GetAllTriples()
Returns
Type | Description |
---|---|
System. |
Overrides
| Improve this Doc View SourceGetGraphInternal(Uri)
Gets the Graph with the given URI from the Dataset.
Declaration
protected override IGraph GetGraphInternal(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System. |
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 Get
GetModifiableGraphInternal(Uri)
Gets a Modifiable wrapper around a Graph in the Dataset.
Declaration
protected override ITransactionalGraph GetModifiableGraphInternal(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System. |
graphUri | Graph URI. |
Returns
Type | Description |
---|---|
ITransactional |
Overrides
| Improve this Doc View SourceGetTriplesWithObjectInternal(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. |
Overrides
| Improve this Doc View SourceGetTriplesWithPredicateInternal(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. |
Overrides
| Improve this Doc View SourceGetTriplesWithPredicateObjectInternal(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
Returns
Type | Description |
---|---|
System. |
Overrides
| Improve this Doc View SourceGetTriplesWithSubjectInternal(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. |
Overrides
| Improve this Doc View SourceGetTriplesWithSubjectObjectInternal(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
Returns
Type | Description |
---|---|
System. |
Overrides
| Improve this Doc View SourceGetTriplesWithSubjectPredicateInternal(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
Returns
Type | Description |
---|---|
System. |
Overrides
| Improve this Doc View SourceHasGraphInternal(Uri)
Gets whether a Graph with the given URI is the Dataset.
Declaration
protected override bool HasGraphInternal(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System. |
graphUri | Graph URI. |
Returns
Type | Description |
---|---|
System. |
Overrides
| Improve this Doc View SourceRemoveGraphInternal(Uri)
Removes a Graph from the Dataset.
Declaration
protected override bool RemoveGraphInternal(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System. |
graphUri | Graph URI. |
Returns
Type | Description |
---|---|
System. |