FEP-1985: Signaling how an OrderedCollection is ordered
Summary
OrderedCollection is defined as an ordered set in the Activity Vocabulary, but the precise ordering is not defined. The ActivityPub specification requires that instances of OrderedCollection MUST be ordered reverse chronologically by insertion order, but a later errata was proposed to relax this restriction by only applying it to properties defined as OrderedCollection within the ActivityPub specification. Consequently, this allows for some collections to be presented forward chronologically by insertion order, and some collections to be presented reverse chronologically by insertion order. This FEP introduces an orderType
property and two vocabulary terms ForwardChronological
and ReverseChronological
to explicitly signal the ordering of a collection.
Terms defined
orderType
- URI
https://w3id.org/fep/1985/orderType
- Label
- is ordered in
- Comment
- Indicates the type of ordering for an OrderedCollection.
- Domain
- OrderedCollection
- Range
- OrderingClass (@vocab)
- Required
- No
- Functional
- Yes
- See also
- ForwardChronological | ReverseChronological
- Is defined by
- FEP-1985
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/fep/1985"
],
"id": "https://domain.example/some-collection",
"type": "OrderedCollection",
"orderedItems": [
"https://domain.example/objects/1",
"https://domain.example/objects/2",
"https://domain.example/objects/3"
],
"orderType": "ForwardChronological"
}
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://domain.example/some-collection",
"type": "OrderedCollection",
"orderedItems": [
"https://domain.example/objects/1",
"https://domain.example/objects/2",
"https://domain.example/objects/3"
],
"https://w3id.org/fep/1985/orderType": {
"id": "https://w3id.org/fep/1985/ForwardChronological"
}
}
OrderingClass
- URI
https://w3id.org/fep/1985/OrderingClass
- Label
- OrderingClass
- Comment
- Abstract base class for the
orderType
property's range. - See also
- ForwardChronological | ReverseChronological
- Is defined by
- FEP-1985
ForwardChronological
ReverseChronological
例
(このセクションは非規範的です。)
Example of a forward chronological OrderedCollection with additional context:
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/fep/1985"
],
"id": "https://domain.example/some-collection",
"type": "OrderedCollection",
"orderedItems": [
"https://domain.example/objects/1",
"https://domain.example/objects/2",
"https://domain.example/objects/3"
],
"orderType": "ForwardChronological"
}
Example of a forward chronological OrderedCollection without additional context:
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://domain.example/some-collection",
"type": "OrderedCollection",
"orderedItems": [
"https://domain.example/objects/1",
"https://domain.example/objects/2",
"https://domain.example/objects/3"
],
"https://w3id.org/fep/1985/orderType": {
"id": "https://w3id.org/fep/1985/ForwardChronological"
}
}
Example of a reverse chronological OrderedCollection with additional context:
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/fep/1985"
],
"id": "https://domain.example/some-collection",
"type": "OrderedCollection",
"orderedItems": [
"https://domain.example/objects/3",
"https://domain.example/objects/2",
"https://domain.example/objects/1"
],
"orderType": "ReverseChronological"
}
Example of a reverse chronological OrderedCollection without additional context:
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://domain.example/some-collection",
"type": "OrderedCollection",
"orderedItems": [
"https://domain.example/objects/3",
"https://domain.example/objects/2",
"https://domain.example/objects/1"
],
"https://w3id.org/fep/1985/orderType": {
"id": "https://w3id.org/fep/1985/ReverseChronological"
}
}
参考文献
- Christine Lemmer Webber, Jessica Tallon, ActivityPub, 2018
- James M Snell, Evan Prodromou, Activity Vocabulary, 2017
- W3C Wiki contributors, ActivityPub errata, 2024
- a, Evolving OrderedCollection to be more useful, 2020
著作権
CC0 1.0 ユニバーサル (CC0 1.0) パブリック ドメイン
法律で認められる範囲において、この Fediverse 拡張提案の著者は、この作品に対するすべての著作権および関連する権利または隣接する権利を放棄しています。