Class SesameServer
Represents a connection to a Sesame Server.
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)
System.Object.ToString()
Namespace: VDS.RDF.Storage.Management
Assembly: dotNetRDF.dll
Syntax
public class SesameServer : BaseHttpConnector, IAsyncStorageServer, IConfigurationSerializable, IStorageServer, IDisposable
Constructors
| Improve this Doc View SourceSesameServer(String)
Creates a new connection to a Sesame HTTP Protocol supporting Store.
Declaration
public SesameServer(string baseUri)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | baseUri | Base Uri of the Store. |
SesameServer(String, IWebProxy)
Creates a new connection to a Sesame HTTP Protocol supporting Store.
Declaration
public SesameServer(string baseUri, IWebProxy proxy)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | baseUri | Base Uri of the Store. |
| System.Net.IWebProxy | proxy | Proxy Server. |
SesameServer(String, String, String)
Creates a new connection to a Sesame HTTP Protocol supporting Store.
Declaration
public SesameServer(string baseUri, string username, string password)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | baseUri | Base Uri of the Store. |
| System.String | username | Username to use for requests that require authentication. |
| System.String | password | Password to use for requests that require authentication. |
SesameServer(String, String, String, IWebProxy)
Creates a new connection to a Sesame HTTP Protocol supporting Store.
Declaration
public SesameServer(string baseUri, string username, string password, IWebProxy proxy)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | baseUri | Base Uri of the Store. |
| System.String | username | Username to use for requests that require authentication. |
| System.String | password | Password to use for requests that require authentication. |
| System.Net.IWebProxy | proxy | Proxy Server. |
Fields
| Improve this Doc View Source_baseUri
Base Uri for the Server.
Declaration
protected string _baseUri
Field Value
| Type | Description |
|---|---|
| System.String |
_hasCredentials
Whether the User has provided credentials for accessing the Server using authentication.
Declaration
protected bool _hasCredentials
Field Value
| Type | Description |
|---|---|
| System.Boolean |
_pwd
Password for accessing the Server.
Declaration
protected string _pwd
Field Value
| Type | Description |
|---|---|
| System.String |
_repositoriesPrefix
Repositories Prefix.
Declaration
protected string _repositoriesPrefix
Field Value
| Type | Description |
|---|---|
| System.String |
_username
Username for accessing the Server.
Declaration
protected string _username
Field Value
| Type | Description |
|---|---|
| System.String |
SystemRepositoryID
System Repository ID.
Declaration
public const string SystemRepositoryID = "SYSTEM"
Field Value
| Type | Description |
|---|---|
| System.String |
TemplateTypes
Available Sesame template types.
Declaration
protected List<Type> TemplateTypes
Field Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.Type> |
Properties
| Improve this Doc View SourceIOBehaviour
Gets the IO Behaviour of the server.
Declaration
public IOBehaviour IOBehaviour { get; }
Property Value
| Type | Description |
|---|---|
| IOBehaviour |
Methods
| Improve this Doc View SourceCreateRequest(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> queryParams)
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> | queryParams | Querystring Parameters. |
Returns
| Type | Description |
|---|---|
| System.Net.HttpWebRequest |
CreateStore(IStoreTemplate)
Creates a new Store based on 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 BaseSesameTemplate.
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 BaseSesameTemplate.
DeleteStore(String)
Deletes the Store with the given ID.
Declaration
public virtual void DeleteStore(string storeID)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | storeID | Store ID. |
Remarks
Whether attempting to delete the Store that you are accessing is permissible is up to the implementation.
|
Improve this Doc
View Source
DeleteStore(String, AsyncStorageCallback, Object)
Deletes a store asynchronously.
Declaration
public virtual void DeleteStore(string storeID, AsyncStorageCallback callback, object state)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | storeID | ID of the store to delete. |
| AsyncStorageCallback | callback | Callback. |
| System.Object | state | State to pass to the callback. |
Dispose()
Disposes of the server.
Declaration
public virtual void Dispose()
EnsureSystemConnection()
Ensures the connection to the Sesame SYSTEM repository is prepared if it isn't already.
Declaration
protected virtual void EnsureSystemConnection()
GetAvailableTemplates(String)
Gets all available templates for creating a store.
Declaration
public virtual IEnumerable<IStoreTemplate> GetAvailableTemplates(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | id | Store ID. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<IStoreTemplate> |
GetAvailableTemplates(String, AsyncStorageCallback, Object)
Gets all available templates for creating a store.
Declaration
public virtual void GetAvailableTemplates(string id, AsyncStorageCallback callback, object state)
Parameters
| Type | Name | Description |
|---|---|---|
| System.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 store.
Declaration
public virtual IStoreTemplate GetDefaultTemplate(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | id | Store ID. |
Returns
| Type | Description |
|---|---|
| IStoreTemplate |
GetDefaultTemplate(String, AsyncStorageCallback, Object)
Gets a default template for creating a store.
Declaration
public virtual void GetDefaultTemplate(string id, AsyncStorageCallback callback, object state)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | id | Store ID. |
| AsyncStorageCallback | callback | Callback. |
| System.Object | state | State to pass to the callback. |
GetStore(String)
Gets the Store with the given ID.
Declaration
public virtual IStorageProvider GetStore(string storeID)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | storeID | Store ID. |
Returns
| Type | Description |
|---|---|
| IStorageProvider |
Remarks
If the Store ID requested represents the current instance then it is acceptable for an implementation to return itself. Consumers of this method should be aware of this and if necessary use other means to create a connection to a store if they want a unique instance of the provider.
|
Improve this Doc
View Source
GetStore(String, AsyncStorageCallback, Object)
Gets a store asynchronously.
Declaration
public virtual void GetStore(string storeID, AsyncStorageCallback callback, object state)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | storeID | Store ID. |
| AsyncStorageCallback | callback | Callback. |
| System.Object | state | State to pass to the callback. |
Remarks
If the store ID requested matches the current instance an instance MAY invoke the callback immediately returning a reference to itself.
|
Improve this Doc
View Source
ListStores()
Gets the list of available stores.
Declaration
public virtual IEnumerable<string> ListStores()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<System.String> |
ListStores(AsyncStorageCallback, Object)
Lists the available stores asynchronously.
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. |
SerializeConfiguration(ConfigurationSerializationContext)
Serializes the connection's configuration.
Declaration
public virtual void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| ConfigurationSerializationContext | context | Configuration Serialization Context. |
Implements
System.IDisposable