Please see a newer version of an activities schema. This one wasn't actually used - we went for something closer to the Atom Activities work

Activ at a glance

Classes: | BlogPostEvent | CommentEvent | DoEvent | FollowEvent | HateEvent | ListenEvent | LoveEvent | MicroblogPostEvent | PostEvent | RateEvent | ReadEvent | ReviewEvent | ShareEvent | SubscribeEvent | TagEvent | UnfollowEvent | UnsubscribeEvent | ViewEvent | WatchEvent |

Properties: | agent | factor | label | product | time |

Other versions:

Notes

image of the schema

Classes and Properties (full detail)


Class: activ:BlogPostEvent

Blog Post Event - a blog post event
Status: testing
subClassOf Post Event

The user created a blog post about something.

  • The blog post may be of type sioctypes:BlogPost.
  • The event must have a human-readable rdfs:label.
  • The event must have one factor (the item blogged about). It should not be a literal
  • The event must have a product (output), which should have a URI. It may be of type sioctypes:BlogPost
  • The event must have an agent (the thing that blogged), which must have a URI. The agent may be of type foaf:Person or foaf:Agent
  • The event must have a time of datatype xsd:dateTime

BlogPostEvent is a subclass of activ:PostEvent, as are activ:CommentEvent, activ:ReviewEvent and activ:MicroblogPostEvent.

[permalink] [validation queries] [back to top]


Class: activ:CommentEvent

Comment Event - a comment event
Status: testing
subClassOf Post Event

The user commented on something, producing a comment which can be a Literal, a URI or a sioctypes:Comment.

  • The comment event must be of type activ:CommentEvent
  • The event must have a human-readable rdfs:label.
  • The event must have one factor (the item commented on). It should not be a literal
  • The event must have a product (output), which can be a literal or a URI. It may be of type sioctypes:Comment
  • The event must have an agent (the thing that commented), which must have a URI. The agent may be of type foaf:Person or foaf:Agent
  • The event must have a time of datatype xsd:dateTime

CommentEvent is a subclass of activ:PostEvent, as are activ:BlogPostEvent, activ:ReviewEvent and activ:MicroblogPostEvent.

[permalink] [validation queries] [back to top]


Class: activ:DoEvent

Do Event - an event of any kind
Status: testing
in-domain-of: A label time
has subclass Hate Event Love Event Share Event Unfollow Event View Event Tag Event Rate Event Unsubscribe Event Post Event Follow Event Subscribe Event

This is the superclass of all the other event types in the Activ ontology. It subclasses Event and is substantially the same, except that it has its own version of the event:time property which points to an instant rather than an object which may be an instant or an extent.

Events are complex. Events typically have a birth, life and death, can subsume each other or overlap.

A simplifying assumption has been made to treat watch and listen events as atomic. Instead of events having a birth, life and death, for these types birth-life-death are modelled as an instant. For example, a system might say that after 30 seconds an activity is produced that says you have watched it. You can't unwatch it.

Conversely, follow and unfollow are modelled separately. If you follow someone, a 'follow' event is produced; if you unfollow them, an unfollow event is produced. In the meantime, you foaf:know that person. Similarly with love / unlove and hate / unhate; with the former you get a foaf:interest in the item.

This is a perfectly reasonable assumption *unless* for some reason the current attention part of the activity becomes a primary usecase, i.e. if live TV of some kind is essential; *or* if it's essential to know whether someone has watched all the way through. For the first of these, it could be possible to derive or approximate whether someone is currently watching something in other ways.

  • The do event must be of type activ:DoEvent or one of its subclasses.
  • The event must have a human-readable rdfs:label.
  • The event must have at least one factor. It must not be a literal.
  • The event may have a product (output), which must be a URI or be a literal.
  • The event must have an agent, which must have a URI. The agent may be of type foaf:Person or foaf:Agent
  • The event must have a activ:time of datatype xsd:dateTime

[permalink] [validation queries] [back to top]


Class: activ:FollowEvent

Follow Event - a follow event
Status: testing
subClassOf Do Event

The user started following something or someone.

  • The follow event must be of type activ:FollowEvent.
  • The event must have a human-readable rdfs:label.
  • The event must have one factor (the item followed). It must not be a literal or bnode. It may be a foaf:Person or foaf:Agent
  • The event has no product.
  • The event must have an agent (the thing that blogged), which must have a URI.
  • The agent may be of type foaf:Person or foaf:Agent
  • The event must have a activ:time of datatype xsd:dateTime

[permalink] [validation queries] [back to top]


Class: activ:HateEvent

Hate Event - a hate event
Status: testing
subClassOf Do Event

The user stated that they started to hate something, represented by the factor. There is no product.

  • The hate event must be of type activ:HateEvent.
  • The event must have a human-readable rdfs:label.
  • The event must have one factor (the item hated). It must not be a literal or bnode
  • The event must have an agent (the thing that blogged), which must have a URI.
  • The agent may be of type foaf:Person or foaf:Agent
  • The event must have a activ:time of datatype xsd:dateTime

[permalink] [validation queries] [back to top]


Class: activ:ListenEvent

Listen Event - a listen event
Status: testing
subClassOf View Event

The user listened to something, probably a po:Episode, po:Programe or po:Clip or po:Segment, or a mo:MusicalManifestation mo:MusicalWork. See the Programmes Ontology and the Music Ontology for more detail. There is no product for this event. It's a subclass of activ:ViewEvent, along with activ:WatchEvent and activ:ReadEvent.

  • The event must be of type activ:ListenEvent.
  • The event must have a human-readable rdfs:label.
  • The event must have one factor (the item listened to). The factor must not be a literal or bnode. It may be one of various types from the programmes ontology
  • The event has no product.
  • The event must have an agent (the thing that listened to something), which must have a URI. The agent may be of type foaf:Person or foaf:Agent
  • The event must have a activ:time of datatype xsd:dateTime

[permalink] [validation queries] [back to top]


Class: activ:LoveEvent

Love Event - a love event
Status: testing
subClassOf Do Event

The user stated that they started to love something, represented by the factor. There is no product.

  • The love event must be of type activ:LoveEvent.
  • The event must have a human-readable rdfs:label.
  • The event must have one factor (the item loved). It must not be a literal or bnode
  • The event must have an agent (the thing that blogged), which must have a URI.
  • The agent may be of type foaf:Person or foaf:Agent
  • The event must have a activ:time of datatype xsd:dateTime

[permalink] [validation queries] [back to top]


Class: activ:MicroblogPostEvent

Microblog Post Event - a micro blog post event
Status: testing
subClassOf Post Event

The user created a microblog post (e.g. a post to identica or twitter) about the factor, where the microblog post is represented by the product, usually a URL, and can be of type sioctypes:MicroblogPost.

  • The microblog post may be of type sioctypes:MicroblogPost.
  • The event must have a human-readable rdfs:label.
  • The event must have one factor (the item microblogged about). It should not be a literal
  • The event must have a product (output), which should have a URI. It may be of type sioctypes:MicroblogPost
  • The event must have an agent (the thing that microblogged), which must have a URI. The agent may be of type foaf:Person or foaf:Agent
  • The event must have a time of datatype xsd:dateTime

This is a subclass of activ:PostEvent. See also activ:CommentEvent, activ:ReviewEvent and activ:BlogPostEvent.

[permalink] [validation queries] [back to top]


Class: activ:PostEvent

Post Event - a posting event
Status: testing
subClassOf Do Event
has subclass Review Event Blog Post Event Microblog Post Event Comment Event

PostEvent is the superclass of all events that produce user-generated content, for example activ:BlogPostEvent, activ:CommentEvent, activ:ReviewEvent, activ:MicroblogPostEvent. It subclasses activ:DoEvent.

  • The post event must be of type activ:PostEvent or one of its subclasses.
  • The event must have a human-readable rdfs:label.
  • The event must have one factor (the item posted about). It must not be a literal or bnode
  • The event must have a product (output), which must have a URI. It may be one of a few different sioctypes
  • The event must have an agent (the thing that posted), which must have a URI.
  • The agent may be of type foaf:Person or foaf:Agent
  • The event must have a activ:time of datatype xsd:dateTime

[permalink] [validation queries] [back to top]


Class: activ:RateEvent

Rate Event - a rate event
Status: testing
subClassOf Do Event

The user rated something, producing a rate URI or a literal integer datatype.

  • The rate event must be of type activ:RateEvent.
  • The event must have a human-readable rdfs:label.
  • The event must have one factor (the item rated). It must not be a bnode. If a literal then it must be a integer datatype.
  • The event must have a product (output), which can be a literal integer or a URI
  • The event must have an agent (the thing that commented), which must have a URI. The agent may be of type foaf:Person or foaf:Agent
  • The event must have a activ:time of datatype xsd:dateTime

[permalink] [validation queries] [back to top]


Class: activ:ReadEvent

Read Event - a read event
Status: testing
subClassOf View Event

The user read something, the 'something' usually being a url, possibly being a foaf:Document, represented by the factor. Nothing is produced by a ReadEvent. It's a subclass of activ:ViewEvent, along with activ:ListenEvent and activ:WatchEvent.

  • The event must be of type activ:ReadEvent.
  • The event must have a human-readable rdfs:label.
  • The event must have one factor (the read item). The factor must not be a literal or bnode. It may be a foaf:Document.
  • The event has no product.
  • The event must have an agent (the thing that read something), which must have a URI. The agent may be of type foaf:Person or foaf:Agent
  • The event must have a activ:time of datatype xsd:dateTime

[permalink] [validation queries] [back to top]


Class: activ:ReviewEvent

Review Event - a review event
Status: testing
subClassOf Post Event

The user reviewed something, producing a review which can be a Literal or a sioctypes:Comment. This is essentially the same as a comment.

  • The comment event must be of type activ:CommentEvent
  • The event must have a human-readable rdfs:label.
  • The event must have one factor (the item commented on). It should not be a literal
  • The event must have a product (output), which can be a literal or a URI. It may be of type sioctypes:Comment
  • The event must have an agent (the thing that commented), which must have a URI. The agent may be of type foaf:Person or foaf:Agent
  • The event must have a time of datatype xsd:dateTime

ReviewEvent is a subclass of activ:PostEvent, as are activ:BlogPostEvent, activ:CommentEvent and activ:MicroblogPostEvent.

[permalink] [validation queries] [back to top]


Class: activ:ShareEvent

Share Event - a share event
Status: testing
subClassOf Do Event

The user has shared something, which must have a URI. There's no product. You can't unshare things.

  • The share event must be of type activ:ShareEvent.
  • The event must have a human-readable rdfs:label.
  • The event must have one factor (the item shared). It must not be a bnode or literal.
  • The event must have an agent (the thing that shared something), which must have a URI. The agent may be of type foaf:Person or foaf:Agent
  • The event must have a activ:time of datatype xsd:dateTime

[permalink] [validation queries] [back to top]


Class: activ:SubscribeEvent

Subscribe Event - a subscribe event - for example to a series
Status: testing
subClassOf Do Event

The user subscribed to something, for example a po:Brand or po:Series. See the programmes ontology.

  • The subscribe event must be of type activ:SubscribeEvent.
  • The event must have a human-readable rdfs:label.
  • The event must have one factor (the item subscribed to). It must not be a bnode or literal. It may be a Brand or Series
  • The event must have an agent (the thing that subscribed to something), which must have a URI. The agent may be of type foaf:Person or foaf:Agent
  • The event must have a activ:time of datatype xsd:dateTime

[permalink] [validation queries] [back to top]


Class: activ:TagEvent

Tag Event - a rate event
Status: testing
subClassOf Do Event

The user tagged something with a URI or a literal.

  • The tag event must be of type activ:TagEvent.
  • The event must have a human-readable rdfs:label.
  • The event must have one factor (the item tagged). It should not be a literal or a bnode
  • The event must have a product (output), which can be a literal or a URI
  • The event must have an agent (the thing that tagged), which must have a URI. The agent may be of type foaf:Person or foaf:Agent
  • The event must have a activ:time of datatype xsd:dateTime

[permalink] [validation queries] [back to top]


Class: activ:UnfollowEvent

Unfollow Event - an unfollow event
Status: testing
subClassOf Do Event

The user stopped following something or someone.

  • The unfollow event must be of type activ:UnfollowEvent.
  • The event must have a human-readable rdfs:label.
  • The event must have one factor (the item unfollowed). It must not be a literal or bnode. It may be a foaf:Person or foaf:Agent
  • The event has no product.
  • The event must have an agent (the thing that blogged), which must have a URI.
  • The agent may be of type foaf:Person or foaf:Agent
  • The event must have a activ:time of datatype xsd:dateTime

[permalink] [validation queries] [back to top]


Class: activ:UnsubscribeEvent

Unsubscribe Event - an unsubscribe event - for example from a series
Status: testing
subClassOf Do Event

The user unsubscribed from something, for example a po:Brand or po:Series. See the programmes ontology.

  • The unsubscribe event must be of type activ:UnsubscribeEvent.
  • The event must have a human-readable rdfs:label.
  • The event must have one factor (the item unsubscribed from). It must not be a bnode or literal. It may be a Brand or Series
  • The event must have an agent (the thing that unsubscribed from something), which must have a URI. The agent may be of type foaf:Person or foaf:Agent
  • The event must have a activ:time of datatype xsd:dateTime

[permalink] [validation queries] [back to top]


Class: activ:ViewEvent

View Event - a view event
Status: testing
subClassOf Do Event
has subclass Read Event Watch Event Listen Event

VieEvent is the superclass of activ:WatchEvent, activ:ListenEvent, and activ:ReadEvent. Its slightly misleading name follows the Atom activities usage.

  • The event must be of type activ:ViewEvent or one of its subclasses.
  • The event must have a human-readable rdfs:label.
  • The event must have one factor (the viewed item). The factor must not
  • be a literal or bnode. It may have a type.
  • The event must have an agent (the thing that viewed something), which
  • must have a URI. The agent may be of type foaf:Person or foaf:Agent
  • The event must have a activ:time of datatype xsd:dateTime

[permalink] [validation queries] [back to top]


Class: activ:WatchEvent

Watch Event - a watch event
Status: testing
subClassOf View Event

The user watched something, probably a po:Episode, po:Programme or po:Clip or po:Segment. See the Programmes Ontology for more detail. There is no product for this event. It's a subclass of activ:ViewEvent, along with activ:ListenEvent and activ:ReadEvent.

  • The event must be of type activ:WatchEvent.
  • The event must have a human-readable rdfs:label.
  • The event must have one factor (the watched item). The factor must not be a literal or bnode. It may be one of various types from the programmes ontology
  • The event has no product.
  • The event must have an agent (the thing that watched something), which must have a URI. The agent may be of type foaf:Person or foaf:Agent
  • The event must have a activ:time of datatype xsd:dateTime

[permalink] [validation queries] [back to top]


Property: event:factor

Factor - Relates an event to a passive factor (a tool, an instrument, an abstract cause...)
Status: unknown

[permalink] [validation queries] [back to top]


Property: rdfs:label

A label - A human-readable label
Status: unknown
Domain: Do Event

[permalink] [validation queries] [back to top]


Property: event:agent

Agent - Relates an event to an active agent (a person, a computer, ... :-) )
Status: unknown

[permalink] [validation queries] [back to top]


Property: activ:time

time - the time that an event happened
Status: unknown
Domain: Do Event
Time is an instant, and so a xsd:dateTime datatype literal.

[permalink] [validation queries] [back to top]


Property: event:product

Product - Relates an event to something produced during the event---a sound, a pie, whatever...
Status: unknown

[permalink] [validation queries] [back to top]


BlogPostEvent Validation Query

 #BlogPostEvent

 #The blog post event must be of type activ:BlogPostEvent.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:BlogPostEvent ) 
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }

 #The event must have one factor (the item blogged about). It must
 #not be a literal or bnode
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 ASK {
   ?e event:factor ?p .
   FILTER (!ISLITERAL(?p) && !ISBLANK(?p))
 }

 #The event must have a product (output), which must have a URI. It may be of
 #type sioctypes:BlogPost
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX sioctypes: <http://rdfs.org/sioc/types#> 
 ASK {
   ?e event:product ?prod .
   OPTIONAL {?prod rdf:type ?et } .
   FILTER ( ?et = sioctypes:BlogPost) .
   FILTER (!ISLITERAL(?prod) && !ISBLANK(?prod) ) .
 }


 #The event must have an agent (the thing that blogged), which must have a URI.
 #The agent may be of type foaf:Person or foaf:Agent 
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent ) .
   FILTER ( !ISLITERAL(?at) && !ISBLANK(?at) )
 }

 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
}

CommentEvent Validation Query

 #CommentEvent
 
 #The comment event must be of type activ:CommentEvent
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:CommentEvent ) .
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }
   
 #The event must have one factor (the item commented on). It should
 #not be a literal or a bnode
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 ASK {
   ?e event:factor ?p .
   FILTER (!ISLITERAL(?p) && !ISBLANK(?p))
 }

 #The event must have a product (output), which can be a literal or a URI
 #It may be of type sioctypes:Comment
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX sioctypes: <http://rdfs.org/sioc/types#>
 ASK {
   ?e event:product ?prod .
   OPTIONAL {?prod rdf:type ?et } .
   FILTER ( ?et = sioctypes:Comment ) .
   FILTER (!ISLITERAL(?prod) && !ISBLANK(?prod) ) .
 }

 #The event must have an agent (the thing that commented), which must
 #have a URI. The agent may be of type foaf:Person or foaf:Agent
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent ) .
   FILTER ( !ISLITERAL(?a) && !ISBLANK(?a) )
 }

 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
 }

DoEvent Validation Query

 #DoEvent

 #The do event must be of type activ:DoEvent or one of its subclasses.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:DoEvent || ?type = activ:WatchEvent || 
   ?type = activ:ListenEvent || ?type = activ:ReadEvent || ?type = activ:PostEvent ||
   ?type = activ:CommentEvent || ?type = activ:ReviewEvent || ?type = activ:BlogPostEvent ||
   ?type = activ:MicroblogPostEvent || ?type = activ:RateEvent || ?type = activ:TagEvent ||
   ?type = activ:ShareEvent || ?type = activ:FollowEvent || ?type = activ:UnfollowEvent ||
   ?type = activ:LoveEvent || ?type = activ:HateEvent || ?type = activ:SubscribeEvent ||
   ?type = activ:UnsubscribeEvent ) .
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }

 #The event must have at least one factor. It must not be a literal or a bnode.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 ASK {
   ?e event:factor ?p .
   FILTER (!ISLITERAL(?p) && !ISBLANK(?p) )
 }

 #The event may have a product (output), which must be a URI or be a literal.
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX sioctypes: <http://rdfs.org/sioc/types#>
 ASK {
   ?e event:product ?prod .
   FILTER ( !ISBLANK(?prod) )
 }
 

 #The event must have an agent, which must have a URI.
 #The agent may be of type foaf:Person or foaf:Agent
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent )
   FILTER ( !ISLITERAL(?at) & !ISBLANK(?at) )
 }

 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 PREFIX activ:  <http://example.com/ontologies/activity/>  
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
 }

FollowEvent Validation Query

 #FollowEvent

 #The follow event must be of type activ:FollowEvent.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:FollowEvent )
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }

 #The event must have one factor (the item followed). It must
 #not be a literal or bnode. It may be a foaf:Person or foaf:Agent
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 ASK {
   ?e event:factor ?p .
   OPTIONAL {?p rdf:type ?ty } .
   FILTER (!ISLITERAL(?p) && !ISBLANK(?p))
   FILTER ( ?ty = foaf:Person || ?ty = foaf:Agent )
 }

 #The event must have an agent (the thing that blogged), which must have a URI.
 #The agent may be of type foaf:Person or foaf:Agent
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent ) .
   FILTER ( !ISLITERAL(?at) && !ISBLANK(?at) )
 }

 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
}

HateEvent Validation Query

 #HateEvent
 #The hate event must be of type activ:HateEvent.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:HateEvent )
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }

 #The event must have one factor (the item hated). It must
 #not be a literal or bnode
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 ASK {
   ?e event:factor ?p .
   FILTER (!ISLITERAL(?p) && !ISBLANK(?p))
 }

 #The event must have an agent (the thing that blogged), which must have a URI.
 #The agent may be of type foaf:Person or foaf:Agent
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent ) .
   FILTER ( !ISLITERAL(?at) && !ISBLANK(?at) )
 }


 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
 }

ListenEvent Validation Query

 #ListenEvent
 #The event must be of type activ:ListenEvent.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:ListenEvent )
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }

 #The event must have one factor (the item listened to). The factor must not
 #be a literal or bnode. It may be one of various types from the
 #programmes ontology and elsewhere
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX mo: <http://purl.org/ontology/mo/> 
 ASK {
   ?e event:factor ?p .
   FILTER (!ISLITERAL(?p) && !ISBLANK(?p))
   OPTIONAL {?p rdf:type ?type } .
   FILTER ( ?type = po:Episode || ?type = po:Programme || ?type =
po:Clip || ?type = po:Segment || ?type = mo:MusicalManifestation ||
?type = mo:MusicalWork) .
 }
  
 #The event must have an agent (the thing that listened to something), which
 #must have a URI. The agent may be of type foaf:Person or foaf:Agent
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent ) .
   FILTER ( !ISLITERAL(?at) && !ISBLANK(?at) )
 }
   
 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
 }

LoveEvent Validation Query

 #LoveEvent
 #The love event must be of type activ:LoveEvent.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:LoveEvent )
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }

 #The event must have one factor (the item loved). It must
 #not be a literal or bnode
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 ASK {
   ?e event:factor ?p .
   FILTER (!ISLITERAL(?p) && !ISBLANK(?p))
 }

 #The event must have an agent (the thing that blogged), which must have a URI.
 #The agent may be of type foaf:Person or foaf:Agent
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent ) .
   FILTER ( !ISLITERAL(?at) && !ISBLANK(?at) )
 }


 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
 }

MicroblogPostEvent Validation Query

 #MicroblogPostEvent

 #The microblog post event must be of type activ:MicroblogPostEvent.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:MicroblogPostEvent ) 
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }

 #The event must have one factor (the item microblogged about). It must
 #not be a literal or bnode
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 ASK {
   ?e event:factor ?p .
   FILTER (!ISLITERAL(?p) && !ISBLANK(?p))
 }

 #The event must have a product (output), which must have a URI. It may be of
 #type sioctypes:MicroblogPost
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX sioctypes: <http://rdfs.org/sioc/types#> 
 ASK {
   ?e event:product ?prod .
   OPTIONAL {?prod rdf:type ?et } .
   FILTER ( ?et = sioctypes:MicroblogPost) .
   FILTER (!ISLITERAL(?prod) && !ISBLANK(?prod) ) .
 }


 #The event must have an agent (the thing that microblogged), which must have a URI.
 #The agent may be of type foaf:Person or foaf:Agent 
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent ) .
   FILTER ( !ISLITERAL(?at) && !ISBLANK(?at) )
 }

 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
}

PostEvent Validation Query

 #PostEvent

 #The post event must be of type activ:PostEvent or one of its subclasses.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:PostEvent || ?type = activ:CommentEvent || ?type = activ:ReviewEvent || ?type = activ:MicroblogPostEvent ) 
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }

 #The event must have one factor (the item posted about). It must
 #not be a literal or bnode
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 ASK {
   ?e event:factor ?p .
   FILTER (!ISLITERAL(?p) && !ISBLANK(?p))
 }

 #The event must have a product (output), which must have a URI. It may
 #be one of a few different sioctypes
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX sioctypes: <http://rdfs.org/sioc/types#> 
 ASK {
   ?e event:product ?prod .
   OPTIONAL {?prod rdf:type ?et } .
   FILTER ( ?type = activ:CommentEvent || ?type = activ:ReviewEvent || ?type = activ:BlogPostEvent || ?type = activ:MicroblogPostEvent ) .
   FILTER (!ISLITERAL(?prod) && !ISBLANK(?prod) ) .
 }


 #The event must have an agent (the thing that posted), which must have a URI.
 #The agent may be of type foaf:Person or foaf:Agent 
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent ) .
   FILTER ( !ISLITERAL(?at) && !ISBLANK(?at) )
 }

 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
}

RateEvent Validation Query

 # RateEvent
 #The rate event must be of type activ:RateEvent.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:RateEvent )
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }

 #The event must have one factor (the item rated). It must
 #not be a bnode or literal. 
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 ASK {
   ?e event:factor ?p .
   FILTER (!ISLITERAL(?p) && !ISBLANK(?p))
 }

 #The event must have a product (output), which can be a literal integer
 #or a URI
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX sioctypes: <http://rdfs.org/sioc/types#>
 ASK {
   ?e event:product ?prod .
   FILTER (!ISBLANK(?prod) ) .
   OPTIONAL {FILTER (ISLITERAL(?prod) && datatype(?prod) = xsd:integer) }
 }

 #The event must have an agent (the thing that rated something), which must 
 #have a URI. The agent may be of type foaf:Person or foaf:Agent
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent ) .
   FILTER ( !ISLITERAL(?a) && !ISBLANK(?a) )
 }
   
 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
}

ReadEvent Validation Query

 #ReadEvent
 #The event must be of type activ:ReadEvent.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:ReadEvent )
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }

 #The event must have one factor (the read item). The factor must not
 #be a literal or bnode. It may be a foaf:Document.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:factor ?p .
   FILTER (!ISLITERAL(?p) && !ISBLANK(?p))
   OPTIONAL {?p rdf:type ?type } .
   FILTER ( ?type = foaf:Document )
 }
  
 #The event must have an agent (the thing that read something), which
 #must have a URI. The agent may be of type foaf:Person or foaf:Agent
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent ) .
   FILTER ( !ISLITERAL(?at) && !ISBLANK(?at) )
 }
   
 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
 }

ReviewEvent Validation Query

 #The review event must be of type activ:ReviewtEvent.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:ReviewEvent )
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }

 #The event must have one factor (the item reviewed). It must
 #not be a literal or a bnode
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 ASK {
   ?e event:factor ?p .
   FILTER (!ISLITERAL(?p) && !ISBNODE(?p))
 }

 #The event must have a product (output), which can be a literal or a URI
 #It may be of type sioctypes:Comment
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX sioctypes: <http://rdfs.org/sioc/types#>
 ASK {
   ?e event:product ?prod .
   OPTIONAL {?prod rdf:type ?et } .
   FILTER ( ?et = sioctypes:Comment ) .
   FILTER (!ISLITERAL(?prod) && !ISBLANK(?prod) ) .
 }
 
 #The event must have an agent (the thing that commented), which must have a URI
 #The agent may be of type foaf:Person or foaf:Agent
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent ) .
   FILTER ( !ISLITERAL(?a) && !ISBLANK(?a) )
 }

 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
}

ShareEvent Validation Query

 # ShareEvent
 #The share event must be of type activ:ShareEvent.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:ShareEvent )
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }

 #The event must have one factor (the item shared). It must
 #not be a bnode or literal. 
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 ASK {
   ?e event:factor ?p .
   FILTER (!ISLITERAL(?p) && !ISBLANK(?p))
 }
   
 #The event must have an agent (the thing that shared something), which must
 #have a URI. The agent may be of type foaf:Person or foaf:Agent
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent ) .
   FILTER ( !ISLITERAL(?a) && !ISBLANK(?a) )
 }

 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
 }

SubscribeEvent Validation Query

 # SubscribeEvent
 #The subscribe event must be of type activ:SubscribeEvent.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:SubscribeEvent )
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }

 #The event must have one factor (the item subscribed to). It must
 #not be a bnode or literal. It may be a Brand or Series
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX po: <http://purl.org/ontology/po/>
 ASK {
   ?e event:factor ?p .
   OPTIONAL {?p rdf:type ?type }.
   FILTER ( ?type = po:Brand || ?type = po:Series )
   FILTER (!ISLITERAL(?p) && !ISBLANK(?p))
 }

 #The event must have an agent (the thing that subscribed to something),
 #which must have a URI. The agent may be of type foaf:Person or
 #foaf:Agent
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent ) .
   FILTER ( !ISLITERAL(?a) && !ISBLANK(?a) )
 }


 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
 }

TagEvent Validation Query

 #TagEvent
 #The tag event must be of type activ:TagEvent.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:TagEvent )
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }

 #The event must have one factor (the item tagged). It should
 #not be a literal or a bnode
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>  
 ASK {
   ?e event:factor ?p .
   FILTER (!ISLITERAL(?p) && !ISBLANK(?p))
 }
 
 #The event must have a product (output), which can be a literal or a URI
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 ASK {
   ?e event:product ?prod .
   OPTIONAL {?prod rdf:type ?et } .
   FILTER (!ISLITERAL(?prod) && !ISBLANK(?prod) ) .
 }

 #The event must have an agent (the thing that tagged), which must
 #have a URI. The agent may be of type foaf:Person or foaf:Agent
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent ) .
   FILTER ( !ISLITERAL(?a) && !ISBLANK(?a) )
 }
   
 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
}

UnfollowEvent Validation Query

 #UnfollowEvent

 #The unfollow event must be of type activ:UnfollowEvent.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:UnfollowEvent )
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }

 #The event must have one factor (the item unfollowed). It must
 #not be a literal or bnode. It may be a foaf:Person or foaf:Agent
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 ASK {
   ?e event:factor ?p .
   OPTIONAL {?p rdf:type ?ty } .
   FILTER (!ISLITERAL(?p) && !ISBLANK(?p))
   FILTER ( ?ty = foaf:Person || ?ty = foaf:Agent )
 }

 #The event must have an agent (the thing that blogged), which must have a URI.
 #The agent may be of type foaf:Person or foaf:Agent
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent ) .
   FILTER ( !ISLITERAL(?at) && !ISBLANK(?at) )
 }

 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
}

UnsubscribeEvent Validation Query

 # UnsubscribeEvent
 #The unsubscribe event must be of type activ:UnsubscribeEvent.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:UnsubscribeEvent )
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }

 #The event must have one factor (the item unsubscribed from). It must
 #not be a bnode or literal. It may be a Brand or Series
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX po: <http://purl.org/ontology/po/>
 ASK {
   ?e event:factor ?p .
   OPTIONAL {?p rdf:type ?type }.
   FILTER ( ?type = po:Brand || ?type = po:Series )
   FILTER (!ISLITERAL(?p) && !ISBLANK(?p))
 }

 #The event must have an agent (the thing that unsubscribed from something),
 #which must have a URI. The agent may be of type foaf:Person or
 #foaf:Agent
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent ) .
   FILTER ( !ISLITERAL(?a) && !ISBLANK(?a) )
 }


 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
 }

ViewEvent Validation Query

 #ViewEvent
 #The event must be of type activ:ViewEvent or one of its subclasses.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:WatchEvent || ?type = activ:ListenEvent ||
?type = activ:ReadEvent || ?type = activ:ViewEvent )
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }

 #The event must have one factor (the viewed item). The factor must not
 #be a literal or bnode. It may have a type.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 ASK {
   ?e event:factor ?p .
   FILTER (!ISLITERAL(?p) && !ISBLANK(?p))
   OPTIONAL {?p rdf:type ?type } .
   FILTER ( ?type = po:Episode || ?type = po:Programme || ?type =
po:Clip || ?type = po:Segment || ?type = mo:MusicalManifestation ||
?type = mo:MusicalWork || ?type = foaf:Document) .
 }
  
 #The event must have an agent (the thing that viewed something), which
 #must have a URI. The agent may be of type foaf:Person or foaf:Agent
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent ) .
   FILTER ( !ISLITERAL(?at) && !ISBLANK(?at) )
 }
   
 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
 }

WatchEvent Validation Query

 #WatchEvent
 #The event must be of type activ:WatchEvent.
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e rdf:type ?type .
   FILTER ( ?type = activ:WatchEvent )
 }

 #The event must have a human-readable rdfs:label.
 PREFIX rdfs:   <http://www.w3.org/2000/01/rdf-schema#>
 ASK {
   ?e rdfs:label ?s .
 }

 #The event must have one factor (the watched item). The factor must not
 #be a literal or bnode. It may be one of various types from the
 #programmes ontology
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX po: <http://purl.org/ontology/po/>
 ASK {
   ?e event:factor ?p .
   FILTER (!ISLITERAL(?p) && !ISBLANK(?p))
   OPTIONAL {?p rdf:type ?type } .
   FILTER ( ?type = po:Episode || ?type = po:Programme || ?type = po:Clip || ?type = po:Segment ) .
 }
  
 #The event must have an agent (the thing that watched something), which
 #must have a URI. The agent may be of type foaf:Person or foaf:Agent
 PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
 ASK {
   ?e event:agent ?a .
   OPTIONAL {?a rdf:type ?at }.
   FILTER ( ?at = foaf:Person || ?at = foaf:Agent ) .
   FILTER ( !ISLITERAL(?at) && !ISBLANK(?at) )
 }
   
 #The event must have a activ:time of datatype xsd:dateTime
 PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
 PREFIX activ:  <http://example.com/ontologies/activity/>
 ASK {
   ?e activ:time ?t .
   FILTER (datatype(?t) = xsd:dateTime) .
   FILTER regex(str(?t),"^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+\\d\\d:\\d\\d") .
 }

Notes

Aims of the ontology

Describe activity not attention data

Things the user has done: "I watched X" rather than "I'm watching X now"; hence on-demand rather than broadcast discovery, although describing what is being watched currently is not ruled out.

Support multiple types of activity; be extensible

At least: watch, listen, read, follow / unfollow rate? comment, love / hate, unlove / unhate; probably more later on.

Track atom activities work closely

The atom work is driven from strong usecases by prominant social sites, and is therefore useful and likely to become well-used.

Currently, atom activities use 'view' as a verb for both audio and video objects - for a video object 'view' maps to the RDF object 'WatchEvent'.

More generally, the verb is 'objectized' into an event.

The type of the thing consumed is explicit in the atom activity but not necessarily in the RDF version.

Example (partial):

<feed>
  <!-- guessing - it's maybe not a url -->
  <activity:subject>http://example.com/users/givp.rdf#me</activity:subject>
  <entry>
    <published>2009-06-10T09:21:58Z</published>
    <activity:object>
      <activity:object-type>http://activitystrea.ms/schema/1.0/movie</activity:object-type>
      <id>http://example.com/programmes/b00l5wdl#programme</id>
    </activity:object>
    <activity:verb>http://activitystrea.ms/schema/1.0/view</activity:verb>
  </entry>
</feed>

maps to (partial):

<rdf:RDF>
  <WatchEvent rdf:about="http://example.com/users/givp/activities/0003ff80808121a000121c9794ce60da">
    <event:agent rdf:resource="http://example.com/users/givp.rdf#me"/>
    <event:factor rdf:resource="http://example.com/programmes/b00l5wdl#programme"/>
    <start rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2009-06-10T09:21:58+00:00</activ:start>
  </WatchEvent>
</rdf:RDF>
Consider modelling changes over time
Decide whether we will ever need a watch event 'end'

Events are complex. Events typically have a birth, life and death, can subsume each other or overlap.

A simplifying assumption has been made to treat watch and listen events as atomic. Instead of events having a birth, life and death, for these types birth-life-death are modelled as an instant. After 15 seconds an activity is produced that says you have watched it. You can't unwatch it.

Conversely, follow and unfollow are modelled separately. If you follow someone, a 'follow' event is produced; if you unfollow them, an unfollow event is produced. In the meantime, you foaf:know that person. Similarly with love / unlove and hate / unhate; with the former you get a foaf:interest in the item.

This is a perfectly reasonable assumption *unless* for some reason the current attention part of the activity becomes a primary usecase, i.e. if live TV of some kind is essential; *or* if it's essential to know whether someone has watched all the way through. For the first of these, it could be possible to derive or approximate whether someone is currently watching something in other ways.

Evaluate how useful a hierarchy is in the model

Currently the model has some hierarchy. It's not clear whether this complexity is very useable or helpful. Because of the large scope of the model - potentially covering a broad swathe of human activity - hierarchies could be a modeling rathole. Some complexities around typing of events can be avoided using queries based on properties rather than types. Talis suggested adding multiple types to avoid the need for reasoning.

Confirm relationship with events ontology

Some activties don't produce a product; it needs to be confirmed whether this matches the events ontology (can product be optonal?)

Confirm whether a human-readable string is useful

The idea of activities is that sentences can be reconstructed in an appropriate language with the appropriate presentation - for example, "you did X" rather than "John did X" if the user is in fact John. So a human-readable equivalent is a convenience to be overridden at best.

Possibly think about a licensing statement

This data is commercially valuable. It would probably be a good idea to make sure that it is clear how it can be reused. License should probably not be at the individual event level, because it is in the aggregate that it becomes valuable.