Class WrapperTripleStore
Abstract decorator for Triple Stores to make it easier to add new functionality on top of existing implementations.
Inheritance
System.Object
WrapperTripleStore
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
Assembly: dotNetRDF.dll
Syntax
public class WrapperTripleStore : ITripleStore, IDisposable
Constructors
| Improve this Doc View SourceWrapperTripleStore()
Creates a new triple store decorator that uses a default in-memory TripleStore.
Declaration
public WrapperTripleStore()
WrapperTripleStore(ITripleStore)
Creates a new triple store decorator around the given ITripleStore instance.
Declaration
public WrapperTripleStore(ITripleStore store)
Parameters
Type | Name | Description |
---|---|---|
ITripleStore | store | Triple Store. |
Fields
| Improve this Doc View Source_store
Underlying store.
Declaration
protected readonly ITripleStore _store
Field Value
Type | Description |
---|---|
ITripleStore |
Properties
| Improve this Doc View SourceGraphs
Gets the Graphs of the store.
Declaration
public virtual BaseGraphCollection Graphs { get; }
Property Value
Type | Description |
---|---|
BaseGraphCollection |
IsEmpty
Gets whether the store is empty.
Declaration
public virtual bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Item[Uri]
Gets a Graph from the store.
Declaration
public virtual IGraph this[Uri graphUri] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | Graph URI. |
Property Value
Type | Description |
---|---|
IGraph |
Triples
Gets the triples of the store.
Declaration
public virtual IEnumerable<Triple> Triples { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Triple> |
Methods
| Improve this Doc View SourceAdd(IGraph)
Adds a Graph to the store.
Declaration
public virtual bool Add(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
Returns
Type | Description |
---|---|
System.Boolean |
Add(IGraph, Boolean)
Adds a Graph to the store.
Declaration
public virtual bool Add(IGraph g, bool mergeIfExists)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
System.Boolean | mergeIfExists | Whether to merge with an existing graph with the same URI. |
Returns
Type | Description |
---|---|
System.Boolean |
AddFromUri(Uri)
Adds a Graph to the store from a URI.
Declaration
public virtual bool AddFromUri(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | Graph URI. |
Returns
Type | Description |
---|---|
System.Boolean |
AddFromUri(Uri, Boolean)
Adds a Graph to the store from a URI.
Declaration
public virtual bool AddFromUri(Uri graphUri, bool mergeIfExists)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | Graph URI. |
System.Boolean | mergeIfExists | Whether to merge with an existing graph with the same URI. |
Returns
Type | Description |
---|---|
System.Boolean |
Dispose()
Disposes of the Triple Store.
Declaration
public virtual void Dispose()
HasGraph(Uri)
Gets whether a Graph exists in the store.
Declaration
public virtual bool HasGraph(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | Graph URI. |
Returns
Type | Description |
---|---|
System.Boolean |
OnGraphAdded(Object, TripleStoreEventArgs)
Event Handler which handles the GraphAdded event from the underlying Graph Collection and raises the Triple Store's GraphAdded event.
Declaration
protected virtual void OnGraphAdded(object sender, TripleStoreEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | Sender. |
TripleStoreEventArgs | args | Graph Event Arguments. |
Remarks
Override this method if your Triple Store implementation wishes to take additional actions when a Graph is added to the Store.
|
Improve this Doc
View Source
OnGraphChanged(Object, TripleStoreEventArgs)
Event Handler which handles the Changed event of the contained Graphs by raising the Triple Store's GraphChanged event.
Declaration
protected virtual void OnGraphChanged(object sender, TripleStoreEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | Sender. |
TripleStoreEventArgs | args | Graph Event Arguments. |
OnGraphCleared(Object, TripleStoreEventArgs)
Event Handler which handles the Cleared event of the contained Graphs by raising the Triple Stores's GraphCleared event.
Declaration
protected virtual void OnGraphCleared(object sender, TripleStoreEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | Sender. |
TripleStoreEventArgs | args | Graph Event Arguments. |
OnGraphMerged(Object, TripleStoreEventArgs)
Event Handler which handles the Merged event of the contained Graphs by raising the Triple Store's GraphMerged event.
Declaration
protected virtual void OnGraphMerged(object sender, TripleStoreEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | Sender. |
TripleStoreEventArgs | args | Graph Event Arguments. |
OnGraphRemoved(Object, TripleStoreEventArgs)
Event Handler which handles the GraphRemoved event from the underlying Graph Collection and raises the Triple Stores's GraphRemoved event.
Declaration
protected virtual void OnGraphRemoved(object sender, TripleStoreEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | Sender. |
TripleStoreEventArgs | args | Graph Event Arguments. |
RaiseGraphAdded(GraphEventArgs)
Helper method for raising the GraphAdded event manually.
Declaration
protected void RaiseGraphAdded(GraphEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
GraphEventArgs | args | Graph Event Arguments. |
RaiseGraphAdded(IGraph)
Helper method for raising the GraphAdded event manually.
Declaration
protected void RaiseGraphAdded(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
RaiseGraphChanged(GraphEventArgs)
Helper method for raising the GraphChanged event manually.
Declaration
protected void RaiseGraphChanged(GraphEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
GraphEventArgs | args | Graph Event Arguments. |
RaiseGraphChanged(IGraph)
Helper method for raising the GraphChanged event manually.
Declaration
protected void RaiseGraphChanged(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
RaiseGraphCleared(GraphEventArgs)
Helper method for raising the GraphCleared event manually.
Declaration
protected void RaiseGraphCleared(GraphEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
GraphEventArgs | args | Graph Event Arguments. |
RaiseGraphMerged(GraphEventArgs)
Helper method for raising the GraphMerged event manually.
Declaration
protected void RaiseGraphMerged(GraphEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
GraphEventArgs | args | Graph Event Arguments. |
RaiseGraphRemoved(GraphEventArgs)
Helper method for raising the GraphRemoved event manually.
Declaration
protected void RaiseGraphRemoved(GraphEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
GraphEventArgs | args | Graph Event Arguments. |
RaiseGraphRemoved(IGraph)
Helper method for raising the GraphRemoved event manually.
Declaration
protected void RaiseGraphRemoved(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
Remove(Uri)
Removes a Graph from the store.
Declaration
public virtual bool Remove(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | Graph URI. |
Returns
Type | Description |
---|---|
System.Boolean |
Events
| Improve this Doc View SourceGraphAdded
Event which is raised when a graph is added
Declaration
public event TripleStoreEventHandler GraphAdded
Event Type
Type | Description |
---|---|
TripleStoreEventHandler |
GraphChanged
Event which is raised when a graph is changed
Declaration
public event TripleStoreEventHandler GraphChanged
Event Type
Type | Description |
---|---|
TripleStoreEventHandler |
GraphCleared
Event which is raised when a graph is cleared
Declaration
public event TripleStoreEventHandler GraphCleared
Event Type
Type | Description |
---|---|
TripleStoreEventHandler |
GraphMerged
Event which is raised when a graph is merged
Declaration
public event TripleStoreEventHandler GraphMerged
Event Type
Type | Description |
---|---|
TripleStoreEventHandler |
GraphRemoved
Events which is raised when a graph is removed
Declaration
public event TripleStoreEventHandler GraphRemoved
Event Type
Type | Description |
---|---|
TripleStoreEventHandler |
Implements
System.IDisposable