Class BaseStardogConnector
Abstract implementation of a connector for Stardog that connects using the HTTP protocol.
Inheritance
System.Object
BaseStardogConnector
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: dotNetRDF.dll
Syntax
public abstract class BaseStardogConnector : BaseAsyncHttpConnector, IAsyncQueryableStorage, IAsyncStorageProvider, IAsyncTransactionalStorage, IConfigurationSerializable, IQueryableStorage, ITransactionalStorage, IReasoningQueryableStorage, IStorageProvider, IStorageCapabilities, IDisposable
Constructors
|
Improve this Doc
View Source
BaseStardogConnector(String, String)
Creates a new connection to a Stardog Store.
Declaration
protected BaseStardogConnector(string baseUri, string kbID)
Parameters
Type |
Name |
Description |
System.String |
baseUri |
Base Uri of the Server. |
System.String |
kbID |
Knowledge Base (i.e. Database) ID. |
|
Improve this Doc
View Source
BaseStardogConnector(String, String, IWebProxy)
Creates a new connection to a Stardog Store.
Declaration
protected BaseStardogConnector(string baseUri, string kbID, IWebProxy proxy)
Parameters
Type |
Name |
Description |
System.String |
baseUri |
Base Uri of the Server. |
System.String |
kbID |
Knowledge Base (i.e. Database) ID. |
System.Net.IWebProxy |
proxy |
Proxy Server. |
|
Improve this Doc
View Source
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 |
System.String |
baseUri |
Base Uri of the Server. |
System.String |
kbID |
Knowledge Base (i.e. Database) ID. |
System.String |
username |
Username. |
System.String |
password |
Password. |
|
Improve this Doc
View Source
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 |
System.String |
baseUri |
Base Uri of the Server. |
System.String |
kbID |
Knowledge Base (i.e. Database) ID. |
System.String |
username |
Username. |
System.String |
password |
Password. |
System.Net.IWebProxy |
proxy |
Proxy Server. |
|
Improve this Doc
View Source
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 |
System.String |
baseUri |
Base Uri of the Server. |
System.String |
kbID |
Knowledge Base (i.e. Database) ID. |
StardogReasoningMode |
reasoning |
Reasoning Mode. |
|
Improve this Doc
View Source
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 |
System.String |
baseUri |
Base Uri of the Server. |
System.String |
kbID |
Knowledge Base (i.e. Database) ID. |
StardogReasoningMode |
reasoning |
Reasoning Mode. |
System.Net.IWebProxy |
proxy |
Proxy Server. |
|
Improve this Doc
View Source
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 |
System.String |
baseUri |
Base Uri of the Server. |
System.String |
kbID |
Knowledge Base (i.e. Database) ID. |
StardogReasoningMode |
reasoning |
Reasoning Mode. |
System.String |
username |
Username. |
System.String |
password |
Password. |
|
Improve this Doc
View Source
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 |
System.String |
baseUri |
Base Uri of the Server. |
System.String |
kbID |
Knowledge Base (i.e. Database) ID. |
StardogReasoningMode |
reasoning |
Reasoning Mode. |
System.String |
username |
Username. |
System.String |
password |
Password. |
System.Net.IWebProxy |
proxy |
Proxy Server. |
Fields
|
Improve this Doc
View Source
AnonymousUser
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 |
System.String |
|
|
Improve this Doc
View Source
Server
The underlying server connection.
Declaration
protected BaseStardogServer Server
Field Value
Properties
|
Improve this Doc
View Source
AsyncParentServer
Gets the parent server.
Declaration
public override IAsyncStorageServer AsyncParentServer { get; }
Property Value
Overrides
|
Improve this Doc
View Source
BaseUri
Gets the Base URI of the Stardog server.
Declaration
public string BaseUri { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
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
|
Improve this Doc
View Source
IOBehaviour
Gets the IO Behaviour of Stardog.
Declaration
public override IOBehaviour IOBehaviour { get; }
Property Value
Overrides
|
Improve this Doc
View Source
IsReadOnly
Returns that the Connection is not read-only.
Declaration
public override bool IsReadOnly { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
|
Improve this Doc
View Source
IsReady
Returns that the Connection is ready.
Declaration
public override bool IsReady { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
|
Improve this Doc
View Source
KbId
Gets the knowledge base ID being used by this connector.
Declaration
public string KbId { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ListGraphsSupported
Returns that listing Graphs is supported.
Declaration
public override bool ListGraphsSupported { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
|
Improve this Doc
View Source
ParentServer
Gets the parent server.
Declaration
public override IStorageServer ParentServer { get; }
Property Value
Overrides
|
Improve this Doc
View Source
Reasoning
Gets/Sets the reasoning mode to use for queries.
Declaration
public virtual StardogReasoningMode Reasoning { get; set; }
Property Value
|
Improve this Doc
View Source
UpdateSupported
Returns that Updates are supported on Stardog Stores.
Declaration
public override bool UpdateSupported { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
Methods
|
Improve this Doc
View Source
Adds Stardog specific request headers; reasoning needed for < 2.2.
Declaration
protected virtual void AddStardogHeaders(HttpWebRequest request)
Parameters
Type |
Name |
Description |
System.Net.HttpWebRequest |
request |
|
|
Improve this Doc
View Source
Begin()
Begins a new Transaction.
Declaration
public virtual void Begin()
|
Improve this Doc
View Source
Begin(Boolean)
Begins a new Transaction.
Declaration
public virtual void Begin(bool enableReasoning)
Parameters
Type |
Name |
Description |
System.Boolean |
enableReasoning |
Opens the transaction with reasoning enabled. |
|
Improve this Doc
View Source
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. |
|
Improve this Doc
View Source
BeginTransaction(Boolean)
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 |
System.String |
A transaction ID for the new transaction. |
|
Improve this Doc
View Source
Commit()
Commits the active Transaction.
Declaration
public virtual void Commit()
Exceptions
Type |
Condition |
RdfStorageException |
Thrown if there is not an active Transaction on the current Thread. |
|
Improve this Doc
View Source
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. |
|
Improve this Doc
View Source
CommitTransaction(String)
Commit an open transaction.
Declaration
protected virtual void CommitTransaction(string tID)
Parameters
Type |
Name |
Description |
System.String |
tID |
The ID of the transaction to commit. |
|
Improve this Doc
View Source
CreateRequest(String, String, String, Dictionary<String, String>)
Helper method for creating HTTP Requests to the Store.
Declaration
protected virtual HttpWebRequest CreateRequest(string servicePath, string accept, string method, Dictionary<string, string> requestParams)
Parameters
Type |
Name |
Description |
System.String |
servicePath |
Path to the Service requested. |
System.String |
accept |
Acceptable Content Types. |
System.String |
method |
HTTP Method. |
System.Collections.Generic.Dictionary<System.String, System.String> |
requestParams |
Querystring Parameters. |
Returns
Type |
Description |
System.Net.HttpWebRequest |
|
|
Improve this Doc
View Source
DeleteGraph(String)
Deletes a Graph from the Stardog store.
Declaration
public virtual void DeleteGraph(string graphUri)
Parameters
Type |
Name |
Description |
System.String |
graphUri |
URI of the Graph to delete. |
|
Improve this Doc
View Source
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 |
System.String |
graphUri |
URI of the Graph to delete. |
AsyncStorageCallback |
callback |
Callback. |
System.Object |
state |
State to pass to the callback. |
Overrides
|
Improve this Doc
View Source
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. |
|
Improve this Doc
View Source
DeleteGraphAsync(String, Boolean, 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 |
System.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. |
System.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. |
|
Improve this Doc
View Source
Dispose()
Disposes of the Connector.
Declaration
public override void Dispose()
Overrides
|
Improve this Doc
View Source
GetReasoningParameter()
Get the query parameter string that specifies the current reasoning mode.
Declaration
protected virtual string GetReasoningParameter()
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
ListGraphs()
Gets the list of Graphs in the Stardog store.
Declaration
public virtual IEnumerable<Uri> ListGraphs()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.Uri> |
|
|
Improve this Doc
View Source
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. |
System.String |
graphUri |
Uri of the Graph to load. |
|
Improve this Doc
View Source
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. |
|
Improve this Doc
View Source
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. |
System.String |
graphUri |
URI of the Graph to load. |
Remarks
|
Improve this Doc
View Source
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. |
System.String |
graphUri |
URI of the Graph to load. |
AsyncStorageCallback |
callback |
Callback. |
System.Object |
state |
State to pass to the callback. |
Overrides
|
Improve this Doc
View Source
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
|
Improve this Doc
View Source
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 |
System.String |
sparqlQuery |
Sparql Query. |
Returns
Type |
Description |
System.Object |
|
|
Improve this Doc
View Source
Query(String, Boolean)
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 |
System.String |
sparqlQuery |
Sparql Query. |
System.Boolean |
reasoning |
|
Returns
Type |
Description |
System.Object |
|
|
Improve this Doc
View Source
Query(String, AsyncStorageCallback, Object)
Queries the store asynchronously.
Declaration
public virtual void Query(string query, AsyncStorageCallback callback, object state)
Parameters
Type |
Name |
Description |
System.String |
query |
SPARQL Query. |
AsyncStorageCallback |
callback |
Callback. |
System.Object |
state |
State to pass to the callback. |
|
Improve this Doc
View Source
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
|
Improve this Doc
View Source
Query(IRdfHandler, ISparqlResultsHandler, String, Boolean)
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. |
System.String |
sparqlQuery |
SPARQL Query. |
System.Boolean |
reasoning |
|
|
Improve this Doc
View Source
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
|
Improve this Doc
View Source
Rollback()
Rolls back the active Transaction.
Declaration
public virtual void Rollback()
Exceptions
Type |
Condition |
RdfStorageException |
Thrown if there is not an active Transaction on the current Thread. |
|
Improve this Doc
View Source
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. |
|
Improve this Doc
View Source
RollbackTransaction(String)
Rollback an open transaction.
Declaration
protected virtual void RollbackTransaction(string tID)
Parameters
Type |
Name |
Description |
System.String |
tID |
The ID of the transaction to rollback. |
|
Improve this Doc
View Source
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. |
|
Improve this Doc
View Source
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
|
Improve this Doc
View Source
SaveGraphAsync(String, Boolean, 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 |
System.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. |
|
Improve this Doc
View Source
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. |
|
Improve this Doc
View Source
SerializeConfiguration(ConfigurationSerializationContext)
Serializes the connection's configuration.
Declaration
public virtual void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
|
Improve this Doc
View Source
ToString()
Gets a String which gives details of the Connection.
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
|
Improve this Doc
View Source
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 |
System.String |
graphUri |
Uri of the Graph to update. |
System.Collections.Generic.IEnumerable<Triple> |
additions |
Triples to be added. |
System.Collections.Generic.IEnumerable<Triple> |
removals |
Triples to be removed. |
|
Improve this Doc
View Source
UpdateGraph(String, IEnumerable<Triple>, IEnumerable<Triple>, AsyncStorageCallback, Object)
Updates a Graph in the Store asychronously.
Declaration
public override void UpdateGraph(string graphUri, IEnumerable<Triple> additions, IEnumerable<Triple> removals, AsyncStorageCallback callback, object state)
Parameters
Type |
Name |
Description |
System.String |
graphUri |
URI of the Graph to update. |
System.Collections.Generic.IEnumerable<Triple> |
additions |
Triples to be added. |
System.Collections.Generic.IEnumerable<Triple> |
removals |
Triples to be removed. |
AsyncStorageCallback |
callback |
Callback. |
System.Object |
state |
State to pass to the callback. |
Overrides
|
Improve this Doc
View Source
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<Triple> |
additions |
Triples to be added. |
System.Collections.Generic.IEnumerable<Triple> |
removals |
Triples to be removed. |
|
Improve this Doc
View Source
UpdateGraphAsync(String, Boolean, 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 |
System.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. |
System.String |
graphUri |
The URI of the graph to be updated. |
System.Collections.Generic.IEnumerable<Triple> |
additions |
The triples to inser. |
System.Collections.Generic.IEnumerable<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. |
|
Improve this Doc
View Source
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 |
System.String |
graphUri |
The URI of the graph to be updated. |
System.Collections.Generic.IEnumerable<Triple> |
additions |
The triples to insert. |
System.Collections.Generic.IEnumerable<Triple> |
removals |
The triples to delete. |
AsyncStorageCallback |
callback |
Callback invoked on completion. |
System.Object |
state |
Additional state passed to the callback. |
Implements
System.IDisposable
Extension Methods