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
| Improve this Doc View SourceBaseStardogServer(string, HttpClientHandler)
Creates a new connection to a Starddog server.
Declaration
protected BaseStardogServer(string baseUri, HttpClientHandler httpClientHandler)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | |
System.Net.Http.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. |
System.Net.IWebProxy | proxy | Proxy Server. |
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. |
System.Net.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)
Creates a new connection to a Stardog Server.
Declaration
protected BaseStardogServer(string baseUri)
Parameters
Type | Name | Description |
---|---|---|
string | baseUri | Base Uri of the Server. |
Fields
| Improve this Doc 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
| Improve this Doc View SourceHasCredentials
True if a user name and password are specified, false otherwise.
Declaration
protected bool HasCredentials { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IOBehaviour
Gets the IO Behaviour of the server.
Declaration
public virtual IOBehaviour IOBehaviour { get; }
Property Value
Type | Description |
---|---|
IOBehaviour |
Methods
| Improve this Doc 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. |
System.Net.Http.HttpMethod | method | HTTP method to use. |
System.Collections.Generic.Dictionary<TKey, TValue><string, string> | requestParams | Additional request parameters. |
Returns
Type | Description |
---|---|
System.Net.Http.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. |
System.Collections.Generic.Dictionary<TKey, TValue><string, string> | requestParams | Additional request parameters. |
Returns
Type | Description |
---|---|
System.Net.HttpWebRequest |
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. |
System.Object | state | State to pass to the callback. |
Remarks
Template must inherit from BaseStardogTemplate.
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 |
---|---|
System.Boolean |
Remarks
Templates must inherit from BaseStardogTemplate.
Uses some code based off on answers here to help do the multipart form data request.
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. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult><string> |
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. |
System.Object | state | State to pass to the callback. |
DeleteStore(string)
Deletes a Store with the given ID.
Declaration
public virtual void DeleteStore(string storeId)
Parameters
Type | Name | Description |
---|---|---|
string | storeId | Store ID. |
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. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
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. |
System.Object | state | State to pass to the callback. |
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 |
---|---|
System.Collections.Generic.IEnumerable<T><IStoreTemplate> |
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. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult><System.Collections.Generic.IEnumerable<T><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. |
System.Object | state | State to pass to the callback. |
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 |
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. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult><IStoreTemplate> |
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. |
System.Object | state | State to pass to the callback. |
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 |
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. |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult><IAsyncStorageProvider> |
ListStores()
Lists the database available on the server.
Declaration
public virtual IEnumerable<string> ListStores()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><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. |
System.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 |
---|---|---|
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult><System.Collections.Generic.IEnumerable<T><string>> |
SerializeConfiguration(ConfigurationSerializationContext)
Serializes the connection's configuration.
Declaration
public virtual void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationSerializationContext | context | Configuration Serialization Context. |