-
Notifications
You must be signed in to change notification settings - Fork 4
ActivityStreams
https://www.w3.org/TR/activitystreams-core/
ActivityStreams is a W3C recommendation for representing activities, in particular focussing on "socially flavoured" activity types that might occur on the web, such as sending invitations, liking something or making an announcement. The specification for this vocab is split over two parts:
- The core set of activity stream axioms which covers a handful of the basic building blocks, including
Activity
andObject
axioms. The core document also details how activity stream data should be modelled. - An 'extended' set of axioms which includes many sub-types of existing concepts from the core list (e.g. the concept of a
Person
is defined as being a sub-type ofObject
, whilstTravel
is a sub-type ofActivity
).
The core idea is that an Activity
can be associated with one or more Object
s through context specific associations such as target
or actor
- for example, in the context of an Invite the specification indicates that the actor
is extending an invitation to the target
for whatever is in the object
property. This could be used to represent numerous different scenarios, such as...
- A person sending a party invite to someone else.
- A company inviting you to join their mailing list.
- An application inviting users to upgrade their account.
The ActivityStream specifications provide their examples in JSON-LD format, but ActivityStreams can equally be serialised as any other RDF format (e.g. Turtle). ActivityStreams is itself part of a wider suite of W3C specifications called the Social Web Protocols which aim to define mechanisms for decentralised social interaction on the web.
The following represents some activity stream data showing Bob inviting Alice to a party, and Alice later accepting that invite.
@prefix : <http://www.example.com/> .
@prefix as : <https://www.w3.org/ns/activitystreams/#> .
:Bob a as:Person ;
as:name "Bob" .
:Alice a as:Person ;
as:name "Alice" .
:BobsHouse a as:Place ;
as:name "Bob's house" .
:NYEparty a as:Event ;
as:name "Bob's new years eve party" ;
as:startTime "2022-12-31T20:00:00" ;
as:endTime "2023-01-01T02:00:00" ;
as:location :BobsHouse .
:invitation a as:Invite ;
as:actor :Bob ;
as:target :Alice ;
as:object :NYEparty ;
as:published "2022-10-10T10:12:38" .
:acceptence a as:Accept ;
as:actor :Alice ;
as:object :NYEparty ;
as:published "2022-10-12T09:58:21" .
© Crown Copyright GCHQ 2024 - This content is licensed under the Open Government License 3.0