Class AllegroGraphConnector
Class for connecting to an AllegroGraph Store.
Inheritance
Implements
Inherited Members
Namespace: VDS.RDF.Storage
Assembly: dotNetRdf.Client.dll
Syntax
public class AllegroGraphConnector : BaseSesameHttpProtocolConnector, IConfigurationSerializable, IAsyncUpdateableStorage, IAsyncQueryableStorage, IAsyncStorageProvider, IUpdateableStorage, IQueryableStorage, IStorageProvider, IStorageCapabilities, IDisposable
Remarks
Connection to AllegroGraph is based on their new HTTP Protocol which is an extension of the Sesame 2.0 HTTP Protocol. The specification for the AllegroGraph protocol can be found. here
If you wish to use a Store which is part of the Root Catalog on an AllegroGraph 4.x and higher server you can either use the constructor overloads that omit the catalogID parameter or pass in null as the value for that parameter.
Constructors
| Edit this page View SourceAllegroGraphConnector(string, string)
Creates a new Connection to an AllegroGraph store in the Root Catalog (AllegroGraph 4.x and higher).
Declaration
public AllegroGraphConnector(string baseUri, string storeID)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri for the Store. |
string | storeID | Store ID. |
AllegroGraphConnector(string, string, IWebProxy)
Creates a new Connection to an AllegroGraph store in the Root Catalog (AllegroGraph 4.x and higher).
Declaration
public AllegroGraphConnector(string baseUri, string storeID, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri for the Store. |
string | storeID | Store ID. |
IWebProxy | proxy | Proxy Server. |
AllegroGraphConnector(string, string, string)
Creates a new Connection to an AllegroGraph store.
Declaration
public AllegroGraphConnector(string baseUri, string catalogID, string storeID)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base URI for the Store. |
string | catalogID | Catalog ID. |
string | storeID | Store ID. |
AllegroGraphConnector(string, string, string, IWebProxy)
Creates a new Connection to an AllegroGraph store.
Declaration
public AllegroGraphConnector(string baseUri, string catalogID, string storeID, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri for the Store. |
string | catalogID | Catalog ID. |
string | storeID | Store ID. |
IWebProxy | proxy | Proxy Server. |
AllegroGraphConnector(string, string, string, string)
Creates a new Connection to an AllegroGraph store in the Root Catalog (AllegroGraph 4.x and higher).
Declaration
public AllegroGraphConnector(string baseUri, string storeID, string username, string password)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri for the Store. |
string | storeID | Store ID. |
string | username | Username for connecting to the Store. |
string | password | Password for connecting to the Store. |
AllegroGraphConnector(string, string, string, string, IWebProxy)
Creates a new Connection to an AllegroGraph store in the Root Catalog (AllegroGraph 4.x and higher).
Declaration
public AllegroGraphConnector(string baseUri, string storeID, string username, string password, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri for the Store. |
string | storeID | Store ID. |
string | username | Username for connecting to the Store. |
string | password | Password for connecting to the Store. |
IWebProxy | proxy | Proxy Server. |
AllegroGraphConnector(string, string, string, string, string)
Creates a new Connection to an AllegroGraph store.
Declaration
public AllegroGraphConnector(string baseUri, string catalogID, string storeID, string username, string password)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri for the Store. |
string | catalogID | Catalog ID. |
string | storeID | Store ID. |
string | username | Username for connecting to the Store. |
string | password | Password for connecting to the Store. |
AllegroGraphConnector(string, string, string, string, string, IWebProxy)
Creates a new Connection to an AllegroGraph store.
Declaration
public AllegroGraphConnector(string baseUri, string catalogID, string storeID, string username, string password, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri for the Store. |
string | catalogID | Catalog ID. |
string | storeID | Store ID. |
string | username | Username for connecting to the Store. |
string | password | Password for connecting to the Store. |
IWebProxy | proxy | Proxy Server. |
Properties
| Edit this page View SourceCatalog
Gets the Catalog under which the repository you are connected to is located.
Declaration
public string Catalog { get; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceCreateRequest(string, string, HttpMethod, Dictionary<string, string>)
Helper method for creating HTTP Requests to the Store.
Declaration
protected override HttpRequestMessage CreateRequest(string servicePath, string accept, HttpMethod method, Dictionary<string, string> queryParams)
Parameters
Type | Name | Description |
---|---|---|
string | servicePath | Path to the Service requested. |
string | accept | Acceptable Content Types. |
HttpMethod | method | HTTP Method. |
Dictionary<string, string> | queryParams | Querystring Parameters. |
Returns
Type | Description |
---|---|
HttpRequestMessage |
Overrides
| Edit this page View SourceCreateRequest(string, string, string, Dictionary<string, string>)
Helper method for creating HTTP Requests to the Store.
Declaration
[Obsolete("This method is obsolete and will be removed in a future release. Use CreateRequest(string, string, HttpMethod, Dictionary<string, string>) instead.")]
protected override HttpWebRequest CreateRequest(string servicePath, string accept, string method, Dictionary<string, string> queryParams)
Parameters
Type | Name | Description |
---|---|---|
string | servicePath | Path to the Service requested. |
string | accept | Acceptable Content Types. |
string | method | HTTP Method. |
Dictionary<string, string> | queryParams | Querystring Parameters. |
Returns
Type | Description |
---|---|
HttpWebRequest |
Overrides
| Edit this page View SourceEscapeQuery(string)
Does nothing as AllegroGraph does not require the same query escaping that Sesame does.
Declaration
protected override string EscapeQuery(string query)
Parameters
Type | Name | Description |
---|---|---|
string | query | Query to escape. |
Returns
Type | Description |
---|---|
string |
Overrides
| Edit this page View SourceGetSaveContentType()
Gets the Content Type used to save data to the store i.e. the MIME type to use for the Content-Type header.
Declaration
protected override string GetSaveContentType()
Returns
Type | Description |
---|---|
string |
Overrides
| Edit this page View SourceSerializeConfiguration(ConfigurationSerializationContext)
Serializes the connection's configuration.
Declaration
public override void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationSerializationContext | context | Configuration Serialization Context. |
Overrides
| Edit this page View SourceToString()
Gets a String which gives details of the Connection.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
| Edit this page View SourceUpdate(string)
Makes a SPARQL Update request to the Allegro Graph server.
Declaration
public virtual void Update(string sparqlUpdate)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlUpdate | SPARQL Update. |
Update(string, AsyncStorageCallback, object)
Makes a SPARQL Update request to the Allegro Graph server.
Declaration
public virtual void Update(string sparqlUpdate, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlUpdate | SPARQL Update. |
AsyncStorageCallback | callback | Callback. |
object | state | State to pass to the callback. |
UpdateAsync(string, CancellationToken)
Updates the store asynchronously.
Declaration
public virtual Task UpdateAsync(string sparqlUpdate, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | sparqlUpdate | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |