• User Guide
  • How-To Guides
  • Developer Guide
  • API Documentation
  • FAQs
  • Support
  • API Documentation
Show / Hide Table of Contents

Class BaseProtocolProcessor

Abstract Base class for SPARQL Graph Store HTTP Protocol for Graph Management implementations.
Inheritance
System.Object
BaseProtocolProcessor
GenericProtocolProcessor
ProtocolToUpdateProcessor
Implements
ISparqlHttpProtocolProcessor
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)
System.Object.ToString()
Namespace: VDS.RDF.Update.Protocol
Assembly: dotNetRDF.dll
Syntax
public abstract class BaseProtocolProcessor : ISparqlHttpProtocolProcessor

Fields

| Improve this Doc View Source

DefaultParameterPattern

This is the Pattern that is used to check whether ?default is present in the querystring. This is needed since IIS does not recognise ?default as being a valid querystring key unless it ends in a = which the specification does not mandate so cannot be assumed.
Declaration
public const string DefaultParameterPattern = "^default$|^default&|&default&|&default$"
Field Value
Type Description
System.String

Methods

| Improve this Doc View Source

GetGraph(Uri)

Retrieves the Graph with the given URI.
Declaration
protected abstract IGraph GetGraph(Uri graphUri)
Parameters
Type Name Description
System.Uri graphUri Graph URI.
Returns
Type Description
IGraph
Remarks

Helper method intended for use by the ProcessGet(IHttpContext) and ProcessHead(IHttpContext) methods.

| Improve this Doc View Source

HasGraph(Uri)

Determines whether a Graph with the given URI exists.
Declaration
protected abstract bool HasGraph(Uri graphUri)
Parameters
Type Name Description
System.Uri graphUri Graph URI.
Returns
Type Description
System.Boolean
| Improve this Doc View Source

MintGraphUri(IHttpContext, IGraph)

Generates a new Graph URI that should be used to create a new Graph in the Store in conjunction with the ProcessPostCreate(IHttpContext) operation.
Declaration
protected virtual Uri MintGraphUri(IHttpContext context, IGraph g)
Parameters
Type Name Description
IHttpContext context HTTP Context.
IGraph g Graph parsed from the request body.
Returns
Type Description
System.Uri
Remarks
Default behaviour is to mint a URI based on a hash of the Request IP and Date Time. Implementations can override this method to control URI creation as they desire.
| Improve this Doc View Source

ParsePayload(IHttpContext)

Gets the Graph which can be parsed from the request body.
Declaration
protected IGraph ParsePayload(IHttpContext context)
Parameters
Type Name Description
IHttpContext context HTTP Context.
Returns
Type Description
IGraph
Remarks
In the event that there is no request body a null will be returned.
| Improve this Doc View Source

ProcessDelete(IHttpContext)

Processes a DELETE operation.
Declaration
public abstract void ProcessDelete(IHttpContext context)
Parameters
Type Name Description
IHttpContext context HTTP Context.
| Improve this Doc View Source

ProcessGet(IHttpContext)

Processes a GET operation.
Declaration
public abstract void ProcessGet(IHttpContext context)
Parameters
Type Name Description
IHttpContext context HTTP Context.
| Improve this Doc View Source

ProcessHead(IHttpContext)

Processes a HEAD operation.
Declaration
public abstract void ProcessHead(IHttpContext context)
Parameters
Type Name Description
IHttpContext context HTTP Context.
| Improve this Doc View Source

ProcessPatch(IHttpContext)

Processes a PATCH operation.
Declaration
public abstract void ProcessPatch(IHttpContext context)
Parameters
Type Name Description
IHttpContext context HTTP Context.
| Improve this Doc View Source

ProcessPost(IHttpContext)

Processes a POST operation.
Declaration
public abstract void ProcessPost(IHttpContext context)
Parameters
Type Name Description
IHttpContext context HTTP Context.
| Improve this Doc View Source

ProcessPostCreate(IHttpContext)

Processes a POST operation which adds triples to a new Graph in the Store and returns the URI of the newly created Graph.
Declaration
public abstract void ProcessPostCreate(IHttpContext context)
Parameters
Type Name Description
IHttpContext context HTTP Context.
Remarks

This operation allows clients to POST data to an endpoint and have it create a Graph and assign a URI for them.

| Improve this Doc View Source

ProcessPut(IHttpContext)

Processes a PUT operation.
Declaration
public abstract void ProcessPut(IHttpContext context)
Parameters
Type Name Description
IHttpContext context HTTP Context.
| Improve this Doc View Source

ResolveGraphUri(IHttpContext)

Gets the Graph URI that the request should affect.
Declaration
protected Uri ResolveGraphUri(IHttpContext context)
Parameters
Type Name Description
IHttpContext context HTTP Context.
Returns
Type Description
System.Uri
| Improve this Doc View Source

ResolveGraphUri(IHttpContext, IGraph)

Gets the Graph URI that the request should affect.
Declaration
protected Uri ResolveGraphUri(IHttpContext context, IGraph g)
Parameters
Type Name Description
IHttpContext context HTTP Context.
IGraph g Graph parsed from the request body.
Returns
Type Description
System.Uri
Remarks
The Graph parameter may be null in which case the other overload of this method will be invoked.
| Improve this Doc View Source

SendResultsToClient(IHttpContext, IGraph)

Sends the given Graph to the Client via the HTTP Response.
Declaration
protected void SendResultsToClient(IHttpContext context, IGraph g)
Parameters
Type Name Description
IHttpContext context HTTP Context.
IGraph g Graph to send.

Implements

ISparqlHttpProtocolProcessor

Extension Methods

Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Fields
    • DefaultParameterPattern
  • Methods
    • GetGraph(Uri)
    • HasGraph(Uri)
    • MintGraphUri(IHttpContext, IGraph)
    • ParsePayload(IHttpContext)
    • ProcessDelete(IHttpContext)
    • ProcessGet(IHttpContext)
    • ProcessHead(IHttpContext)
    • ProcessPatch(IHttpContext)
    • ProcessPost(IHttpContext)
    • ProcessPostCreate(IHttpContext)
    • ProcessPut(IHttpContext)
    • ResolveGraphUri(IHttpContext)
    • ResolveGraphUri(IHttpContext, IGraph)
    • SendResultsToClient(IHttpContext, IGraph)
  • Implements
  • Extension Methods
Back to top Generated by DocFX