Skip to content

Verbs owl:Class vs. rdf:Property

☮ elf Pavlik ☮ edited this page Sep 8, 2015 · 6 revisions

state of things as of 2015-07-22 WD

Let's focus on follow verb

Activity Streams 2.0 Vocabulary already defines an instance of owl:Class

  • as:Follow

Activity Streams 2.0 pull request #191: Add collection properties and relationship types. This pull request proposes few new properties related to concept of following:

  • as:relationships
  • as:isFollowing
  • as:isFollowedBy

as:Follow

Currently this class doesn't seem to have any other purpose than filter activity by particular verb. AS 2.0 doesn't depend on RDF Schema based inference so we don't need it for defining rdfs:domain and rdfs:range of properties.

as:isFollowing & as:isFollowedBy

While AS 2.0 Vocabulary already defines as:Follow, we find need to add two additional properties to express following relationships. One can find strong discouragement from TimBL to define inverse properties. I will present later how defining of verbs as instances of rdf:Property addresses this problem.

as:relationships

While it provides way to follow your nose to collection of all objects with rdf:type including as:Relationship, it doesn't provide way to filter by particular type of relationship. I will present later how defining of verbs as instances of rdf:Property can address this problem.

proposed alternative

I propose defining verbs as instances of rdf:Property seeing many benefits to such approach.

direct relation

as:follow

Used as value of as:action rather than rdf:type!

activity

filtering by verb

It allows to filter activity by particular verb in almost exact the same way. For example in javascript

activity.action.includes('follow')

instead of

activity['@type'].includes('Follow')

in addition it provides easy 'dot notation' without issues related to aliasing in JSON-LD context "type": "@type"

qualified relations

Defining follow verb as rdf:Property doesn't require defining additional properties like as:isFollowing and as:isFollowedBy. One can just use it as value of as:relationship and swap as:object and as:subject to use it in desired direction!

relationship relationship reverse

collections

Defining follow verb as rdf:Property allows reusing it in similar way as in qualified relations. For example in ldp:DirectContainer as value of either ldp:hasMemberRelation or ldp:isMemberOfRelation

NOTE: since Social WG currently explores possibility of ignoring httpRange-14, I choose not to get into distinction between ldp:DirectContainer and ldp:IndirectContainer!

container

container reverse

filtering by verb

Also we can use follow your nose approach by following ldp:membershipResource in reverse direction, instead of need to define new as:relationships. Thanks to JSON-LD embedding we can also filter discover containers by verb without need to retrieve them.

list of people someone follows

container['ldp:hasMemberRelation'].includes('follow')

list of people who follow someone

container['ldp:isMemberOfRelation'].includes('follow')
activity counters

TODO

xAPI

xAPI community currently works on modeling verbs as instances of rdf:Property

see also

misc

reification link