Class BaseProtocolProcessor
Abstract Base class for SPARQL Graph Store HTTP Protocol for Graph Management implementations.
Implements
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 SourceDefaultParameterPattern
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 SourceGetGraph(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.
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 |
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. |
ProcessGet(IHttpContext)
Processes a GET operation.
Declaration
public abstract void ProcessGet(IHttpContext context)
Parameters
Type | Name | Description |
---|---|---|
IHttpContext | context | HTTP Context. |
ProcessHead(IHttpContext)
Processes a HEAD operation.
Declaration
public abstract void ProcessHead(IHttpContext context)
Parameters
Type | Name | Description |
---|---|---|
IHttpContext | context | HTTP Context. |
ProcessPatch(IHttpContext)
Processes a PATCH operation.
Declaration
public abstract void ProcessPatch(IHttpContext context)
Parameters
Type | Name | Description |
---|---|---|
IHttpContext | context | HTTP Context. |
ProcessPost(IHttpContext)
Processes a POST operation.
Declaration
public abstract void ProcessPost(IHttpContext context)
Parameters
Type | Name | Description |
---|---|---|
IHttpContext | context | HTTP Context. |
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.
ProcessPut(IHttpContext)
Processes a PUT operation.
Declaration
public abstract void ProcessPut(IHttpContext context)
Parameters
Type | Name | Description |
---|---|---|
IHttpContext | context | HTTP Context. |
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 |
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. |