Class BaseStardogServer
Abstract implementation of a management connection to a Stardog server using the HTTP protocol.
Inherited Members
Namespace: VDS.RDF.Storage.Management
Assembly: dotNetRdf.dll
Syntax
public abstract class BaseStardogServer : BaseHttpConnector, IAsyncStorageServer, IConfigurationSerializable, IStorageServer, IDisposable
Constructors
| Edit this page View SourceBaseStardogServer(string)
Creates a new connection to a Stardog Server.
Declaration
protected BaseStardogServer(string baseUri)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri of the Server. |
BaseStardogServer(string, HttpClientHandler)
Creates a new connection to a Starddog server.
Declaration
protected BaseStardogServer(string baseUri, HttpClientHandler httpClientHandler)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | |
HttpClientHandler | httpClientHandler |
BaseStardogServer(string, IWebProxy)
Creates a new connection to a Stardog Server.
Declaration
protected BaseStardogServer(string baseUri, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri of the Server. |
IWebProxy | proxy | Proxy Server. |
BaseStardogServer(string, string, string)
Creates a new connection to a Stardog Server.
Declaration
protected BaseStardogServer(string baseUri, string username, string password)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri of the Server. |
string | username | Username. |
string | password | Password. |
BaseStardogServer(string, string, string, IWebProxy)
Creates a new connection to a Stardog Server.
Declaration
protected BaseStardogServer(string baseUri, string username, string password, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri of the Server. |
string | username | Username. |
string | password | Password. |
IWebProxy | proxy | Proxy Server. |
Fields
| Edit this page View Source_adminUri
The URI of the admin API.
Declaration
protected readonly string _adminUri
Field Value
Type | Description |
---|---|
string |
_baseUri
The base URI of the Stardog server.
Declaration
protected readonly string _baseUri
Field Value
Type | Description |
---|---|
string |
Properties
| Edit this page View SourceHasCredentials
True if a user name and password are specified, false otherwise.
Declaration
protected bool HasCredentials { get; }
Property Value
Type | Description |
---|---|
bool |
IOBehaviour
Gets the IO Behaviour of the server.
Declaration
public virtual IOBehaviour IOBehaviour { get; }
Property Value
Type | Description |
---|---|
IOBehaviour |
Methods
| Edit this page View SourceCreateAdminRequest(string, string, HttpMethod, Dictionary<string, string>)
Create a request to the Stardog server's Admin API.
Declaration
protected virtual HttpRequestMessage CreateAdminRequest(string servicePath, string accept, HttpMethod method, Dictionary<string, string> requestParams)
Parameters
Type | Name | Description |
---|---|---|
string | servicePath | The admin API service path. |
string | accept | Accept header content. |
HttpMethod | method | HTTP method to use. |
Dictionary<string, string> | requestParams | Additional request parameters. |
Returns
Type | Description |
---|---|
HttpRequestMessage |
CreateAdminRequest(string, string, string, Dictionary<string, string>)
Create a request to the Stardog server's Admin API.
Declaration
[Obsolete("This method is obsolete and will be removed in a future release.")]
protected virtual HttpWebRequest CreateAdminRequest(string servicePath, string accept, string method, Dictionary<string, string> requestParams)
Parameters
Type | Name | Description |
---|---|---|
string | servicePath | The admin API service path. |
string | accept | Accept header content. |
string | method | HTTP method to use. |
Dictionary<string, string> | requestParams | Additional request parameters. |
Returns
Type | Description |
---|---|
HttpWebRequest |
CreateStore(IStoreTemplate)
Creates a new Store based off the given template.
Declaration
public virtual bool CreateStore(IStoreTemplate template)
Parameters
Type | Name | Description |
---|---|---|
IStoreTemplate | template | Template. |
Returns
Type | Description |
---|---|
bool |
Remarks
Templates must inherit from BaseStardogTemplate.
Uses some code based off on answers here to help do the multipart form data request.
CreateStore(IStoreTemplate, AsyncStorageCallback, object)
Creates a new store based on the given template.
Declaration
public virtual void CreateStore(IStoreTemplate template, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
IStoreTemplate | template | Template. |
AsyncStorageCallback | callback | Callback. |
object | state | State to pass to the callback. |
Remarks
Template must inherit from BaseStardogTemplate.
CreateStoreAsync(IStoreTemplate, CancellationToken)
Creates a store asynchronously.
Declaration
public virtual Task<string> CreateStoreAsync(IStoreTemplate template, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IStoreTemplate | template | Template for the store to be created. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<string> |
DeleteStore(string)
Deletes a Store with the given ID.
Declaration
public virtual void DeleteStore(string storeId)
Parameters
Type | Name | Description |
---|---|---|
string | storeId | Store ID. |
DeleteStore(string, AsyncStorageCallback, object)
Deletes a database from the server.
Declaration
public virtual void DeleteStore(string storeId, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
string | storeId | Store ID. |
AsyncStorageCallback | callback | Callback. |
object | state | State to pass to the callback. |
DeleteStoreAsync(string, CancellationToken)
Deletes a store asynchronously.
Declaration
public Task DeleteStoreAsync(string storeId, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | storeId | ID of the store to delete. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |
GetAvailableTemplates(string)
Gets all available templates for creating a new Store.
Declaration
public virtual IEnumerable<IStoreTemplate> GetAvailableTemplates(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id | Store ID. |
Returns
Type | Description |
---|---|
IEnumerable<IStoreTemplate> |
GetAvailableTemplates(string, AsyncStorageCallback, object)
Gets all available templates for creating a new Store.
Declaration
public virtual void GetAvailableTemplates(string id, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
string | id | Store ID. |
AsyncStorageCallback | callback | Callback. |
object | state | State to pass to the callback. |
GetAvailableTemplatesAsync(string, CancellationToken)
Gets all available templates for creating a store with the given ID.
Declaration
public virtual Task<IEnumerable<IStoreTemplate>> GetAvailableTemplatesAsync(string id, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | id | The store ID. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<IEnumerable<IStoreTemplate>> |
GetDefaultTemplate(string)
Gets a default template for creating a new Store.
Declaration
public virtual IStoreTemplate GetDefaultTemplate(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id | Store ID. |
Returns
Type | Description |
---|---|
IStoreTemplate |
GetDefaultTemplate(string, AsyncStorageCallback, object)
Gets a default template for creating a new Store.
Declaration
public virtual void GetDefaultTemplate(string id, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
string | id | Store ID. |
AsyncStorageCallback | callback | Callback. |
object | state | State to pass to the callback. |
GetDefaultTemplateAsync(string, CancellationToken)
Gets a default template for creating a store with the given ID.
Declaration
public virtual Task<IStoreTemplate> GetDefaultTemplateAsync(string id, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | id | The store ID. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<IStoreTemplate> |
GetStore(string)
Gets a provider for the Store with the given ID.
Declaration
public abstract IStorageProvider GetStore(string storeId)
Parameters
Type | Name | Description |
---|---|---|
string | storeId | Store ID. |
Returns
Type | Description |
---|---|
IStorageProvider |
GetStore(string, AsyncStorageCallback, object)
Gets a database from the server.
Declaration
public abstract void GetStore(string storeId, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
string | storeId | Store ID. |
AsyncStorageCallback | callback | Callback. |
object | state | State to pass to the callback. |
GetStoreAsync(string, CancellationToken)
Gets a store asynchronously.
Declaration
public abstract Task<IAsyncStorageProvider> GetStoreAsync(string storeId, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | storeId | Store ID. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<IAsyncStorageProvider> |
ListStores()
Lists the database available on the server.
Declaration
public virtual IEnumerable<string> ListStores()
Returns
Type | Description |
---|---|
IEnumerable<string> |
ListStores(AsyncStorageCallback, object)
Lists all databases available on the server.
Declaration
public virtual void ListStores(AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
AsyncStorageCallback | callback | Callback. |
object | state | State to pass to the callback. |
ListStoresAsync(CancellationToken)
Lists the available stores asynchronously.
Declaration
public Task<IEnumerable<string>> ListStoresAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<IEnumerable<string>> |
SerializeConfiguration(ConfigurationSerializationContext)
Serializes the connection's configuration.
Declaration
public virtual void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationSerializationContext | context | Configuration Serialization Context. |