Class BaseSparqlServer
Abstract Base class for SPARQL Servers which provide combined SPARQL Query, Update and Graph Store HTTP Protocol endpoints
Namespace: VDS.RDF.Web
Assembly: dotNetRDF.Web.dll
Syntax
public abstract class BaseSparqlServer : IHttpHandler
Fields
| Improve this Doc View Source_config
Handler Configuration
Declaration
protected BaseSparqlServerConfiguration _config
Field Value
| Type | Description |
|---|---|
| BaseSparqlServerConfiguration |
Properties
| Improve this Doc View SourceIsReusable
Returns that the Handler is reusable
Declaration
public bool IsReusable { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Methods
| Improve this Doc View SourceHandleQueryErrors(HttpContext, String, String, Exception)
Handles errors in processing SPARQL Query Requests
Declaration
protected virtual void HandleQueryErrors(HttpContext context, String title, String query, Exception ex)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | context | Context of the HTTP Request |
| String | title | Error title |
| String | query | Sparql Query |
| Exception | ex | Error |
HandleQueryErrors(HttpContext, String, String, Exception, Int32)
Handles errors in processing SPARQL Query Requests
Declaration
protected virtual void HandleQueryErrors(HttpContext context, String title, String query, Exception ex, int statusCode)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | context | Context of the HTTP Request |
| String | title | Error title |
| String | query | Sparql Query |
| Exception | ex | Error |
| System.Int32 | statusCode | HTTP Status Code to return |
HandleUpdateErrors(HttpContext, String, String, Exception)
Handles errors in processing SPARQL Update Requests
Declaration
protected virtual void HandleUpdateErrors(HttpContext context, String title, String update, Exception ex)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | context | Context of the HTTP Request |
| String | title | Error title |
| String | update | SPARQL Update |
| Exception | ex | Error |
HandleUpdateErrors(HttpContext, String, String, Exception, Int32)
Handles errors in processing SPARQL Update Requests
Declaration
protected virtual void HandleUpdateErrors(HttpContext context, String title, String update, Exception ex, int statusCode)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | context | Context of the HTTP Request |
| String | title | Error title |
| String | update | SPARQL Update |
| Exception | ex | Error |
| System.Int32 | statusCode | HTTP Status Code |
LoadConfig(HttpContext, out String)
Loads the Handler Configuration
Declaration
protected abstract BaseSparqlServerConfiguration LoadConfig(HttpContext context, out String basePath)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | context | HTTP Context |
| String | basePath | Base Path of the Handler |
Returns
| Type | Description |
|---|---|
| BaseSparqlServerConfiguration |
ProcessDescriptionRequest(HttpContext)
Processes Service Description requests
Declaration
public void ProcessDescriptionRequest(HttpContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | context | HTTP Context |
ProcessProtocolRequest(HttpContext)
Processes Protocol requests
Declaration
public void ProcessProtocolRequest(HttpContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | context | HTTP Context |
ProcessQuery(SparqlQuery)
Processes SPARQL Queries
Declaration
protected virtual Object ProcessQuery(SparqlQuery query)
Parameters
| Type | Name | Description |
|---|---|---|
| SparqlQuery | query | Query |
Returns
| Type | Description |
|---|---|
| Object |
Remarks
Implementations should override this method if their behaviour requires more than just invoking the configured Query processor
ProcessQueryRequest(HttpContext)
Processes Query requests
Declaration
public void ProcessQueryRequest(HttpContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | context | HTTP Context |
ProcessQueryResults(HttpContext, Object)
Internal Helper function which returns the Results back to the Client in one of their accepted formats
Declaration
protected virtual void ProcessQueryResults(HttpContext context, Object result)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | context | Context of the HTTP Request |
| Object | result | Results of the Sparql Query |
Remarks
Implementations should override this if they want to control how results are sent to the client rather than using the default behaviour provided by
ProcessRequest(HttpContext)
Processes requests
Declaration
public void ProcessRequest(HttpContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | context | HTTP Context |
ProcessUpdateRequest(HttpContext)
Processes Update requests
Declaration
public void ProcessUpdateRequest(HttpContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | context | HTTP Context |
ProcessUpdates(SparqlUpdateCommandSet)
Processes SPARQL Updates
Declaration
protected virtual void ProcessUpdates(SparqlUpdateCommandSet cmds)
Parameters
| Type | Name | Description |
|---|---|---|
| SparqlUpdateCommandSet | cmds | Update Command Set |
Remarks
Implementations should override this method if their behaviour requires more than just invoking the configured Update processor
ShowQueryForm(HttpContext)
Generates a SPARQL Query Form
Declaration
protected virtual void ShowQueryForm(HttpContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | context | HTTP Context |
ShowUpdateForm(HttpContext)
Generates a SPARQL Update Form
Declaration
protected virtual void ShowUpdateForm(HttpContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | context | HTTP Context |
UpdateConfig(HttpContext)
Updates the Handler Configuration
Declaration
protected virtual void UpdateConfig(HttpContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContext | context | HTTP Context |