Class BaseSesameHttpProtocolConnector
Abstract Base Class for connecting to any Store that supports the Sesame 2.0 HTTP Communication protocol.
Inheritance
System.Object
BaseSesameHttpProtocolConnector
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)
Namespace: VDS.RDF.Storage
Assembly: dotNetRDF.dll
Syntax
public abstract class BaseSesameHttpProtocolConnector : BaseAsyncHttpConnector, IAsyncQueryableStorage, IAsyncStorageProvider, IConfigurationSerializable, IQueryableStorage, IStorageProvider, IStorageCapabilities, IDisposable
Remarks
See here for the protocol specification, this base class supports Version 5 of the protocol which does not include SPARQL Update support.
Constructors
| Improve this Doc View SourceBaseSesameHttpProtocolConnector(String, String)
Creates a new connection to a Sesame HTTP Protocol supporting Store.
Declaration
public BaseSesameHttpProtocolConnector(string baseUri, string storeID)
Parameters
Type | Name | Description |
---|---|---|
System.String | baseUri | Base Uri of the Store. |
System.String | storeID | Store ID. |
BaseSesameHttpProtocolConnector(String, String, IWebProxy)
Creates a new connection to a Sesame HTTP Protocol supporting Store.
Declaration
public BaseSesameHttpProtocolConnector(string baseUri, string storeID, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
System.String | baseUri | Base Uri of the Store. |
System.String | storeID | Store ID. |
System.Net.IWebProxy | proxy | Proxy Server. |
BaseSesameHttpProtocolConnector(String, String, String, String)
Creates a new connection to a Sesame HTTP Protocol supporting Store.
Declaration
public BaseSesameHttpProtocolConnector(string baseUri, string storeID, string username, string password)
Parameters
Type | Name | Description |
---|---|---|
System.String | baseUri | Base Uri of the Store. |
System.String | storeID | Store ID. |
System.String | username | Username to use for requests that require authentication. |
System.String | password | Password to use for requests that require authentication. |
BaseSesameHttpProtocolConnector(String, String, String, String, IWebProxy)
Creates a new connection to a Sesame HTTP Protocol supporting Store.
Declaration
public BaseSesameHttpProtocolConnector(string baseUri, string storeID, string username, string password, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
System.String | baseUri | Base Uri of the Store. |
System.String | storeID | Store ID. |
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 Store.
Declaration
protected string _baseUri
Field Value
Type | Description |
---|---|
System.String |
_fullContextEncoding
Whether to do full encoding of contexts.
Declaration
protected bool _fullContextEncoding
Field Value
Type | Description |
---|---|
System.Boolean |
_postAllQueries
Whether queries should always be posted.
Declaration
[Obsolete("This parameter is no longer used internally and will be removed in the future, all queries are now POSTed regardless of this setting")]
protected bool _postAllQueries
Field Value
Type | Description |
---|---|
System.Boolean |
_queryPath
Query Path Prefix.
Declaration
protected string _queryPath
Field Value
Type | Description |
---|---|
System.String |
_repositoriesPrefix
Repositories Prefix.
Declaration
protected string _repositoriesPrefix
Field Value
Type | Description |
---|---|
System.String |
_server
Server the store is hosted on.
Declaration
protected SesameServer _server
Field Value
Type | Description |
---|---|
SesameServer |
_store
Store ID.
Declaration
protected string _store
Field Value
Type | Description |
---|---|
System.String |
_updatePath
Update Path Prefix.
Declaration
protected string _updatePath
Field Value
Type | Description |
---|---|
System.String |
Properties
| Improve this Doc View SourceAsyncParentServer
Gets the parent server.
Declaration
public override IAsyncStorageServer AsyncParentServer { get; }
Property Value
Type | Description |
---|---|
IAsyncStorageServer |
Overrides
| Improve this Doc View SourceBaseUri
Gets the Base URI to the repository.
Declaration
public string BaseUri { get; }
Property Value
Type | Description |
---|---|
System.String |
DeleteSupported
Returns that deleting graphs from the Sesame store is supported.
Declaration
public override bool DeleteSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceIOBehaviour
Gets the Save Behaviour of Stores that use the Sesame HTTP Protocol.
Declaration
public override IOBehaviour IOBehaviour { get; }
Property Value
Type | Description |
---|---|
IOBehaviour |
Overrides
| Improve this Doc View SourceIsReadOnly
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 SourceIsReady
Returns that the Connection is ready.
Declaration
public override bool IsReady { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceListGraphsSupported
Returns that listing Graphs is supported.
Declaration
public override bool ListGraphsSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceParentServer
Gets the parent server.
Declaration
public override IStorageServer ParentServer { get; }
Property Value
Type | Description |
---|---|
IStorageServer |
Overrides
| Improve this Doc View SourceRepositoryName
Gets the Repository Name that is in use.
Declaration
public string RepositoryName { get; }
Property Value
Type | Description |
---|---|
System.String |
UpdateSupported
Returns that Updates are supported on Sesame HTTP Protocol supporting Stores.
Declaration
public override bool UpdateSupported { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Methods
| Improve this Doc View SourceCreateRdfWriter()
Creates an RDF Writer to use for saving data to the store.
Declaration
protected virtual IRdfWriter CreateRdfWriter()
Returns
Type | Description |
---|---|
IRdfWriter |
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> 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 |
DeleteGraph(String)
Deletes a Graph from the Sesame store.
Declaration
public virtual void DeleteGraph(string graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.String | graphUri | URI of the Graph to delete. |
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 SourceDeleteGraph(Uri)
Deletes a Graph from the Sesame store.
Declaration
public virtual void DeleteGraph(Uri graphUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | graphUri | URI of the Graph to delete. |
Dispose()
Disposes of the Connector.
Declaration
public override void Dispose()
Overrides
| Improve this Doc View SourceEscapeQuery(String)
Escapes a Query to avoid a character encoding issue when communicating a query to Sesame.
Declaration
protected virtual string EscapeQuery(string query)
Parameters
Type | Name | Description |
---|---|---|
System.String | query | Query. |
Returns
Type | Description |
---|---|
System.String |
GetSaveContentType()
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 virtual string GetSaveContentType()
Returns
Type | Description |
---|---|
System.String |
ListGraphs()
Gets the list of Graphs in the Sesame store.
Declaration
public virtual IEnumerable<Uri> ListGraphs()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Uri> |
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. |
Remarks
If a Null/Empty Uri is specified then the default graph (statements with no context in Sesame parlance) will be loaded.
|
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. |
Remarks
If a Null Uri is specified then the default graph (statements with no context in Sesame parlance) will be loaded.
|
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
If a Null/Empty Uri is specified then the default graph (statements with no context in Sesame parlance) will be loaded.
|
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 SourceLoadGraph(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
If a Null Uri is specified then the default graph (statements with no context in Sesame parlance) will be loaded.
|
Improve this Doc
View Source
Query(String)
Makes a SPARQL Query against the underlying Store.
Declaration
public virtual object Query(string sparqlQuery)
Parameters
Type | Name | Description |
---|---|---|
System.String | sparqlQuery | SPARQL Query. |
Returns
Type | Description |
---|---|
System.Object |
Query(String, AsyncStorageCallback, Object)
Makes a SPARQL Query against the underlying store.
Declaration
public void Query(string sparqlQuery, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
System.String | sparqlQuery | SPARQL Query. |
AsyncStorageCallback | callback | Callback. |
System.Object | state | State to pass to the callback. |
Query(IRdfHandler, ISparqlResultsHandler, String)
Makes a SPARQL Query against the underlying Store processing the results with an appropriate handler from those provided.
Declaration
public virtual void Query(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string sparqlQuery)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | rdfHandler | RDF Handler. |
ISparqlResultsHandler | resultsHandler | Results Handler. |
System.String | sparqlQuery | SPARQL Query. |
Query(IRdfHandler, ISparqlResultsHandler, String, AsyncStorageCallback, Object)
Makes a SPARQL Query against the underlying store processing the resulting Graph/Result Set with a handler of your choice.
Declaration
public void Query(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string sparqlQuery, AsyncStorageCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
IRdfHandler | rdfHandler | RDF Handler. |
ISparqlResultsHandler | resultsHandler | SPARQL Results Handler. |
System.String | sparqlQuery | SPARQL Query. |
AsyncStorageCallback | callback | Callbakc. |
System.Object | state | State to pass to the callback. |
SaveGraph(IGraph)
Saves a Graph into the Store (Warning: Completely replaces any existing Graph with the same URI unless there is no URI - see remarks for details).
Declaration
public virtual void SaveGraph(IGraph g)
Parameters
Type | Name | Description |
---|---|---|
IGraph | g | Graph to save. |
Remarks
If the Graph has no URI then the contents will be appended to the Store, if the Graph has a URI then existing data associated with that URI will be replaced.
|
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 SourceSerializeConfiguration(ConfigurationSerializationContext)
Serializes the connection's configuration.
Declaration
public virtual void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type | Name | Description |
---|---|---|
ConfigurationSerializationContext | context | Configuration Serialization Context. |
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.
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. |
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 SourceUpdateGraph(Uri, IEnumerable<Triple>, IEnumerable<Triple>)
Updates a Graph.
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. |
Implements
System.IDisposable