Interface ITripleStore
Interface for Triple Stores.
Inherited Members
Namespace: VDS.RDF
Assembly: dotNetRdf.dll
Syntax
public interface ITripleStore : IDisposable
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.
Properties
| Improve this Doc View SourceGraphs
Gets the Graph Collection of Graphs in this Triple Store.
Declaration
BaseGraphCollection Graphs { get; }
Property Value
| Type | Description |
|---|---|
| BaseGraphCollection |
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.
IsEmpty
Gets whether a TripleStore is Empty.
Declaration
bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.
this[Uri]
Gets a Graph from the Triple Store;.
Declaration
[Obsolete("Replaced by this[IRefNode]")]
IGraph this[Uri graphUri] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | graphUri | Graph URI. |
Property Value
| Type | Description |
|---|---|
| IGraph |
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.
this[IRefNode]
Gets a graph from the triple store.
Declaration
IGraph this[IRefNode graphName] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| IRefNode | graphName | The name of the graph to be retrieved. May be null to retrieve the default (unnamed) graph. |
Property Value
| Type | Description |
|---|---|
| IGraph |
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.
Triples
Gets all the Triples in the Triple Store which are currently loaded in memory (see remarks).
Declaration
IEnumerable<Triple> Triples { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<T><Triple> |
Remarks
Since a Triple Store object may represent only a snapshot of the underlying Store evaluating this enumerator may only return some of the Triples in the Store and may depending on specific Triple Store return nothing.
UriFactory
Get the preferred URI factory to use when creating URIs in this store.
Declaration
IUriFactory UriFactory { get; }
Property Value
| Type | Description |
|---|---|
| IUriFactory |
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.
Methods
| Improve this Doc View SourceAdd(IGraph, bool)
Adds a Graph into the Triple Store.
Declaration
bool Add(IGraph g, bool mergeIfExists)
Parameters
| Type | Name | Description |
|---|---|---|
| IGraph | g | Graph to add. |
| System.Boolean | mergeIfExists | Controls whether the Graph should be merged with an existing Graph of the same Uri if it already exists in the Triple Store. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.
Add(IGraph)
Adds a Graph into the Triple Store.
Declaration
bool Add(IGraph g)
Parameters
| Type | Name | Description |
|---|---|---|
| IGraph | g | Graph to add. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.
AddFromUri(Uri, bool, Loader)
Adds a Graph into the Triple Store by dereferencing the Graph Uri to get the RDF and then load the resulting Graph into the Triple Store.
Declaration
bool AddFromUri(Uri graphUri, bool mergeIfExists, Loader loader)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | graphUri | Uri of the Graph to be added. |
| System.Boolean | mergeIfExists | Controls whether the Graph should be merged with an existing Graph of the same Uri if it already exists in the Triple Store. |
| Loader | loader | The loader to use for retrieving and parsing the graph data. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.
AddFromUri(Uri, bool)
Adds a Graph into the Triple Store by dereferencing the Graph Uri to get the RDF and then load the resulting Graph into the Triple Store.
Declaration
bool AddFromUri(Uri graphUri, bool mergeIfExists)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | graphUri | Uri of the Graph to be added. |
| System.Boolean | mergeIfExists | Controls whether the Graph should be merged with an existing Graph of the same Uri if it already exists in the Triple Store. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.
AddFromUri(Uri)
Adds a Graph into the Triple Store by dereferencing the Graph Uri to get the RDF and then load the resulting Graph into the Triple Store.
Declaration
bool AddFromUri(Uri graphUri)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | graphUri | Uri of the Graph to be added. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.
HasGraph(Uri)
Checks whether the Graph with the given Uri is in this Triple Store.
Declaration
[Obsolete("Replaced by HasGraph(IRefNode)")]
bool HasGraph(Uri graphUri)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | graphUri | Graph Uri. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.
HasGraph(IRefNode)
Checks whether the graph with the given name is in this triple store.
Declaration
bool HasGraph(IRefNode graphName)
Parameters
| Type | Name | Description |
|---|---|---|
| IRefNode | graphName | The name of the graph to check for. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if this store contains a graph with the specified name, false otherwise. |
Remarks
Pass null forgraphName to check for the default (unnamed) graph.
Remove(Uri)
Removes a Graph from the Triple Store.
Declaration
[Obsolete("Replaced by Remove(IRefNode)")]
bool Remove(Uri graphUri)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Uri | graphUri | Graph Uri of the Graph to remove. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.
Remove(IRefNode)
Removes a graph from the triple store.
Declaration
bool Remove(IRefNode graphName)
Parameters
| Type | Name | Description |
|---|---|---|
| IRefNode | graphName | The name of the graph to remove. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the operation removed a graph, false if no matching graph was found to remove. |
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.
Events
| Improve this Doc View SourceGraphAdded
Event which is raised when a Graph is added
Declaration
event TripleStoreEventHandler GraphAdded
Event Type
| Type | Description |
|---|---|
| TripleStoreEventHandler |
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.
GraphChanged
Event which is raised when a Graphs contents changes
Declaration
event TripleStoreEventHandler GraphChanged
Event Type
| Type | Description |
|---|---|
| TripleStoreEventHandler |
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.
GraphCleared
Event which is raised when a Graph is cleared
Declaration
event TripleStoreEventHandler GraphCleared
Event Type
| Type | Description |
|---|---|
| TripleStoreEventHandler |
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.
GraphMerged
Event which is raised when a Graph has a merge operation performed on it
Declaration
event TripleStoreEventHandler GraphMerged
Event Type
| Type | Description |
|---|---|
| TripleStoreEventHandler |
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.
GraphRemoved
Event which is raised when a Graph is removed
Declaration
event TripleStoreEventHandler GraphRemoved
Event Type
| Type | Description |
|---|---|
| TripleStoreEventHandler |
Remarks
A Triple Store may be a representation of some storage backed actual store or just a temporary collection of Graphs created for working with. Note that an implementation is not required to provide a definitive view of a Triple Store and may only provide a limited/partial snapshot of the underlying store. Check the documentation for the various implementations to see what type of view of a Triple Store they actually provide.