Show / Hide Table of Contents

Class DatasetHandler

HTTP Handler for serving RDF Datasets in ASP.Net applications
Inheritance
System.Object
BaseDatasetHandler
DatasetHandler
Inherited Members
BaseDatasetHandler._config
BaseDatasetHandler.IsReusable
BaseDatasetHandler.ProcessRequest(HttpContext)
BaseDatasetHandler.SendDatasetToClient(HttpContext, ISparqlDataset)
Namespace: VDS.RDF.Web
Assembly: dotNetRDF.Web.dll
Syntax
public class DatasetHandler : BaseDatasetHandler
Remarks

Used to serve a Dataset at a specific fixed URL. The Dataset being served to the user in one of their acceptable MIME types if possible, if they don't accept any MIME type we can serve then they get a 406 Not Acceptable

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 Dataset to be served:
<dotnetrdf:/folder/dataset> a dnr:HttpHandler ;
                                  dnr:type "VDS.RDF.Web.DatasetHandler" ;
                                  dnr:usingDataset _:dataset .

_:dataset a dnr:SparqlDataset ;
        dnr:type "VDS.RDF.Query.Datasets.InMemoryDataset" .

Methods

| Improve this Doc View Source

LoadConfig(HttpContext)

Loads the Handlers configuration
Declaration
protected override BaseDatasetHandlerConfiguration LoadConfig(HttpContext context)
Parameters
Type Name Description
HttpContext context HTTP Context
Returns
Type Description
BaseDatasetHandlerConfiguration
Overrides
BaseDatasetHandler.LoadConfig(HttpContext)
| Improve this Doc View Source

UpdateConfig(HttpContext)

Updates the Handlers configuration
Declaration
protected override void UpdateConfig(HttpContext context)
Parameters
Type Name Description
HttpContext context HTTP Context
Overrides
BaseDatasetHandler.UpdateConfig(HttpContext)

Extension Methods

Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Methods
    • LoadConfig(HttpContext)
    • UpdateConfig(HttpContext)
  • Extension Methods
Back to top Generated by DocFX