Show / Hide Table of Contents

Class GraphHandler

HTTP Handler for serving Graphs in ASP.Net applications
Inheritance
System.Object
BaseGraphHandler
GraphHandler
SchemaGraphHandler
WildcardGraphHandler
Inherited Members
BaseGraphHandler._config
BaseGraphHandler.IsReusable
BaseGraphHandler.ProcessRequest(HttpContext)
BaseGraphHandler.SelectWriter(MimeTypeDefinition)
BaseGraphHandler.ProcessGraph(IGraph)
BaseGraphHandler.ComputeETag(IGraph)
Namespace: VDS.RDF.Web
Assembly: dotNetRDF.Web.dll
Syntax
public class GraphHandler : BaseGraphHandler
Remarks

Used to serve a Graph at a specific fixed URL. The Graph 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

If you have a Graph where you use slash URIs under this URL and you want those URIs to resolve to the same Graph then you should use the WildcardGraphHandler instead

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 Graph to be served:
<dotnetrdf:/folder/graph> a dnr:HttpHandler ;
                                dnr:type "VDS.RDF.Web.GraphHandler" ;
                                dnr:usingGraph _:graph .

_:graph a dnr:Graph ;
        dnr:type "VDS.RDF.Graph" ;
        dnr:fromFile "yourGraph.rdf" .

Methods

| Improve this Doc View Source

LoadConfig(HttpContext)

Loads the Handlers configuration
Declaration
protected override BaseGraphHandlerConfiguration LoadConfig(HttpContext context)
Parameters
Type Name Description
HttpContext context HTTP Context
Returns
Type Description
BaseGraphHandlerConfiguration
Overrides
BaseGraphHandler.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
BaseGraphHandler.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