Class SparqlServer
HTTP Handler for adding SPARQL Servers to ASP.Net applications - SPARQL Servers provide combined Query, Update and Graph Store HTTP Protocol for RDF Graph Management endpoints
Inherited Members
Namespace: VDS.RDF.Web
Assembly: dotNetRDF.Web.dll
Syntax
public class SparqlServer : BaseSparqlServer
Remarks
Used to create a SPARQL Server with a base URI where any URI under this URI is handled by this Server
For example given a Base URI of http://example.org/server/ then the Handler would treat requests to http://example.org/server/query as SPARQL Query requests, requests to http://example.org/server/update as SPARQL Update requests and requests to any other URL covered by this base URL as SPARQL Graph Store HTTP Protocol requests
This Handler is configured using the new Configuration API introduced in the 0.3.0 release. This requires just one setting to be defined in the <appSettings> section of your Web.config file which points to a Configuration Graph like so:
<add key="dotNetRDFConfig" value="~/App_Data/config.ttl" />
The Configuration Graph must then contain Triples like the following to specify a Update Endpoint:
<dotnetrdf:/folder/server/*> a dnr:HttpHandler ;
dnr:type "VDS.RDF.Web.SparqlServer" ;
dnr:queryProcessor _:qProc ;
dnr:updateProcessor _:uProc ;
dnr:protocolProcessor _:pProc .
_:qProc a dnr:SparqlQueryProcessor ;
dnr:type "VDS.RDF.Query.LeviathanQueryProcessor" ;
dnr:usingStore _:store .
_:uProc a dnr:SparqlUpdateProcessor ;
dnr:type "VDS.RDF.Update.LeviathanUpdateProcessor" ;
dnr:usingStore _:store .
_:pProc a dnr:SparqlHttpProtocolProcessor ;
dnr:type "VDS.RDF.Update.Protocol.LeviathanProtocolProcessor" ;
dnr:usingStore _:store .
_:store a dnr:TripleStore ;
dnr:type "VDS.RDF.TripleStore" .
Methods
| Improve this Doc View SourceLoadConfig(HttpContext, out String)
Loads the Handler Configuration
Declaration
protected override BaseSparqlServerConfiguration LoadConfig(HttpContext context, out string basePath)
Parameters
Type | Name | Description |
---|---|---|
HttpContext | context | HTTP Context |
System.String | basePath | Base Path for the Server |
Returns
Type | Description |
---|---|
BaseSparqlServerConfiguration |
UpdateConfig(HttpContext)
Updates the Handler Configuration
Declaration
protected override void UpdateConfig(HttpContext context)
Parameters
Type | Name | Description |
---|---|---|
HttpContext | context | HTTP Context |