Class SpinWrappedDataset
Provides SPIN capabilities for a Dataset over any SPIN-unaware IUpdateableStorage (including the InMemoryManager).
TODO decide how to handle the default unnamed graph case
TODO design a concurrency management policy
Inheritance
System.Object
SpinWrappedDataset
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()
Assembly: dotNetRDF.Query.Spin.dll
Syntax
public class SpinWrappedDataset : ISparqlDataset
Constructors
|
Improve this Doc
View Source
SpinWrappedDataset(Uri, IUpdateableStorage)
Inititalize a SpinWrapperDataset upon a storage engine using a RDF SparqlDataset definition.
Declaration
public SpinWrappedDataset(Uri datasetUri, IUpdateableStorage storage)
Parameters
|
Improve this Doc
View Source
SpinWrappedDataset(Uri, IUpdateableStorage, IEnumerable<Uri>)
Inititalize a SPIN model upon a storage engine using a RDF SparqlDataset definition composed of the specified graphs.
Declaration
public SpinWrappedDataset(Uri datasetUri, IUpdateableStorage storage, IEnumerable<Uri> graphUris)
Parameters
Type |
Name |
Description |
System.Uri |
datasetUri |
|
IUpdateableStorage |
storage |
|
System.Collections.Generic.IEnumerable<System.Uri> |
graphUris |
|
Fields
|
Improve this Doc
View Source
CommandCalls
The SPARQL update command calls made by this wrapper
Declaration
public List<string> CommandCalls
Field Value
Type |
Description |
System.Collections.Generic.List<System.String> |
|
Properties
|
Improve this Doc
View Source
ActiveGraphUris
Gets the enumeration of the Graph URIs that currently make up the active graph.
Declaration
public IEnumerable<Uri> ActiveGraphUris { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.Uri> |
|
|
Improve this Doc
View Source
DefaultGraphUris
Gets the enumeration of the Graph URIs that currently make up the default graph.
Declaration
public IEnumerable<Uri> DefaultGraphUris { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.Uri> |
|
|
Improve this Doc
View Source
Graphs
Gets all the Graphs in the Dataset.
Declaration
public IEnumerable<IGraph> Graphs { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<IGraph> |
|
|
Improve this Doc
View Source
GraphUris
Gets all the URIs of Graphs in the Dataset.
Declaration
public IEnumerable<Uri> GraphUris { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.Uri> |
|
|
Improve this Doc
View Source
HasTriples
Gets whether the Dataset has any Triples.
Declaration
public bool HasTriples { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Item[Uri]
Gets the Graph with the given URI from the Dataset.
Declaration
public IGraph this[Uri graphUri] { get; }
Parameters
Type |
Name |
Description |
System.Uri |
graphUri |
Graph URI. |
Property Value
|
Improve this Doc
View Source
Namespaces
Gets the Dataset namespace prefixes map if supported.
Declaration
public INamespaceMapper Namespaces { get; }
Property Value
|
Improve this Doc
View Source
SourceUri
Returns the original dataset Uri
Declaration
public Uri SourceUri { get; }
Property Value
Type |
Description |
System.Uri |
|
|
Improve this Doc
View Source
Triples
Gets all the Triples in the Dataset.
Declaration
public IEnumerable<Triple> Triples { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
UpdatesMonitor
Gets/sets a graph to monitor global changes to the dataset.
Responsibility for the management of this graph is left to the caller.
Changes will be notified only at the end of the update process to avoid inducing too much I/O with each partial result.
Declaration
public IGraph UpdatesMonitor { get; set; }
Property Value
|
Improve this Doc
View Source
Uri
Returns the current dataset Uri.
If the dataset has been updated use SourceUri to get the orignal dataset Uri
Declaration
Property Value
Type |
Description |
System.Uri |
|
|
Improve this Doc
View Source
UsesUnionDefaultGraph
Gets whether the Default Graph is treated as being the union of all Graphs in the dataset when no Default Graph is otherwise set.
Declaration
public bool UsesUnionDefaultGraph { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
|
Improve this Doc
View Source
AddGraph(IGraph)
Adds a graph in the dataset and submits it to SPIN processing.
If the graph already exists in the dataset, this will lead its replacement by the new graph.
Declaration
public bool AddGraph(IGraph g)
Parameters
Type |
Name |
Description |
IGraph |
g |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ContainsTriple(Triple)
Gets whether the Dataset contains a specific Triple.
Declaration
public bool ContainsTriple(Triple t)
Parameters
Type |
Name |
Description |
Triple |
t |
Triple. |
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Discard()
Ensures that any changes to the Dataset (if any) are discarded.
Declaration
|
Improve this Doc
View Source
ExecuteQuery(String)
Executes a SPARQL query on the dataset
Declaration
public object ExecuteQuery(string sparqlQuery)
Parameters
Type |
Name |
Description |
System.String |
sparqlQuery |
|
Returns
Type |
Description |
System.Object |
|
|
Improve this Doc
View Source
ExecuteUpdate()
Executes any pending SPARQL Update command from changes made to the dataset trough the API
Declaration
public void ExecuteUpdate()
|
Improve this Doc
View Source
ExecuteUpdate(String)
Executes the SPARQL Update command on the dataset
Declaration
public void ExecuteUpdate(string sparqlUpdateCommandSet)
Parameters
Type |
Name |
Description |
System.String |
sparqlUpdateCommandSet |
|
|
Improve this Doc
View Source
Flush()
Flushes changes to the dataset
TODO handle dataset changes as updates instread of overwriting it to make it workable in a concurrent environment.
Declaration
|
Improve this Doc
View Source
GetModifiableGraph(Uri)
Declaration
public IGraph GetModifiableGraph(Uri graphUri)
Parameters
Type |
Name |
Description |
System.Uri |
graphUri |
|
Returns
|
Improve this Doc
View Source
GetTriplesWithObject(INode)
Gets all the Triples in the Dataset with the given Object.
Declaration
public IEnumerable<Triple> GetTriplesWithObject(INode obj)
Parameters
Type |
Name |
Description |
INode |
obj |
Object. |
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
GetTriplesWithPredicate(INode)
Gets all the Triples in the Dataset with the given Predicate.
Declaration
public IEnumerable<Triple> GetTriplesWithPredicate(INode pred)
Parameters
Type |
Name |
Description |
INode |
pred |
Predicate. |
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
GetTriplesWithPredicateObject(INode, INode)
Gets all the Triples in the Dataset with the given Predicate and Object.
Declaration
public IEnumerable<Triple> GetTriplesWithPredicateObject(INode pred, INode obj)
Parameters
Type |
Name |
Description |
INode |
pred |
Predicate. |
INode |
obj |
Object. |
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
GetTriplesWithSubject(INode)
Gets all the Triples in the Dataset with the given Subject.
Declaration
public IEnumerable<Triple> GetTriplesWithSubject(INode subj)
Parameters
Type |
Name |
Description |
INode |
subj |
Subject. |
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
GetTriplesWithSubjectObject(INode, INode)
Gets all the Triples in the Dataset with the given Subject and Object.
Declaration
public IEnumerable<Triple> GetTriplesWithSubjectObject(INode subj, INode obj)
Parameters
Type |
Name |
Description |
INode |
subj |
Subject. |
INode |
obj |
Object. |
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
GetTriplesWithSubjectPredicate(INode, INode)
Gets all the Triples in the Dataset with the given Subject and Predicate.
Declaration
public IEnumerable<Triple> GetTriplesWithSubjectPredicate(INode subj, INode pred)
Parameters
Type |
Name |
Description |
INode |
subj |
Subject. |
INode |
pred |
Predicate. |
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Triple> |
|
|
Improve this Doc
View Source
HasGraph(Uri)
Gets whether a Graph with the given URI is the Dataset
Declaration
public bool HasGraph(Uri graphUri)
Parameters
Type |
Name |
Description |
System.Uri |
graphUri |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ImportGraph(Uri)
Declaration
public void ImportGraph(Uri graphUri)
Parameters
Type |
Name |
Description |
System.Uri |
graphUri |
|
|
Improve this Doc
View Source
ImportGraph(IGraph)
Imports a graph into the dataset and registers it as a SPIN.LibraryOntology for further SPIN processing.
Declaration
public void ImportGraph(IGraph graph)
Parameters
Type |
Name |
Description |
IGraph |
graph |
|
|
Improve this Doc
View Source
OnDatasetDescriptionChanged(Object, GraphEventArgs)
Event handler to monitor the current Dataset
Declaration
protected void OnDatasetDescriptionChanged(object sender, GraphEventArgs args)
Parameters
|
Improve this Doc
View Source
RemoveGraph(Uri)
Removes a graph from the Dataset.
The underlying graph and it's entailments are not deleted from the store, however all pending changes on the graph are cancelled
Declaration
public bool RemoveGraph(Uri graphUri)
Parameters
Type |
Name |
Description |
System.Uri |
graphUri |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ResetActiveGraph()
Resets the Active Graph to the previous Active Graph.
Declaration
public void ResetActiveGraph()
|
Improve this Doc
View Source
ResetDefaultGraph()
Resets the Default Graph to the previous Default Graph.
Declaration
public void ResetDefaultGraph()
|
Improve this Doc
View Source
SetActiveGraph(IEnumerable<Uri>)
Sets the Active Graph to be the merge of the Graphs with the given URIs.
Declaration
public void SetActiveGraph(IEnumerable<Uri> graphUris)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Uri> |
graphUris |
Graph URIs. |
|
Improve this Doc
View Source
SetActiveGraph(Uri)
Sets the Active Graph to be the Graph with the given URI.
Declaration
public void SetActiveGraph(Uri graphUri)
Parameters
Type |
Name |
Description |
System.Uri |
graphUri |
Graph URI. |
|
Improve this Doc
View Source
SetDefaultGraph(IEnumerable<Uri>)
Sets the Default Graph to be the merge of the Graphs with the given URIs.
Declaration
public void SetDefaultGraph(IEnumerable<Uri> graphUris)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Uri> |
graphUris |
Graph URIs. |
|
Improve this Doc
View Source
SetDefaultGraph(Uri)
Sets the Default Graph to be the Graph with the given URI.
Declaration
public void SetDefaultGraph(Uri graphUri)
Parameters
Type |
Name |
Description |
System.Uri |
graphUri |
Graph URI. |
Implements
Extension Methods