Interface IStorageProvider
Inherited Members
Namespace: VDS.RDF.Storage
Assembly: dotNetRDF.dll
Syntax
public interface IStorageProvider : IStorageCapabilities, IDisposable
Remarks
Properties
| Improve this Doc View SourceParentServer
Declaration
IStorageServer ParentServer { get; }
Property Value
Type | Description |
---|---|
IStorageServer |
Remarks
For storage backends which support multiple stores this is useful because it provides a way to access all the stores on that backend. For stores which are standalone they should simply return null.
Methods
| Improve this Doc View SourceDeleteGraph(String)
Declaration
void DeleteGraph(string graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.String | graphUri | URI of the Graph to be deleted. |
Remarks
Note: Not all Stores are capable of Deleting a Graph so it is acceptable for such a Store to throw a System.NotSupportedException or an RdfStorageException if the Store cannot provide this functionality.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | May be thrown if the underlying Store is not capable of doing Deleting a Graph. |
RdfStorageException | May be thrown if the underlying Store is not capable of Deleting a Graph or an error occurs while performing the delete. |
DeleteGraph(Uri)
Declaration
void DeleteGraph(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | URI of the Graph to be deleted. |
Remarks
Note: Not all Stores are capable of Deleting a Graph so it is acceptable for such a Store to throw a System.NotSupportedException or an RdfStorageException if the Store cannot provide this functionality.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | May be thrown if the underlying Store is not capable of doing Deleting a Graph. |
RdfStorageException | May be thrown if the underlying Store is not capable of Deleting a Graph or an error occurs while performing the delete. |
ListGraphs()
Declaration
IEnumerable<Uri> ListGraphs()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Uri> |
Remarks
Implementations should implement this method only if they need to provide a custom way of listing Graphs. If the Store for which you are providing a manager can efficiently return the Graphs using a SELECT DISTINCT ?g WHERE { GRAPH ?g { ?s ?p ?o } } query then there should be no need to implement this function.
LoadGraph(IGraph, String)
Declaration
void LoadGraph(IGraph g, string graphUri)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to load into. |
System.String | graphUri | URI of the Graph to load. |
Remarks
If the Graph being loaded into is Empty then it's Base Uri should become the Uri of the Graph being loaded, otherwise it should be merged into the existing non-empty Graph whose Base Uri should be unaffected.
Behaviour of this method with regards to non-existent Graphs is up to the implementor, an empty Graph may be returned or an error thrown. Implementors should state in the XML comments for their implementation what behaviour is implemented.
LoadGraph(IGraph, Uri)
Declaration
void LoadGraph(IGraph g, Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to load into. |
System.Uri | graphUri | Uri of the Graph to load. |
Remarks
If the Graph being loaded into is Empty then it's Base Uri should become the Uri of the Graph being loaded, otherwise it should be merged into the existing non-empty Graph whose Base Uri should be unaffected.
Behaviour of this method with regards to non-existent Graphs is up to the implementor, an empty Graph may be returned or an error thrown. Implementors should state in the XML comments for their implementation what behaviour is implemented.
LoadGraph(IRdfHandler, String)
Declaration
void LoadGraph(IRdfHandler handler, string graphUri)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | RDF Handler. |
System.String | graphUri | URI of the Graph to load. |
Remarks
Behaviour of this method with regards to non-existent Graphs is up to the implementor, an empty Graph may be returned or an error thrown. Implementors should state in the XML comments for their implementation what behaviour is implemented.
LoadGraph(IRdfHandler, Uri)
Declaration
void LoadGraph(IRdfHandler handler, Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | RDF Handler. |
System.Uri | graphUri | URI of the Graph to load. |
Remarks
Behaviour of this method with regards to non-existent Graphs is up to the implementor, an empty Graph may be returned or an error thrown. Implementors should state in the XML comments for their implementation what behaviour is implemented.
SaveGraph(IGraph)
Declaration
void SaveGraph(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to Save. |
Remarks
Behaviour of this method with regards to whether it overwrites/updates/merges with existing Graphs of the same Uri is up to the implementor and may be dependent on the underlying store. Implementors should state in the XML comments for their implementations what behaviour is implemented.
UpdateGraph(String, IEnumerable<Triple>, IEnumerable<Triple>)
Declaration
void UpdateGraph(string graphUri, IEnumerable<Triple> additions, IEnumerable<Triple> removals)
Parameters
Type | Name | Description |
---|---|---|
System.String | graphUri | Uri of the Graph to update. |
System.Collections.Generic.IEnumerable<Triple> | additions | Triples to add to the Graph. |
System.Collections.Generic.IEnumerable<Triple> | removals | Triples to remove from the Graph. |
Remarks
Note: Not all Stores are capable of supporting update at the individual Triple level and as such it is acceptable for such a Store to throw a System.NotSupportedException or an RdfStorageException if the Store cannot provide this functionality.
Behaviour of this method with regards to non-existent Graph is up to the implementor, it may create a new empty Graph and apply the updates to that or it may throw an error. Implementors should state in the XML comments for their implementation what behaviour is implemented.
Implementers MUST allow for either the additions or removals argument to be null.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | May be thrown if the underlying Store is not capable of doing Updates at the Triple level. |
RdfStorageException | May be thrown if the underlying Store is not capable of doing Updates at the Triple level or if some error occurs while attempting the Update. |
UpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>)
Declaration
void UpdateGraph(Uri graphUri, IEnumerable<Triple> additions, IEnumerable<Triple> removals)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | Uri of the Graph to update. |
System.Collections.Generic.IEnumerable<Triple> | additions | Triples to add to the Graph. |
System.Collections.Generic.IEnumerable<Triple> | removals | Triples to remove from the Graph. |
Remarks
Note: Not all Stores are capable of supporting update at the individual Triple level and as such it is acceptable for such a Store to throw a System.NotSupportedException if the Store cannot provide this functionality.
Behaviour of this method with regards to non-existent Graph is up to the implementor, it may create a new empty Graph and apply the updates to that or it may throw an error. Implementors should state in the XML comments for their implementation what behaviour is implemented.
Implementers MUST allow for either the additions or removals argument to be null.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | May be thrown if the underlying Store is not capable of doing Updates at the Triple level. |
RdfStorageException | May be thrown if the underlying Store is not capable of doing Updates at the Triple level or if some error occurs while attempting the Update. |