Abstract
Protected
constructorThe URI of the notification channel type. This will be added to the SHACL shape to validate incoming subscription data.
The route corresponding to the URL of the subscription service of this channel type. Channel identifiers will be generated by appending a value to this URL.
The features that should be enabled for this channel type.
Values are expected to be full URIs, but the notify:
prefix can also be used.
Any additional properties that need to be added to the default SHACL shape.
Protected
Readonly
featuresProtected
Readonly
pathProtected
Readonly
shaclProtected
Optional
shaclProtected
Readonly
typeThis function will be called after the serialized channel is sent back as a response, allowing for any final actions that need to happen.
The notification channel that is completed.
Determines which modes are required to allow the given notification channel.
The notification channel to verify.
The required modes.
Returns the SubscriptionService that describes how to subscribe to this channel type.
Protected
getInitiates the channel by first calling validateSubscription followed by quadsToChannel. Subclasses can override either function safely to impact the result of the function.
Protected
quadsConverts a set of quads to a NotificationChannel. Assumes the data is valid, so this should be called after validateSubscription.
The generated identifier will be a URL made by combining the base URL of the channel type with a unique identifier.
The values of the default features will be added to the resulting channel, subclasses with additional features that need to be added are responsible for parsing those quads.
Data to convert.
The identifier of the notification channel description in the dataset.
The generated NotificationChannel.
Converts the given channel to a JSON-LD description.
All fields found in the channel, except lastEmit
, will be part of the result subject,
so subclasses should remove any fields that should not be exposed.
Protected
validateValidates whether the given data conforms to the stored SHACL shape. Will throw an UnprocessableEntityHttpError if validation fails. Along with the SHACL check, this also makes sure there is only one matching entry in the dataset.
The data to validate.
The focus node that corresponds to the subject of the found notification channel description.
A NotificationChannelType that handles the base case of parsing and serializing a notification channel. Note that the
extractModes
call always requires Read permissions on the target resource.Uses SHACL to validate the incoming data in
initChannel
. Classes extending this can pass extra SHACL properties in the constructor to extend the validation check.The
completeChannel
implementation is an empty function.