forked from SolidOS/solid-panes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwf.js
More file actions
362 lines (289 loc) · 13.1 KB
/
Copy pathwf.js
File metadata and controls
362 lines (289 loc) · 13.1 KB
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
module.exports = `
# Issue tracking - Worksflow application definiion ontology
#
# Finite state automaton ontology
#
# See requirements for tracking tools http://www.w3.org/2005/01/06-tool-req.html
#
@keywords a, is, of.
@prefix : <http://www.w3.org/2005/01/wf/flow#>.
@prefix wf: <http://www.w3.org/2005/01/wf/flow#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix s: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix doc: <http://www.w3.org/2000/10/swap/pim/doc#> .
@prefix log: <http://www.w3.org/2000/10/swap/log#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix contact: <http://www.w3.org/2000/10/swap/pim/contact#> .
@prefix doap: <http://usefulinc.com/ns/doap#>.
@prefix dc: <http://purl.org/dc/elements/1.1/>.
@prefix dct: <http://purl.org/dc/terms/>.
<> dc:title "Issue Tracking Ontology";
dct:creator <http://www.w3.org/People/Berners-Lee/card#i>;
s:comment """This ontology defines a very general class (Task)
which can used for any kind of bug tracking, issue tracking,
to-do-list management, action items, goal depednency, and so on.
It captures the state of a task as a subclass, so that
subsumption can be used.
It captures a discussion thread about a task.
It captures subtasks structure if necessary.
A "Tracker" defines actual set of states, categories, etc.,
which a task can be in. The data about the tracker
guides the software managing the task.
There is some workflow modeling finite state machine
terms which are optional for more complex definition
of the transitions allowed.
""".
Task a s:Class;
s:label "task"@en; owl:disjointUnionOf (Open Closed);
s:comment """Something to be done in a wide sense,
an agenda item at a meeting is one example, but any
issue, task, action item, goal, product, deliverable, milestone, can such a thing.
The requirement for this framework was that it would allow
one to customize ontologies for things such as agenda items,
action items, working group issues with a spec, w3c Last Call issues,
software bugs and administrative requests.
In π-calculus, a process.
Make your type of issue a subclass of Task.
""".
Open a s:Class; s:subClassOf Task;
s:label "open"@en, "ouvert"@fr;
s:comment """A task which needs attention. The very crude states of Open and Closed all
interoperatbility between different systems if the states for a given
application are made subclasses of either Open or Closed. This allows
tasks from different systems to be mixed and treatd together with
limited but valuable functionality.
""".
Closed a s:Class; s:subClassOf Task;
s:label "closed"@en, "fermé"@fr;
s:comment """A task which does not neeed attention. It may be closed because
has been abandonned or completed, for example.
""".
description a rdf:Property;
s:label "description";
s:comment """The description, definition,
or abstract. Information explaining what this is.
Not arbitrary comment about anything, only about the subject.
(Use this property for anything. There is no domain restriction.).""".
dependent a rdf:Property;
s:label "how"; owl:inverseOf [ s:label "why"];
s:domain Task; s:range Task;
s:comment """Another task upon which this depends, in the sense that
this task cannot be completed without that task being done.
You can't use this for dependencies on anything other than other tasks.
(Note the US spelling of the URI. In the UK, a dependant is a something
which is dependent on somehing else.)""".
assignee a rdf:Property;
s:label "assigned to"; owl:inverseOf [s:label "assignment"];
# s:domain Task;
s:range foaf:Agent;
s:comment """The person or group to whom this has been assigned.""".
# use dct:modified
#modified a rdf:Property;
# s:label "last changed".
modifiedBy a rdf:Property;
s:range foaf:Agent;
s:label "changed by".
# use dct:created instead
#created a rdf:Property;
# s:range xsd:dateTime;
#
# Use foaf:maker instead
#creator a rdf:Property;
# s:range foaf:Agent;
# s:label "changed by".
subscriber a rdf:Property;
s:label "subscriber";
s:range foaf:Agent.
################## Products
#
#
# History: The Tracker system included a cocept of a product,
# such that an action could be associated with *either* an issue *or* a product.
# Noah Mendelsohn for the TAG needed to be able make
# and to give products: Goals, scuuess criteria,
# deliverables with dates, schedules, TAG members assigned, related issues.
#
Product a s:Class; s:subClassOf Task;
s:label "product";
s:comment """A product is a task which monitors something
which must be produced.""".
deliverable a rdf:Property; s:subPropertyOf dependent;
s:range Product;
s:label "deliverable"@en;
s:comment """Something which must be deliverered to accomplish this""".
goalDescription a rdf:Property, owl:DatatypeProperty;
s:domain Task; s:range xsd:string;
s:label "goals";
s:comment """A textual description of the goals of this product, etc.""".
successCriteria a rdf:Property, owl:DatatypeProperty;
s:domain Task; s:range xsd:string;
s:label "success criteria";
s:comment """A textual description of the successs critera.
How when we know this is done?""".
dateDue a rdf:Property, owl:DatatypeProperty;
s:domain Task; s:range xsd:date;
s:label "due"@en;
s:comment """The date this task is due.
""".
################## Attachments
attachment a rdf:Property;
s:label "attachment";
s:comment """Something related is attached for information.""".
screenShot a rdf:Property; s:subPropertyOf attachment;
s:label "screen shot"@en;
s:comment """An image taken by capturing the state of a
computer screen, for example to demonstrate a problem""".
testData a rdf:Property; s:subPropertyOf attachment;
s:label "test data"@en;
s:comment """A file which can be used as inpiut to a test
or to demonstrate a problem. """.
terminalOutput a rdf:Property; s:subPropertyOf attachment;
s:label "terminal output"@en;
s:comment """A file showing user interaction from a
text terminal or console etc. """.
message a rdf:Property; s:subPropertyOf attachment;
s:label "message"@en;
s:comment """A message about this. Attached for information.""".
Message a s:Class; s:label "message"@en.
recipent a rdf:Property; s:label "to"; s:domain Message; s:range foaf:Agent.
sender a rdf:Property; s:label "from"; s:domain Message; s:range foaf:Agent.
############################# A Tracker connects and manages issues
tracker a rdf:Property;
s:label "tracker";
owl:inverseOf [ s:label "issue"];
s:domain Task;
s:range Tracker.
Tracker a s:Class;
s:label "tracker";
s:comment """A set of issues and
the constraints on how they evolve.
To use this ontology, craete a new tracker.
Copy an existing one or make up your own.""".
issueClass a rdf:Property;
s:label "all issues must be in";
s:domain Tracker;
s:range s:Class, State;
s:comment """The class of issues which are allowed in this tracker.
This is essemtial to the operation of the tracker,
as it defines which states an issue can be in.
(The issueClass must be a disjointUnionOf the state classes)""".
issueCategory a rdf:Property;
s:label "issue category";
s:domain Tracker;
s:range s:Class;
s:comment """Issues may be categorized according to the
subclasses of this class""".
stateStore a rdf:Property;
s:label "state store";
s:domain Tracker;
s:range doc:Document;
s:comment """A read-write document.
The state of the issues is modified here.
When you set up a trcaker, thgis must be set to point
to a writeble data resource on the web.""".
transactionStore
a rdf:Property;
s:label "transaction store";
s:domain Tracker;
s:range doc:Document;
s:comment """An appendable document. Transactions and messsages
can be written into here""".
asigneeClass
a rdf:Property;
s:label "assignees must be";
s:domain Tracker;
s:range s:Class; # Subclass of foaf:Agent
s:comment """When an issue is assigned, the assignee must be from this class""".
initialState
a rdf:Property;
s:label "initial state"@en;
s:label "état initial"@fr;
s:domain Tracker;
s:range State;
s:comment """The initial state for a new issue""".
# Use this to link a project to a tracker
doap:bug-database owl:inverseOf [ s:label "project"@en ].
############################################################
#
# Finite state machines
#
Change a s:Class;
s:label "change";
s:comment """The universal class of things which
change the state of a task.
Included now: Creation, Transition. (Maybe in the future
more π-calculus constructions such as splitting & merging tasks,
and import/export of obligations to a foreign opaque system.)
""".
Transition a s:Class; s:subClassOf Change;
s:label "transition";
s:comment """A transition is a change of state of
a task. Typical properties include date and/or source
(a document causing the transition), and a final state.""".
Creation a s:Class; s:subClassOf Change;
s:label "creation";
s:comment """A creation is a change from existence
to non-existence
a task. Typical properties include date and/or source
(a document causing the transition), and a final state.""".
date s:range DateTime.
final a rdf:Property;
s:label "to";
s:domain Transition;
s:range State.
task a rdf:Property;
s:range Task;
s:label "task".
requires a rdf:Property;
s:label "requires";
s:domain Transition;
s:range rdf:List; # Of properties for validation
s:comment """To be a valid transition,
a necessary (but not necessarily sufficuent) condition
is that there be recorded these properties for the record""".
affects a rdf:Property;
s:label "affects";
s:domain doc:Work;
s:range Task.
# { ?x a Transition; task ?t; source ?doc } => { ?doc affects ?t }.
creates a rdf:Property;
s:label "creates";
s:domain doc:Work;
s:range Task.
allowedTransitions a rdf:Property;
s:domain State;
s:range rdf:List; # @@@ of Action
s:label "allowed transitions";
s:comment """The state machine is defined
by these lists of transition allowed for each issue.
(An interesting option in the Web is to make an allowed transition
to a state in soemone else's ontology, which in turn allows
transitions into many ontologies. So a finite state maxchine
may become very large. In practice this means that a task handed
off to another organization may be processed on all kinds of ways.)""".
# { ?x a TerminalState} => { ?x allowedTransitions () }.
final a rdf:Property;
s:label "to";
s:range State.
issue a rdf:Property;
s:label "issue";
s:comment
"""A transition changes the state of the given issue.""".
source a rdf:Property;
s:label "source";
s:comment """The source of a transition is
the document by which it happened""";
s:range doc:Work.
TerminalState a s:Class;
s:subClassOf State;
s:label "terminal state";
s:comment """A state from which there are no transisions.""".
NonTerminalState a s:Class;
s:label "non-terminal state";
owl:disjointWith TerminalState;
s:comment """A state from which there are transisions.""".
######################################################
#ends
`