~ubuntu-branches/ubuntu/quantal/zeitgeist/quantal

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# README:
#  * The Zeitgeist ontology does not spec out what a "subject" is because we
#    use Nepomuk to describe subjects. With the convention that
#    interpretation=InformationElement and manifestation=DataObject
#    FIXME: NFO might not specify an origin for a rdfs:Resource ??

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#>.
@prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#>.
@prefix nie: <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#>.
@prefix zg: <http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#>.

# interpretations

zg:EventInterpretation
    a rdfs:Class ;
    rdfs:comment "Base class for event interpretations. Please do no instantiate directly, but use one of the sub classes. The interpretation of an event describes 'what happened' - fx. 'something was created' or 'something was accessed'" ;
    rdfs:subClassOf nie:InformationElement .

zg:CreateEvent
    a rdfs:Class ;
    rdfs:comment "Event type triggered when an item is created" ;
    rdfs:subClassOf zg:EventInterpretation .

zg:AccessEvent
    a rdfs:Class ;
    rdfs:comment "Event triggered by opening, accessing, or starting a resource. Most zg:AccessEvents will have an accompanying zg:LeaveEvent, but this need not always be the case" ;
    rdfs:subClassOf zg:EventInterpretation .

zg:LeaveEvent
    a rdfs:Class ;
    rdfs:comment "Event triggered by closing, leaving, or stopping a resource. Most zg:LeaveEvents will be following a zg:Access event, but this need not always be the case" ;
    rdfs:subClassOf zg:EventInterpretation .

zg:ModifyEvent
    a rdfs:Class ;
    rdfs:comment "Event triggered by modifying an existing resources. Fx. when editing and saving a file on disk or correcting a typo in the name of a contact" ;
    rdfs:subClassOf zg:EventInterpretation .

zg:DeleteEvent
    a rdfs:Class ;
    rdfs:comment "Event triggered because a resource has been deleted or otherwise made permanently unavailable. Fx. when deleting a file. FIXME: How about when moving to trash?" ;
    rdfs:subClassOf zg:EventInterpretation .

zg:ReceiveEvent
    a rdfs:Class ;
    rdfs:comment "Event triggered when something is received from an external party. The event manifestation must be set according to the world view of the receiving party. Most often the item that is being received will be some sort of message - an email, instant message, or broadcasted media such as micro blogging" ;
    rdfs:subClassOf zg:EventInterpretation .

zg:SendEvent
    a rdfs:Class ;
    rdfs:comment "Event triggered when something is send to an external party. The event manifestation must be set according to the world view of the sending party. Most often the item that is being send will be some sort of message - an email, instant message, or broadcasted media such as micro blogging" ;
    rdfs:subClassOf zg:EventInterpretation .

zg:AcceptEvent
    a rdfs:Class ;
    rdfs:comment "Event triggered when the user accepts a request of some sort. Examples could be answering a phone call, accepting a file transfer, or accepting a friendship request over an IM protocol. See also DenyEvent for when the user denies a similar request" ;
    rdfs:subClassOf zg:EventInterpretation .

zg:DenyEvent
    a rdfs:Class ;
    rdfs:comment "Event triggered when the user denies a request of some sort. Examples could be rejecting a phone call, rejecting a file transfer, or denying a friendship request over an IM protocol. See also AcceptEvent for the converse event type" ;
    rdfs:subClassOf zg:EventInterpretation .

zg:ExpireEvent
    a rdfs:Class ;
    rdfs:comment "Event triggered when something expires or times out. These types of events are normally not triggered by the user, but by the operating system or some external party. Examples are a recurring calendar item or task deadline that expires or a when the user fails to respond to an external request such as a phone call" ;
    rdfs:subClassOf zg:EventInterpretation .
    
zg:MoveEvent
    a rdfs:Class ;
    rdfs:comment "Event triggered when a resource has been moved from a location to another. Fx. moving a file from a folder to another.";
    rdfs:subClassOf zg:EventInterpretation.
    

# manifestations

zg:EventManifestation
    a   rdfs:Class ;
    rdfs:comment "Base class for event manifestation types. Please do no instantiate directly, but use one of the sub classes. The manifestation of an event describes 'how it happened'. Fx. 'the user did this' or 'the system notified the user'" ;
    rdfs:subClassOf nie:DataObject .

zg:UserActivity
    a rdfs:Class ;
    rdfs:comment "An event that was actively performed by the user. For example saving or opening a file by clicking on it in the file manager" ;
    rdfs:subClassOf zg:EventManifestation .

zg:HeuristicActivity
    a rdfs:Class ;
    rdfs:comment "An event that is caused indirectly from user activity or deducted via analysis of other events. Fx. if an algorithm divides a user workflow into disjoint 'projects' based on temporal analysis it could insert heuristic events when the user changed project" ;
    rdfs:subClassOf zg:EventManifestation .

zg:ScheduledActivity
    a rdfs:Class ;
    rdfs:comment "An event that was directly triggered by some user initiated sequence of actions. For example a music player automatically changing to the next song in a playlist" ;
    rdfs:subClassOf zg:EventManifestation .

zg:WorldActivity
    a rdfs:Class ;
    rdfs:comment "An event that was performed by an entity, usually human or organization, other than the user. An example could be logging the activities of other people in a team" ;
    rdfs:subClassOf zg:EventManifestation .

zg:SystemNotification
    a rdfs:Class ;
    rdfs:comment "An event send to the user by the operating system. Examples could include when the user inserts a USB stick or when the system warns that the hard disk is full" ;
    rdfs:subClassOf zg:EventManifestation .

# event datastructure

zg:Event
    a rdfs:Class ;
    rdfs:comment "Something that happened at a point in time. Events are categorized by two primary factors 'what happened' - called the interpretation and 'how did it happen' - called the manifestation. Aside from a timestamp, events can also carry a reference to the entity responsible for instantiating it - called the actor. Normally the event actor is an application, but it need not be. Events happen to zero or more subjects. The subjects are described using the Nepomuk ontologies." ;
    rdfs:subClassOf rdfs:Resource .

zg:eventId
    a   rdf:Property ;
    rdfs:comment "A unique integer id assigned to an event by the logging framework when the event is first logged" ;
    rdfs:domain zg:Event ;
    rdfs:range xsd:nonNegativeInteger ;
    rdfs:label "id" ;        
    nrl:maxCardinality "1"^^xsd:nonNegativeInteger .

zg:timestamp
    a   rdf:Property ;
    rdfs:comment "Timestamp in milliseconds since the Unix Epoch" ;
    rdfs:domain zg:Event ;
    rdfs:range xsd:long ;
    rdfs:label "timestamp" ;        
    nrl:maxCardinality "1"^^xsd:nonNegativeInteger .

zg:hasActor
    a   rdf:Property ;
    rdfs:comment "The application or entity responsible for emitting the event. For applications the format of this field is the base filename of the corresponding .desktop file with an app:// URI scheme. For example /usr/share/applications/firefox.desktop is encoded as app://firefox.desktop" ;
    rdfs:domain zg:Event ;
    rdfs:range rdfs:Resource ;
    rdfs:label "actor" ;        
    nrl:maxCardinality "1"^^xsd:nonNegativeInteger .

zg:hasEventInterpretation
    a rdf:Property ;
    rdfs:domain zg:Event ;
    rdfs:range zg:EventInterpretation ;
    nrl:maxCardinality "1"^^xsd:nonNegativeInteger ;
    rdfs:label "interpretation" ;
    rdfs:subPropertyOf nie:interpretedAs .
    
zg:hasEventManifestation
    a rdf:Property ;
    rdfs:domain zg:Event ;
    rdfs:range zg:EventManifestation ;
    nrl:maxCardinality "1"^^xsd:nonNegativeInteger ;
    rdfs:label "manifestation" ;
    rdfs:subPropertyOf rdfs:type .

zg:hasSubject
    a rdf:Property ;
    rdfs:domain zg:Event ;
    rdfs:range rdfs:Resource ;
    rdfs:label "subject" .