ns.1024.gdn

The Sync Vocabulary

Abstract

The Sync vocabulary provides useful terms for syncing descriptions of R·D·F resources between servers.

1. Introduction

1.1 Purpose and Scope

The aim of this vocabulary is to provide a general mechanism for publishing a series of fairly simple changes to the R·D·F descriptions of one or more objects, as well as enabling the discovery of new objects via the same mechanism. The intent is to create a stream of Activities which can be replayed to reconstruct an equivalent graph on a different service. It has the following features :⁠—

The namespace for the Sync vocabulary is https://ns.1024.gdn/Sync/#.

1.2 Relationship to Other Vocabularies

Sync is built upon the framework provided by ActivityStreams and the Activity vocabulary, although broader ActivityStreams support is not expected or required. It follows the general model and approach of I·I·I·F Change Discovery and similar uses of ActivityStreams for change tracking. It operates on a similar principle to the earlier Changeset vocabulary, but does not reference its terms.

Prov‐O is used as a (light) ontological dependency; in particular, its generated and invalidated properties.

In this document, the following prefixes are used to represent the following strings :⁠—

Prefix Expansion
as: https://www.w3.org/ns/activitystreams#
prov: http://www.w3.org/ns/prov#
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs: http://www.w3.org/2000/01/rdf-schema#
sync: https://ns.1024.gdn/Sync/#
xsd: http://www.w3.org/2001/XMLSchema#

1.3 Term Status

Terms in this document are categorized according to one the five following term statuses :⁠—

stable (✅)

The term has widely‐accepted usage.

testing (🔬)

The term is currently being used in some applications, but its exact meaning has not yet settled.

dependency (📥)

The term is not currently being used directly, but its definition informs the usage of a stable or testing term. (This value is not a part of the original term status definition.)

unstable (🚧)

The term is not currently being used in a widespread fashion, but experiments into its utility are taking place. Its usage may change significantly in the future.

archaic (🦖)

The term was once widely‐used, but such usage is considered outdated and is discouraged.

1.4 Definitions for Computers

There is an Owl ontology available in a J·son‐L·D format suitable for viewing with, e·g Protégé. The term definitions seen on this page are derived from the Owl definitions.

There also exists a J·son‐L·D context for use when referencing this vocabulary’s terms.

Generally, only stable and testing terms will be included in the J·son‐L·D context. If you need to use an unstable term, you will need to define it yourself.

1.5 Using this Vocabulary

It is recommended that changes to a system be provided via a paginated Ordered Collection, pointed to via the outbox property. The items in this collection should all be Sync Activities with the system provided as their context. Per ActivityStreams, at least a J·son‐L·D representation should be available, ideally one which is compact under the Sync J·son‐L·D context to enable its use by non–Linked Data‐aware processors.

Be aware that even compacted J·son‐L·D carries different semantics than ordinary J·son—particularly with respect to its interpretation of arrays.

2. Dictionary of Terms

2.1 Class Definitions

2.1.1 📥 Activity (as:Activity)

I·R·I

https://www.w3.org/ns/activitystreams#Activity

Equivalent Class

prov:Activity

Subclass Of

as:Object

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

dependency

An action or event. See the Prov‐O definition of this term.

2.1.2 📥 Activity (prov:Activity)

I·R·I

http://www.w3.org/ns/prov#Activity

Disjoint With

prov:Entity

Is Defined By

https://www.w3.org/TR/prov-o

Term Status

dependency

A thing occurring over a (possibly instantaneous) period of time and acting on or with entities.

A label and comment is recommended.

2.1.3 📥 Agent (prov:Agent)

I·R·I

http://www.w3.org/ns/prov#Agent

Is Defined By

https://www.w3.org/TR/prov-o

Term Status

dependency

A thing which bears responsibility for another thing existing or taking place.

2.1.4 📥 Collection (as:Collection)

I·R·I

https://www.w3.org/ns/activitystreams#Collection

Subclass Of

as:Object

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

dependency

An Object which contains Objects as its items.

If a Collection is an Ordered Collection, then its items are a single List containing the ordered items. However, if a Collection is not an Ordered Collection, then its items are the (potentially multiple) items themselves. This is confusing and ontologically problematic, but it is how things are defined in the Activity vocabulary.

2.1.5 📥 Collection Page (as:CollectionPage)

I·R·I

https://www.w3.org/ns/activitystreams#CollectionPage

Subclass Of

as:Collection

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

dependency

A Collection which is a subset of a larger Collection.

2.1.6 Create (as:Create)

I·R·I

https://www.w3.org/ns/activitystreams#Create

Subclass Of

as:Activity

sync:unstates exactly 0

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

stable

An Activity which creates a new thing, identified by its object.

Implementations should not trust metadata directly attached to the object of this Activity, as it may not be contemporaneous. Instead, they should look for any stated Statements.

2.1.7 Delete (as:Delete)

I·R·I

https://www.w3.org/ns/activitystreams#Delete

Subclass Of

as:Activity

sync:states exactly 0

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

stable

An Activity which destroys an existing thing, identified by its object.

Implementations should assume that any Statements associated with the object of this Activity have been invalidated. The object may be replaced with a Tombstone.

2.1.8 📥 Entity (prov:Entity)

I·R·I

http://www.w3.org/ns/prov#Entity

Disjoint With

prov:Activity

Is Defined By

https://www.w3.org/TR/prov-o

Term Status

dependency

A thing with some fixed aspects and which is not an Activity.

2.1.9 List (rdf:List)

I·R·I

http://www.w3.org/1999/02/22-rdf-syntax-ns#List

Is Defined By

https://www.w3.org/TR/rdf-schema

Term Status

stable

A (Lisp‐like) list of things.

2.1.10 📥 Object (as:Object)

I·R·I

https://www.w3.org/ns/activitystreams#Object

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

dependency

Any ActivityStreams object.

2.1.11 Ordered Collection (as:OrderedCollection)

I·R·I

https://www.w3.org/ns/activitystreams#OrderedCollection

Subclass Of

as:Collection

as:items exactly 1 rdf:List

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

stable

A Collection whose items are given as an ordered List.

2.1.12 Ordered Collection Page (as:OrderedCollectionPage)

I·R·I

https://www.w3.org/ns/activitystreams#OrderedCollectionPage

Subclass Of

as:CollectionPage

as:OrderedCollection

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

stable

An Ordered Collection which is a subset of a larger Ordered Collection.

2.1.13 📥 Statement (rdf:Statement)

I·R·I

http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement

Is Defined By

https://www.w3.org/TR/rdf-schema

Term Status

dependency

A re·ified R·D·F statement (with subject, object, predicate…).

2.1.14 🔬 Sync Activity (sync:SyncActivity)

I·R·I

https://ns.1024.gdn/Sync/#SyncActivity

Subclass Of

as:Activity

as:context max 1

as:endTime exactly 1

as:object exactly 1

Is Defined By

https://ns.1024.gdn/Sync/

Term Status

testing

An Activity which states and unstates Statements. The object of a Sync Activity must be the same as the subject of its Statements.

Sync Activities must specify an end time, which denotes the time at which the stated and unstated statements took effect. They should also have a context.

Sync Activities typically will also belong to another Activity subclass, like Create, Update, or Delete. They can be annotated with labels and comments.

2.1.15 Tombstone (as:Tombstone)

I·R·I

https://www.w3.org/ns/activitystreams#Tombstone

Subclass Of

as:Object

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

stable

A placeholder Object for one which has been deleted.

2.1.16 Update (as:Update)

I·R·I

https://www.w3.org/ns/activitystreams#Update

Subclass Of

as:Activity

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

stable

An Activity which updates an existing thing, identified by its object.

Implementations should not trust metadata directly attached to the object of this Activity, as it may not be contemporaneous. Instead, they should look for any stated or unstated Statements.

2.2 Object Property Definitions

2.2.1 📥 generated (prov:generated)

I·R·I

http://www.w3.org/ns/prov#generated

Subproperty Of

prov:influenced

Domain

prov:Activity

Range

prov:Entity

Is Defined By

https://www.w3.org/TR/prov-o

Term Status

dependency

An Entity which was created by this Activity.

2.2.2 has context (as:context)

I·R·I

https://www.w3.org/ns/activitystreams#context

Domain

as:Object

Range

as:Object

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

stable

A context in which this Object exists.

Sync Activities within a thing’s outbox should specify that thing as their context.

2.2.3 has first (rdf:first)

I·R·I

http://www.w3.org/1999/02/22-rdf-syntax-ns#first

Domain

rdf:List

Is Defined By

https://www.w3.org/TR/rdf-schema

Term Status

stable

The first thing in this List.

2.2.4 has first page (as:first)

I·R·I

https://www.w3.org/ns/activitystreams#first

Domain

as:Collection

Range

as:CollectionPage

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

stable

If this is a Collection Page, the furthest preceding Collection Page. If it is a Collection but not a Collection Page, the first Collection Page of the Collection. This is semantically confusing but it’s how ActivityStreams defined it.

2.2.5 has items (as:items)

I·R·I

https://www.w3.org/ns/activitystreams#items

Domain

as:Collection

Range

as:Object and rdf:List

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

stable

The items belonging to this Collection.

When present on an Ordered Collection, the items are given as a single ordered List. Otherwise, the items are given directly.

2.2.6 has last page (as:last)

I·R·I

https://www.w3.org/ns/activitystreams#last

Domain

as:Collection

Range

as:CollectionPage

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

stable

If this is a Collection Page, the furthest succeeding Collection Page. If it is a Collection but not a Collection Page, the last Collection Page of the Collection. This is semantically confusing but it’s how ActivityStreams defined it.

2.2.7 has next page (as:next)

I·R·I

https://www.w3.org/ns/activitystreams#next

Domain

as:CollectionPage

Range

as:CollectionPage

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

stable

The Collection Page which follows this one.

2.2.8 has object (as:object)

I·R·I

https://www.w3.org/ns/activitystreams#object

Domain

as:Activity

Range

as:Object

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

stable

The direct object of this Activity.

For Sync Activities, the object must also be the subject of any stated or unstated Statements.

2.2.9 has outbox (as:outbox)

I·R·I

https://www.w3.org/ns/activitystreams#outbox

Domain

as:Object

Range

as:OrderedCollection

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

stable

An Ordered Collection of Activities created by this Object or those that control it.

2.2.10 has previous page (as:prev)

I·R·I

https://www.w3.org/ns/activitystreams#prev

Domain

as:CollectionPage

Range

as:CollectionPage

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

stable

The Collection Page which precedes this one.

2.2.11 has rest (rdf:rest)

I·R·I

http://www.w3.org/1999/02/22-rdf-syntax-ns#rest

Domain

rdf:List

Range

rdf:List

Is Defined By

https://www.w3.org/TR/rdf-schema

Term Status

stable

The remaining things in this List.

2.2.12 📥 influenced (prov:influenced)

I·R·I

http://www.w3.org/ns/prov#influenced

Inverse Of

prov:wasInfluencedBy

Domain

prov:Activity or prov:Agent or prov:Entity

Range

prov:Activity or prov:Agent or prov:Entity

Is Defined By

https://www.w3.org/TR/prov-o

Term Status

dependency

An Activity, Agent, or Entity which this Activity, Agent, or Entity somehow influenced.

This is an incredibly broad relation.

2.2.13 📥 invalidated (prov:invalidated)

I·R·I

http://www.w3.org/ns/prov#invalidated

Subproperty Of

prov:influenced

Domain

prov:Activity

Range

prov:Entity

Is Defined By

https://www.w3.org/TR/prov-o

Term Status

dependency

An Entity which was destroyed or made invalid by this Activity.

2.2.14 part of (as:partOf)

I·R·I

https://www.w3.org/ns/activitystreams#partOf

Domain

as:CollectionPage

Range

as:Collection

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

stable

The Collection that this Collection Page forms part of.

2.2.15 predicate (rdf:predicate)

I·R·I

http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate

Domain

rdf:Statement

Is Defined By

https://www.w3.org/TR/rdf-schema

Term Status

stable

The predicate of this Statement.

2.2.16 🔬 states (sync:states)

I·R·I

https://ns.1024.gdn/Sync/#states

Subproperty Of

prov:generated

Range

rdf:Statement

Property Disjoint With

sync:unstates

Is Defined By

https://ns.1024.gdn/Sync/

Term Status

testing

A Statement which was created by this Activity.

The subject of the Statement is necessarily the object of this Activity.

2.2.17 📥 subject (rdf:subject)

I·R·I

http://www.w3.org/1999/02/22-rdf-syntax-ns#subject

Subproperty Of

inverse(sync:states) o as:object

inverse(sync:unstates) o as:object

Domain

rdf:Statement

Is Defined By

https://www.w3.org/TR/rdf-schema

Term Status

dependency

The subject of this Statement.

This needn’t be declared explicitly for Statements which are stated or unstated on a Sync Activity, as it is required to be the same as that Sync Activity’s object.

2.2.18 🔬 unstates (sync:unstates)

I·R·I

https://ns.1024.gdn/Sync/#unstates

Subproperty Of

prov:invalidated

Domain

as:Activity

Range

rdf:Statement

Property Disjoint With

sync:states

Is Defined By

https://ns.1024.gdn/Sync/

Term Status

testing

An Statement which was destroyed or made invalid by this Activity.

The subject of the Statement is necessarily the object of this Activity.

2.2.19 📥 was influenced by (prov:wasInfluencedBy)

I·R·I

http://www.w3.org/ns/prov#wasInfluencedBy

Domain

prov:Activity or prov:Agent or prov:Entity

Range

prov:Activity or prov:Agent or prov:Entity

Is Defined By

https://www.w3.org/TR/prov-o

Term Status

dependency

An Activity, Agent, or Entity which in some way influenced this Activity, Agent, or Entity.

This is an incredibly broad relation.

2.3 Data Property Definitions

2.3.1 end time (as:endTime)

I·R·I

https://www.w3.org/ns/activitystreams#endTime

Domain

as:Object

Range

xsd:dateTime

Functional?

yes

Is Defined By

https://www.w3.org/TR/activitystreams-vocabulary

Term Status

stable

The time at which this Object ended or Activity concluded.

2.4 Annotation Property Definitions

2.4.1 comment (rdfs:comment)

I·R·I

http://www.w3.org/2000/01/rdf-schema#comment

Domain

as:Object

Is Defined By

https://www.w3.org/TR/rdf-schema

Term Status

stable

A remark or summary pertaining to this thing.

This property may be used to provide explanatory context for Activities.

2.4.2 label (rdfs:label)

I·R·I

http://www.w3.org/2000/01/rdf-schema#label

Domain

as:Object

Is Defined By

https://www.w3.org/TR/rdf-schema

Term Status

stable

A human‐readable name or descriptor for this thing.

Activities can be labelled to give a shorter, more consise description than that available through their comments. Labels should typically be strings of no more than 72 characters.

2.4.3 object (rdf:object)

I·R·I

http://www.w3.org/1999/02/22-rdf-syntax-ns#object

Domain

rdf:Statement

Is Defined By

https://www.w3.org/TR/rdf-schema

Term Status

stable

The object of this Statement.

(This property is classified as an annotation property because it could be either have either a node or literal value.)