Class BaseStardogConnector
Abstract implementation of a connector for Stardog that connects using the HTTP protocol.
Inheritance
Implements
Inherited Members
Namespace: VDS.RDF.Storage
Assembly: dotNetRdf.dll
Syntax
public abstract class BaseStardogConnector : BaseAsyncHttpConnector, IAsyncQueryableStorage, IAsyncStorageProvider, IAsyncTransactionalStorage, IConfigurationSerializable, IQueryableStorage, ITransactionalStorage, IReasoningQueryableStorage, IStorageProvider, IStorageCapabilities, IDisposable
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Constructors
| Improve this Doc View SourceBaseStardogConnector(string, string, IWebProxy)
Creates a new connection to a Stardog Store.
Declaration
protected BaseStardogConnector(string baseUri, string kbID, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri of the Server. |
string | kbID | Knowledge Base (i.e. Database) ID. |
System.Net.IWebProxy | proxy | Proxy Server. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
BaseStardogConnector(string, string, string, string, IWebProxy)
Creates a new connection to a Stardog Store.
Declaration
protected BaseStardogConnector(string baseUri, string kbID, string username, string password, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri of the Server. |
string | kbID | Knowledge Base (i.e. Database) ID. |
string | username | Username. |
string | password | Password. |
System.Net.IWebProxy | proxy | Proxy Server. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
BaseStardogConnector(string, string, string, string)
Creates a new connection to a Stardog Store.
Declaration
protected BaseStardogConnector(string baseUri, string kbID, string username, string password)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri of the Server. |
string | kbID | Knowledge Base (i.e. Database) ID. |
string | username | Username. |
string | password | Password. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
BaseStardogConnector(string, string, StardogReasoningMode, HttpClientHandler)
Create a new connection to a Stardog store.
Declaration
protected BaseStardogConnector(string baseUri, string kbId, StardogReasoningMode reasoning, HttpClientHandler httpClientHandler)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base URI of the server. |
string | kbId | Knowledge base ID. |
StardogReasoningMode | reasoning | Reasoning mode. |
System.Net.Http.HttpClientHandler | httpClientHandler | Handler to configure outgoing HTTP requests. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
BaseStardogConnector(string, string, StardogReasoningMode, IWebProxy)
Creates a new connection to a Stardog Store.
Declaration
protected BaseStardogConnector(string baseUri, string kbID, StardogReasoningMode reasoning, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri of the Server. |
string | kbID | Knowledge Base (i.e. Database) ID. |
StardogReasoningMode | reasoning | Reasoning Mode. |
System.Net.IWebProxy | proxy | Proxy Server. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
BaseStardogConnector(string, string, StardogReasoningMode, string, string, IWebProxy)
Creates a new connection to a Stardog Store.
Declaration
protected BaseStardogConnector(string baseUri, string kbID, StardogReasoningMode reasoning, string username, string password, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri of the Server. |
string | kbID | Knowledge Base (i.e. Database) ID. |
StardogReasoningMode | reasoning | Reasoning Mode. |
string | username | Username. |
string | password | Password. |
System.Net.IWebProxy | proxy | Proxy Server. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
BaseStardogConnector(string, string, StardogReasoningMode, string, string)
Creates a new connection to a Stardog Store.
Declaration
protected BaseStardogConnector(string baseUri, string kbID, StardogReasoningMode reasoning, string username, string password)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri of the Server. |
string | kbID | Knowledge Base (i.e. Database) ID. |
StardogReasoningMode | reasoning | Reasoning Mode. |
string | username | Username. |
string | password | Password. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
BaseStardogConnector(string, string, StardogReasoningMode)
Creates a new connection to a Stardog Store.
Declaration
protected BaseStardogConnector(string baseUri, string kbID, StardogReasoningMode reasoning)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri of the Server. |
string | kbID | Knowledge Base (i.e. Database) ID. |
StardogReasoningMode | reasoning | Reasoning Mode. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
BaseStardogConnector(string, string)
Creates a new connection to a Stardog Store.
Declaration
protected BaseStardogConnector(string baseUri, string kbID)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri of the Server. |
string | kbID | Knowledge Base (i.e. Database) ID. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Fields
| Improve this Doc View SourceAnonymousUser
Constant for the default Anonymous user account and password used by Stardog if you have not supplied a shiro.ini file or otherwise disabled security.
Declaration
public const string AnonymousUser = "anonymous"
Field Value
Type | Description |
---|---|
string |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Server
The underlying server connection.
Declaration
protected BaseStardogServer Server
Field Value
Type | Description |
---|---|
BaseStardogServer |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Properties
| Improve this Doc View SourceAsyncParentServer
Gets the parent server.
Declaration
public override IAsyncStorageServer AsyncParentServer { get; }
Property Value
Type | Description |
---|---|
IAsyncStorageServer |
Overrides
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
BaseUri
Gets the Base URI of the Stardog server.
Declaration
public string BaseUri { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
DeleteSupported
Returns that deleting graphs from the Stardog store is not yet supported (due to a .Net specific issue).
Declaration
public override bool DeleteSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
IOBehaviour
Gets the IO Behaviour of Stardog.
Declaration
public override IOBehaviour IOBehaviour { get; }
Property Value
Type | Description |
---|---|
IOBehaviour |
Overrides
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
IsReadOnly
Returns that the Connection is not read-only.
Declaration
public override bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
IsReady
Returns that the Connection is ready.
Declaration
public override bool IsReady { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
Returns true if the knowledge base specified in the class constructor is found on the server, false otherwise.
KbId
Gets the knowledge base ID being used by this connector.
Declaration
public string KbId { get; }
Property Value
Type | Description |
---|---|
string |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
ListGraphsSupported
Returns that listing Graphs is supported.
Declaration
public override bool ListGraphsSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
ParentServer
Gets the parent server.
Declaration
public override IStorageServer ParentServer { get; }
Property Value
Type | Description |
---|---|
IStorageServer |
Overrides
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Reasoning
Gets/Sets the reasoning mode to use for queries.
Declaration
public virtual StardogReasoningMode Reasoning { get; set; }
Property Value
Type | Description |
---|---|
StardogReasoningMode |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
UpdateSupported
Returns that Updates are supported on Stardog Stores.
Declaration
public override bool UpdateSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Methods
| Improve this Doc View SourceAddStardogHeaders(HttpRequestMessage)
Adds Stardog specific request headers; reasoning needed for < 2.2.
Declaration
protected virtual void AddStardogHeaders(HttpRequestMessage request)
Parameters
Type | Name | Description |
---|---|---|
System.Net.Http.HttpRequestMessage | request |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
AddStardogHeaders(HttpWebRequest)
Adds Stardog specific request headers; reasoning needed for < 2.2.
Declaration
[Obsolete("This method is obsolete and will be removed in a future release. Replaced by AddStartdogHeaders(HttpRequestMessage).")]
protected virtual void AddStardogHeaders(HttpWebRequest request)
Parameters
Type | Name | Description |
---|---|---|
System.Net.HttpWebRequest | request |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Begin()
Begins a new Transaction.
Declaration
public virtual void Begin()
Remarks
A single transaction.
Begin(bool)
Begins a new Transaction.
Declaration
public virtual void Begin(bool enableReasoning)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enableReasoning | Opens the transaction with reasoning enabled. |
Remarks
A single transaction.
Begin(AsyncStorageCallback, object)
Begins a transaction asynchronously.
Declaration
public virtual void Begin(AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
BeginAsync(CancellationToken)
Begins a transaction asynchronously.
Declaration
public virtual Task BeginAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Exceptions
Type | Condition |
---|---|
RdfStorageException | Raised if there is already an active transaction for this connector or if the Stardog server responds with an error status code or a null or empty response. |
BeginTransaction(bool)
Start a transaction.
Declaration
protected virtual string BeginTransaction(bool enableReasoning = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enableReasoning | Opens the transaction with reasoning enabled (requires StarDog v5.3.0 or later). |
Returns
Type | Description |
---|---|
string | A transaction ID for the new transaction. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Commit()
Commits the active Transaction.
Declaration
public virtual void Commit()
Remarks
Transactions are scoped to Managed Threads.
Exceptions
Type | Condition |
---|---|
RdfStorageException | Thrown if there is not an active Transaction on the current Thread. |
Commit(AsyncStorageCallback, object)
Commits a transaction asynchronously.
Declaration
public virtual void Commit(AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
CommitAsync(CancellationToken)
Commit a transaction asynchronously.
Declaration
public virtual Task CommitAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Exceptions
Type | Condition |
---|---|
RdfStorageException | Raised if there is currently no open transaction for this connector, or if the Stardog server responds with an error status code. |
CommitTransaction(string)
Commit an open transaction.
Declaration
protected virtual void CommitTransaction(string transactionId)
Parameters
Type | Name | Description |
---|---|---|
string | transactionId | The ID of the transaction to commit. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
CreateRequest(string, string, HttpMethod, Dictionary<string, string>)
Helper method for creating HTTP Requests to the Store.
Declaration
protected virtual HttpRequestMessage CreateRequest(string servicePath, string accept, HttpMethod method, Dictionary<string, string> requestParams)
Parameters
Type | Name | Description |
---|---|---|
string | servicePath | Path to the Service requested. |
string | accept | Acceptable Content Types. |
System.Net.Http.HttpMethod | method | HTTP Method. |
System.Collections.Generic.Dictionary<TKey, TValue><string, string> | requestParams | Querystring Parameters. |
Returns
Type | Description |
---|---|
System.Net.Http.HttpRequestMessage |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
CreateRequest(string, string, string, Dictionary<string, string>)
Helper method for creating HTTP Requests to the Store.
Declaration
[Obsolete("This method has been replaced by CreateRequest(string, string, HttpMethod, Dictionary<string, string>.")]
protected virtual HttpWebRequest CreateRequest(string servicePath, string accept, string method, Dictionary<string, string> requestParams)
Parameters
Type | Name | Description |
---|---|---|
string | servicePath | Path to the Service requested. |
string | accept | Acceptable Content Types. |
string | method | HTTP Method. |
System.Collections.Generic.Dictionary<TKey, TValue><string, string> | requestParams | Querystring Parameters. |
Returns
Type | Description |
---|---|
System.Net.HttpWebRequest |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
DeleteGraph(string, AsyncStorageCallback, object)
Deletes a Graph from the Store.
Declaration
public override void DeleteGraph(string graphUri, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
string | graphUri | URI of the Graph to delete. |
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Overrides
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
DeleteGraph(string)
Deletes a Graph from the Stardog store.
Declaration
public virtual void DeleteGraph(string graphUri)
Parameters
Type | Name | Description |
---|---|---|
string | graphUri | URI of the Graph to delete. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
DeleteGraph(Uri)
Deletes a Graph from the Stardog store.
Declaration
public virtual void DeleteGraph(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | URI of the Graph to delete. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
DeleteGraphAsync(string, bool, string, AsyncStorageCallback, object)
Delete a graph as part of an open transaction.
Declaration
protected virtual void DeleteGraphAsync(string tID, bool autoCommit, string graphUri, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
string | tID | The ID of the transaction to use. |
System.Boolean | autoCommit | True to commit the transaction at the end of the delete operation, false to leave the transaction open. |
string | graphUri | The URI of the graph to delete. |
AsyncStorageCallback | callback | Callback to invoked on completion of the operation. |
System.Object | state | Additional state to pass into the callback. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
DeleteGraphAsync(string, string, bool, CancellationToken)
Delete a graph asynchronously withing the context of a transaction.
Declaration
protected virtual Task DeleteGraphAsync(string transactionId, string graphName, bool autoCommit, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | transactionId | The transaction to use. |
string | graphName | The name of the graph to be deleted. |
System.Boolean | autoCommit | Whether to automatically commit/rollback the transaction. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Exceptions
Type | Condition |
---|---|
RdfStorageException | Raised if the Stardog server responds with an error status code when deleting thre graph or commiting the transaction. |
DeleteGraphAsync(string, CancellationToken)
Deletes a graph from the store asynchronously.
Declaration
public override Task DeleteGraphAsync(string graphName, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | graphName | Name of the graph to delete. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Dispose(bool)
Disposes of the Connector.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
GetReasoningParameter()
Get the query parameter string that specifies the current reasoning mode.
Declaration
protected virtual string GetReasoningParameter()
Returns
Type | Description |
---|---|
string |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
ListGraphNames()
Gets an enumeration of the names of the graphs in the store.
Declaration
public virtual IEnumerable<string> ListGraphNames()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><string> |
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.
ListGraphs()
Gets the list of Graphs in the Stardog store.
Declaration
public virtual IEnumerable<Uri> ListGraphs()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><System.Uri> |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
LoadGraph(IGraph, string)
Loads a Graph from the Store.
Declaration
public virtual void LoadGraph(IGraph g, string graphUri)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to load into. |
string | graphUri | Uri of the Graph to load. |
Remarks
If an empty/null Uri is specified then the Default Graph of the Store will be loaded.
LoadGraph(IGraph, Uri)
Loads a Graph from the Store.
Declaration
public virtual 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 an empty/null URI is specified then the Default Graph of the Store will be loaded.
LoadGraph(IRdfHandler, string, AsyncStorageCallback, object)
Loads a Graph from the Store asynchronously.
Declaration
public override void LoadGraph(IRdfHandler handler, string graphUri, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | Handler to load with. |
string | graphUri | URI of the Graph to load. |
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Overrides
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
LoadGraph(IRdfHandler, string)
Loads a Graph from the Store.
Declaration
public virtual void LoadGraph(IRdfHandler handler, string graphUri)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | RDF Handler. |
string | graphUri | URI of the Graph to load. |
Remarks
If an empty/null URI is specified then the Default Graph of the Store will be loaded.
LoadGraph(IRdfHandler, Uri)
Loads a Graph from the Store.
Declaration
public virtual void LoadGraph(IRdfHandler handler, Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | RDF Handler. |
System.Uri | graphUri | URI of the Graph to load. |
Remarks
If an empty/null URI is specified then the Default Graph of the Store will be loaded.
LoadGraphAsync(IRdfHandler, string, CancellationToken)
Loads a graph from the store asynchronously.
Declaration
public override Task LoadGraphAsync(IRdfHandler handler, string graphName, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | handler | The handler to receive the loaded triples. |
string | graphName | Name of the graph to load. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
MakeAddTriplesRequestMessage(string, string, IEnumerable<Triple>)
Helper method to construct an HTTP request to add triples to a graph.
Declaration
protected virtual HttpRequestMessage MakeAddTriplesRequestMessage(string transactionId, string graphName, IEnumerable<Triple> additions)
Parameters
Type | Name | Description |
---|---|---|
string | transactionId | The ID of the transaction to use for the update. |
string | graphName | The name of the graph to be updated. |
System.Collections.Generic.IEnumerable<T><Triple> | additions | The triples to add to the graph. |
Returns
Type | Description |
---|---|
System.Net.Http.HttpRequestMessage |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
MakeDeleteGraphRequestMessage(string, string)
Helper method that constructs the request message to send to the server to delete a graph.
Declaration
protected virtual HttpRequestMessage MakeDeleteGraphRequestMessage(string transactionId, string graphName)
Parameters
Type | Name | Description |
---|---|---|
string | transactionId | The ID of the transaction within which the graph will be deleted. |
string | graphName | The name of the graph to be deleted. |
Returns
Type | Description |
---|---|
System.Net.Http.HttpRequestMessage | A configured System.Net.Http.HttpRequestMessage instance. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
MakeRemoveTriplesRequestMessage(string, string, IEnumerable<Triple>)
Helper method to construct an HTTP request to remove triples from a graph.
Declaration
protected virtual HttpRequestMessage MakeRemoveTriplesRequestMessage(string transactionId, string graphName, IEnumerable<Triple> removals)
Parameters
Type | Name | Description |
---|---|---|
string | transactionId | The ID of the transaction to use for the update. |
string | graphName | The name of the graph to be updated. |
System.Collections.Generic.IEnumerable<T><Triple> | removals | The triples to remove from the graph. |
Returns
Type | Description |
---|---|
System.Net.Http.HttpRequestMessage |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Query(string, bool)
Makes a SPARQL Query against the underlying Store using whatever reasoning mode is currently in-use, the reasoning can be set by query.
Declaration
public virtual object Query(string sparqlQuery, bool reasoning)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlQuery | Sparql Query. |
System.Boolean | reasoning |
Returns
Type | Description |
---|---|
System.Object |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Query(string, AsyncStorageCallback, object)
Queries the store asynchronously.
Declaration
public virtual void Query(string query, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
string | query | SPARQL Query. |
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Query(string)
Makes a SPARQL Query against the underlying Store using whatever reasoning mode is currently in-use.
Declaration
public virtual object Query(string sparqlQuery)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlQuery | Sparql Query. |
Returns
Type | Description |
---|---|
System.Object |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Query(IRdfHandler, ISparqlResultsHandler, string, bool)
Makes a SPARQL Query against the underlying Store using whatever reasoning mode is currently in-use processing the results using an appropriate handler from those provided, the reasoning can be set by query.
Declaration
public virtual void Query(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string sparqlQuery, bool reasoning)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | rdfHandler | RDF Handler. |
ISparqlResultsHandler | resultsHandler | Results Handler. |
string | sparqlQuery | SPARQL Query. |
System.Boolean | reasoning |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Query(IRdfHandler, ISparqlResultsHandler, string, AsyncStorageCallback, object)
Queries the store asynchronously.
Declaration
public virtual void Query(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string query, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | rdfHandler | RDF Handler. |
ISparqlResultsHandler | resultsHandler | Results Handler. |
string | query | SPARQL Query. |
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Query(IRdfHandler, ISparqlResultsHandler, string)
Makes a SPARQL Query against the underlying Store using whatever reasoning mode is currently in-use processing the results using an appropriate handler from those provided.
Declaration
public virtual void Query(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string sparqlQuery)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | rdfHandler | RDF Handler. |
ISparqlResultsHandler | resultsHandler | Results Handler. |
string | sparqlQuery | SPARQL Query. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
QueryAsync(string, CancellationToken)
Queries the store asynchronously.
Declaration
public virtual Task<object> QueryAsync(string query, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | query | |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult><System.Object> |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
QueryAsync(IRdfHandler, ISparqlResultsHandler, string, CancellationToken)
Queries the store asynchronously.
Declaration
public virtual Task QueryAsync(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string query, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | rdfHandler | RDF Handler that will receive graph results from CONSTRUCT or DESCRIBE queries. |
ISparqlResultsHandler | resultsHandler | SPARQL Results set handler that will receive results from ASK or SELECT queries. |
string | query | |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Rollback()
Rolls back the active Transaction.
Declaration
public virtual void Rollback()
Remarks
Transactions are scoped to Managed Threads.
Exceptions
Type | Condition |
---|---|
RdfStorageException | Thrown if there is not an active Transaction on the current Thread. |
Rollback(AsyncStorageCallback, object)
Rolls back a transaction asynchronously.
Declaration
public virtual void Rollback(AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
RollbackAsync(CancellationToken)
Roll back the current transaction on this connector asynchronously.
Declaration
public virtual Task RollbackAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Exceptions
Type | Condition |
---|---|
RdfStorageException | If there is no open transaction on the connector or if the Stardog server responds with an error status code. |
RollbackTransaction(string)
Rollback an open transaction.
Declaration
protected virtual void RollbackTransaction(string transactionId)
Parameters
Type | Name | Description |
---|---|---|
string | transactionId | The ID of the transaction to rollback. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
SaveGraph(IGraph, AsyncStorageCallback, object)
Saves a Graph to the Store asynchronously.
Declaration
public override void SaveGraph(IGraph g, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to save. |
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Overrides
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
SaveGraph(IGraph)
Saves a Graph into the Store (see remarks for notes on merge/overwrite behaviour).
Declaration
public virtual void SaveGraph(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to save. |
Remarks
If the Graph has no URI then the contents will be appended to the Store's Default Graph. If the Graph has a URI then existing Graph associated with that URI will be replaced. To append to a named Graph use the UpdateGraph() method instead.
SaveGraphAsync(string, bool, IGraph, CancellationToken)
Save a graph asynchronously within the scope of an open transaction.
Declaration
protected virtual Task SaveGraphAsync(string transactionId, bool autoCommit, IGraph g, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | transactionId | The ID of the transaction. |
System.Boolean | autoCommit | Whether to commit/rollback the transaction when the operation is completed. |
IGraph | g | The graph to save. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Exceptions
Type | Condition |
---|---|
RdfStorageException | Raised if the Stardog server responds with an error status code. |
SaveGraphAsync(string, bool, IGraph, AsyncStorageCallback, object)
Save a graph to the database asynchronously within the context of an open transaction.
Declaration
protected virtual void SaveGraphAsync(string tID, bool autoCommit, IGraph g, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
string | tID | The ID of the transaction to use for the update. |
System.Boolean | autoCommit | True to commit the transaction on completion. |
IGraph | g | The graph to write. |
AsyncStorageCallback | callback | Callback invoked on completion. |
System.Object | state | State parameter to pass to the callback. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
SaveGraphAsync(IGraph, CancellationToken)
Saves a Graph to the Store asynchronously.
Declaration
public override Task SaveGraphAsync(IGraph g, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to save. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
SaveGraphAsync(IGraph, AsyncStorageCallback, object)
Saves a Graph to the Store asynchronously.
Declaration
protected virtual void SaveGraphAsync(IGraph g, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to save. |
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
SerializeConfiguration(ConfigurationSerializationContext)
Serializes the connection's configuration.
Declaration
public virtual void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationSerializationContext | context | Configuration Serialization Context. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
ToString()
Gets a String which gives details of the Connection.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
UpdateGraph(string, IEnumerable<Triple>, IEnumerable<Triple>, AsyncStorageCallback, object)
Updates a Graph in the Store asynchronously.
Declaration
public override void UpdateGraph(string graphUri, IEnumerable<Triple> additions, IEnumerable<Triple> removals, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
string | graphUri | URI of the Graph to update. |
System.Collections.Generic.IEnumerable<T><Triple> | additions | Triples to be added. |
System.Collections.Generic.IEnumerable<T><Triple> | removals | Triples to be removed. |
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Overrides
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
UpdateGraph(string, IEnumerable<Triple>, IEnumerable<Triple>)
Updates a Graph in the Stardog store.
Declaration
public virtual void UpdateGraph(string graphUri, IEnumerable<Triple> additions, IEnumerable<Triple> removals)
Parameters
Type | Name | Description |
---|---|---|
string | graphUri | Uri of the Graph to update. |
System.Collections.Generic.IEnumerable<T><Triple> | additions | Triples to be added. |
System.Collections.Generic.IEnumerable<T><Triple> | removals | Triples to be removed. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
UpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>)
Updates a Graph in the Stardog Store.
Declaration
public virtual 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<T><Triple> | additions | Triples to be added. |
System.Collections.Generic.IEnumerable<T><Triple> | removals | Triples to be removed. |
Remarks
Removals happen before additions.
UpdateGraph(IRefNode, IEnumerable<Triple>, IEnumerable<Triple>)
Updates a Graph in the Store.
Declaration
public void UpdateGraph(IRefNode graphName, IEnumerable<Triple> additions, IEnumerable<Triple> removals)
Parameters
Type | Name | Description |
---|---|---|
IRefNode | graphName | Name of the Graph to update. |
System.Collections.Generic.IEnumerable<T><Triple> | additions | Triples to add to the Graph. |
System.Collections.Generic.IEnumerable<T><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 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. |
UpdateGraphAsync(string, bool, string, IEnumerable<Triple>, IEnumerable<Triple>, CancellationToken)
Update a graph asynchronously within the context of a transaction.
Declaration
protected virtual Task UpdateGraphAsync(string transactionId, bool autoCommit, string graphUri, IEnumerable<Triple> additions, IEnumerable<Triple> removals, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | transactionId | The transaction to use. |
System.Boolean | autoCommit | Whether to automatically commit/rollback the transaction. |
string | graphUri | The name of the graph to be updated. |
System.Collections.Generic.IEnumerable<T><Triple> | additions | The triples to add to the graph. |
System.Collections.Generic.IEnumerable<T><Triple> | removals | The triples to remove from the graph. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
Exceptions
Type | Condition |
---|---|
RdfStorageException |
UpdateGraphAsync(string, bool, string, IEnumerable<Triple>, IEnumerable<Triple>, AsyncStorageCallback, object)
Apply an update to a graph as part of a transaction.
Declaration
protected virtual void UpdateGraphAsync(string tID, bool autoCommit, string graphUri, IEnumerable<Triple> additions, IEnumerable<Triple> removals, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
string | tID | The ID of the open transaction to use. |
System.Boolean | autoCommit | True to commit the transaction at the end of the update, false otherwise. |
string | graphUri | The URI of the graph to be updated. |
System.Collections.Generic.IEnumerable<T><Triple> | additions | The triples to inser. |
System.Collections.Generic.IEnumerable<T><Triple> | removals | The triples to remove. |
AsyncStorageCallback | callback | A callback to be invoked on completion. |
System.Object | state | Additional state to pass to the callback. |
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
UpdateGraphAsync(string, IEnumerable<Triple>, IEnumerable<Triple>, CancellationToken)
Updates a graph in the store asynchronously.
Declaration
public override Task UpdateGraphAsync(string graphUri, IEnumerable<Triple> additions, IEnumerable<Triple> removals, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | graphUri | |
System.Collections.Generic.IEnumerable<T><Triple> | additions | Triples to be added. |
System.Collections.Generic.IEnumerable<T><Triple> | removals | Triples to be removed. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Overrides
Remarks
Has full support for Stardog Transactions, connection is in auto-commit mode by default i.e. all write operations (Delete/Save/Update) will create and use a dedicated transaction for their operation, if the operation fails the transaction will automatically be rolled back. You can manage Transactions using the Begin(), Commit() and Rollback() methods.
The connector maintains a single transaction which is shared across all threads since Stardog is currently provides only MRSW (Multiple Reader Single Writer) concurrency and does not permit multiple transactions to occur simultaneously.
UpdateGraphAsync(string, IEnumerable<Triple>, IEnumerable<Triple>, AsyncStorageCallback, object)
Apply an update to a graph.
Declaration
protected virtual void UpdateGraphAsync(string graphUri, IEnumerable<Triple> additions, IEnumerable<Triple> removals, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
string | graphUri | The URI of the graph to be updated. |
System.Collections.Generic.IEnumerable<T><Triple> | additions | The triples to insert. |
System.Collections.Generic.IEnumerable<T><Triple> | removals | The triples to delete. |
AsyncStorageCallback | callback | Callback invoked on completion. |
System.Object | state | Additional state passed to the callback. |
Remarks
If a transaction is currently in progress, the update is applied as part of that transaction. Otherwise a new transaction is started and committed by this method.