Class BaseTripleStore
Abstract Base Class for a Triple Store.
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 abstract class BaseTripleStore : ITripleStore, IDisposable
Constructors
| Improve this Doc View SourceBaseTripleStore(BaseGraphCollection)
Creates a new Base Triple Store.
Declaration
protected BaseTripleStore(BaseGraphCollection graphCollection)
Parameters
Type | Name | Description |
---|---|---|
BaseGraphCollection | graphCollection | Graph Collection to use. |
Fields
| Improve this Doc View Source_graphs
Collection of Graphs that comprise the Triple Store.
Declaration
protected BaseGraphCollection _graphs
Field Value
Type | Description |
---|---|
BaseGraphCollection |
Properties
| Improve this Doc View SourceGraphs
Gets the Collection of Graphs that comprise this Triple Store.
Declaration
public BaseGraphCollection Graphs { get; }
Property Value
Type | Description |
---|---|
BaseGraphCollection |
IsEmpty
Gets whether the Triple Store is empty.
Declaration
public virtual bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Item[Uri]
Gets the Graph with the given URI.
Declaration
public IGraph this[Uri graphUri] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | Graph URI. |
Property Value
Type | Description |
---|---|
IGraph |
Triples
Gets all the Triples in the Triple Store.
Declaration
public IEnumerable<Triple> Triples { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Triple> |
Methods
| Improve this Doc View SourceAdd(IGraph)
Adds a Graph into the Triple Store.
Declaration
public virtual bool Add(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to add. |
Returns
Type | Description |
---|---|
System.Boolean |
Add(IGraph, Boolean)
Adds a Graph into the Triple Store using the chosen Merging Behaviour.
Declaration
public virtual bool Add(IGraph g, bool mergeIfExists)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to add. |
System.Boolean | mergeIfExists | Whether the Graph should be merged with an existing Graph with the same Base Uri. |
Returns
Type | Description |
---|---|
System.Boolean |
AddFromUri(Uri)
Adds a Graph into the Triple Store which is retrieved from the given Uri.
Declaration
public virtual bool AddFromUri(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | Uri of the Graph to load. |
Returns
Type | Description |
---|---|
System.Boolean |
AddFromUri(Uri, Boolean)
Adds a Graph into the Triple Store which is retrieved from the given Uri using the chosen Merging Behaviour.
Declaration
public virtual bool AddFromUri(Uri graphUri, bool mergeIfExists)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | Graph to add. |
System.Boolean | mergeIfExists | Whether the Graph should be merged with an existing Graph with the same Base Uri. |
Returns
Type | Description |
---|---|
System.Boolean |
Remarks
Important: Under Silverlight/Windows Phone 7 this will happen asynchronously so the Graph may not be immediatedly available in the store.
|
Improve this Doc
View Source
AttachEventHandlers(IGraph)
Helper method which attaches the Triple Store's Event Handlers to the relevant events of a Graph.
Declaration
protected void AttachEventHandlers(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph. |
DetachEventHandlers(IGraph)
Helper method which detaches the Triple Store's Event Handlers from the relevant events of a Graph.
Declaration
protected void DetachEventHandlers(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g |
Dispose()
Disposes of the Triple Store.
Declaration
public abstract void Dispose()
Remarks
Derived classes must override this to implement required disposal actions.
|
Improve this Doc
View Source
HasGraph(Uri)
Checks whether a Graph with the given Base Uri exists in the Triple Store.
Declaration
public bool HasGraph(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | Graph Uri. |
Returns
Type | Description |
---|---|
System.Boolean | True if the Graph exists in the Triple Store. |
OnGraphAdded(Object, GraphEventArgs)
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, GraphEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | Sender. |
GraphEventArgs | 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, GraphEventArgs)
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, GraphEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | Sender. |
GraphEventArgs | args | Graph Event Arguments. |
OnGraphCleared(Object, GraphEventArgs)
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, GraphEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | Sender. |
GraphEventArgs | args | Graph Event Arguments. |
OnGraphMerged(Object, GraphEventArgs)
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, GraphEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | Sender. |
GraphEventArgs | args | Graph Event Arguments. |
OnGraphRemoved(Object, GraphEventArgs)
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, GraphEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | Sender. |
GraphEventArgs | 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 Triple Store.
Declaration
public virtual bool Remove(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | Uri of the Graph to Remove. |
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 Graphs contents changes
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 has a merge operation performed on it
Declaration
public event TripleStoreEventHandler GraphMerged
Event Type
Type | Description |
---|---|
TripleStoreEventHandler |
GraphRemoved
Event which is raised when a Graph is removed
Declaration
public event TripleStoreEventHandler GraphRemoved
Event Type
Type | Description |
---|---|
TripleStoreEventHandler |
Implements
System.IDisposable