@semapps/ontologies 0.6.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +3 -0
  3. package/actions/findPrefix.js +23 -0
  4. package/actions/get.js +32 -0
  5. package/actions/getPrefixes.js +12 -0
  6. package/actions/getRdfPrefixes.js +11 -0
  7. package/actions/list.js +11 -0
  8. package/actions/register.js +66 -0
  9. package/index.js +16 -0
  10. package/ontologies/core/acl.json +4 -0
  11. package/ontologies/core/as.json +6 -0
  12. package/ontologies/core/dc.json +16 -0
  13. package/ontologies/core/foaf.json +4 -0
  14. package/ontologies/core/index.js +14 -0
  15. package/ontologies/core/ldp.json +4 -0
  16. package/ontologies/core/rdf.json +4 -0
  17. package/ontologies/core/rdfs.json +4 -0
  18. package/ontologies/core/sec.json +45 -0
  19. package/ontologies/core/semapps.json +4 -0
  20. package/ontologies/core/vcard.json +15 -0
  21. package/ontologies/core/void.json +23 -0
  22. package/ontologies/core/xsd.json +4 -0
  23. package/ontologies/custom/index.js +11 -0
  24. package/ontologies/custom/mp.json +4 -0
  25. package/ontologies/custom/oasis.json +4 -0
  26. package/ontologies/custom/og.json +13 -0
  27. package/ontologies/custom/pair.json +328 -0
  28. package/ontologies/custom/petr.json +4 -0
  29. package/ontologies/custom/schema.json +4 -0
  30. package/ontologies/custom/skos.json +13 -0
  31. package/ontologies/custom/syreen.json +43 -0
  32. package/ontologies/custom/tutor.json +26 -0
  33. package/ontologies/solid/apods.json +55 -0
  34. package/ontologies/solid/index.js +1 -0
  35. package/ontologies/solid/interop.json +64 -0
  36. package/ontologies/solid/oidc.json +28 -0
  37. package/package.json +19 -0
  38. package/service.js +47 -0
  39. package/sub-services/registry.js +71 -0
  40. package/utils.js +19 -0
@@ -0,0 +1,328 @@
1
+ {
2
+ "prefix": "pair",
3
+ "namespace": "http://virtual-assembly.org/ontologies/pair#",
4
+ "owl": "http://virtual-assembly.org/ontologies/pair-2021-summer/ontology.ttl",
5
+ "jsonldContext": {
6
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
7
+ "pair:image": {
8
+ "@type": "@id"
9
+ },
10
+ "pair:isDepictedBy": {
11
+ "@type": "@id"
12
+ },
13
+
14
+ "pair:about": {
15
+ "@type": "@id"
16
+ },
17
+ "pair:activityOfInvolvement": {
18
+ "@type": "@id"
19
+ },
20
+ "pair:actorOfInvolvement": {
21
+ "@type": "@id"
22
+ },
23
+ "pair:actorOfMembership": {
24
+ "@type": "@id"
25
+ },
26
+ "pair:affiliates": {
27
+ "@type": "@id"
28
+ },
29
+ "pair:affiliatedBy": {
30
+ "@type": "@id"
31
+ },
32
+ "pair:agentResourceProperty": {
33
+ "@type": "@id"
34
+ },
35
+ "pair:aimedBy": {
36
+ "@type": "@id"
37
+ },
38
+ "pair:aims": {
39
+ "@type": "@id"
40
+ },
41
+ "pair:allowedBy": {
42
+ "@type": "@id"
43
+ },
44
+ "pair:allows": {
45
+ "@type": "@id"
46
+ },
47
+ "pair:assignedTo": {
48
+ "@type": "@id"
49
+ },
50
+ "pair:assigneeOf": {
51
+ "@type": "@id"
52
+ },
53
+ "pair:associationProperties": {
54
+ "@type": "@id"
55
+ },
56
+ "pair:branchOf": {
57
+ "@type": "@id"
58
+ },
59
+ "pair:topicOf": {
60
+ "@type": "@id"
61
+ },
62
+ "pair:challengeOf": {
63
+ "@type": "@id"
64
+ },
65
+ "pair:concernedBy": {
66
+ "@type": "@id"
67
+ },
68
+ "pair:concerns": {
69
+ "@type": "@id"
70
+ },
71
+ "pair:basedOn": {
72
+ "@type": "@id"
73
+ },
74
+ "pair:concretizedBy": {
75
+ "@type": "@id"
76
+ },
77
+ "pair:hasFollower": {
78
+ "@type": "@id"
79
+ },
80
+ "pair:follows": {
81
+ "@type": "@id"
82
+ },
83
+ "pair:consumedBy": {
84
+ "@type": "@id"
85
+ },
86
+ "pair:consumes": {
87
+ "@type": "@id"
88
+ },
89
+ "pair:containedIn": {
90
+ "@type": "@id"
91
+ },
92
+ "pair:contains": {
93
+ "@type": "@id"
94
+ },
95
+ "pair:cooperatesWith": {
96
+ "@type": "@id"
97
+ },
98
+ "pair:documents": {
99
+ "@type": "@id"
100
+ },
101
+ "pair:documentedBy": {
102
+ "@type": "@id"
103
+ },
104
+ "pair:domainOf": {
105
+ "@type": "@id"
106
+ },
107
+ "pair:producedBy": {
108
+ "@type": "@id"
109
+ },
110
+ "pair:operates": {
111
+ "@type": "@id"
112
+ },
113
+ "pair:operatedBy": {
114
+ "@type": "@id"
115
+ },
116
+ "pair:extendedBy": {
117
+ "@type": "@id"
118
+ },
119
+ "pair:extends": {
120
+ "@type": "@id"
121
+ },
122
+ "pair:hasActivityField": {
123
+ "@type": "@id"
124
+ },
125
+ "pair:hasBranch": {
126
+ "@type": "@id"
127
+ },
128
+ "pair:hasChallenge": {
129
+ "@type": "@id"
130
+ },
131
+ "pair:hasConceptType": {
132
+ "@type": "@id"
133
+ },
134
+ "pair:hasDomain": {
135
+ "@type": "@id"
136
+ },
137
+ "pair:hasInspired": {
138
+ "@type": "@id"
139
+ },
140
+ "pair:hasObjectType": {
141
+ "@type": "@id"
142
+ },
143
+ "pair:hasOrigin": {
144
+ "@type": "@id"
145
+ },
146
+ "pair:hasPart": {
147
+ "@type": "@id"
148
+ },
149
+ "pair:hasSector": {
150
+ "@type": "@id"
151
+ },
152
+ "pair:hasSkill": {
153
+ "@type": "@id"
154
+ },
155
+ "pair:hasStatus": {
156
+ "@type": "@id"
157
+ },
158
+ "pair:hasSubactivity": {
159
+ "@type": "@id"
160
+ },
161
+ "pair:hasSubjectType": {
162
+ "@type": "@id"
163
+ },
164
+ "pair:hosts": {
165
+ "@type": "@id"
166
+ },
167
+ "pair:hostedIn": {
168
+ "@type": "@id"
169
+ },
170
+ "pair:brainstorms": {
171
+ "@type": "@id"
172
+ },
173
+ "pair:brainstormedBy": {
174
+ "@type": "@id"
175
+ },
176
+ "pair:involves": {
177
+ "@type": "@id"
178
+ },
179
+ "pair:involvedIn": {
180
+ "@type": "@id"
181
+ },
182
+ "pair:inspiredBy": {
183
+ "@type": "@id"
184
+ },
185
+ "pair:intendedBy": {
186
+ "@type": "@id"
187
+ },
188
+ "pair:intends": {
189
+ "@type": "@id"
190
+ },
191
+ "pair:interExtentionalSubjectProperty": {
192
+ "@type": "@id"
193
+ },
194
+ "pair:interObjectProperty": {
195
+ "@type": "@id"
196
+ },
197
+ "pair:involvementActivity": {
198
+ "@type": "@id"
199
+ },
200
+ "pair:involvementActor": {
201
+ "@type": "@id"
202
+ },
203
+ "pair:involvementRole": {
204
+ "@type": "@id"
205
+ },
206
+ "pair:membershipActor": {
207
+ "@type": "@id"
208
+ },
209
+ "pair:membershipOrganization": {
210
+ "@type": "@id"
211
+ },
212
+ "pair:membershipRole": {
213
+ "@type": "@id"
214
+ },
215
+ "pair:mobilizes": {
216
+ "@type": "@id"
217
+ },
218
+ "pair:moblizedBy": {
219
+ "@type": "@id"
220
+ },
221
+ "pair:nourishes": {
222
+ "@type": "@id"
223
+ },
224
+ "pair:needs": {
225
+ "@type": "@id"
226
+ },
227
+ "pair:neededBy": {
228
+ "@type": "@id"
229
+ },
230
+ "pair:objectSubjectProperty": {
231
+ "@type": "@id"
232
+ },
233
+ "pair:offeredBy": {
234
+ "@type": "@id"
235
+ },
236
+ "pair:organizationOfMembership": {
237
+ "@type": "@id"
238
+ },
239
+ "pair:originOf": {
240
+ "@type": "@id"
241
+ },
242
+ "pair:partOf": {
243
+ "@type": "@id"
244
+ },
245
+ "pair:partnerOf": {
246
+ "@type": "@id"
247
+ },
248
+ "pair:produces": {
249
+ "@type": "@id"
250
+ },
251
+ "pair:offers": {
252
+ "@type": "@id"
253
+ },
254
+ "pair:represents": {
255
+ "@type": "@id"
256
+ },
257
+ "pair:representedBy": {
258
+ "@type": "@id"
259
+ },
260
+ "pair:referencedBy": {
261
+ "@type": "@id"
262
+ },
263
+ "pair:references": {
264
+ "@type": "@id"
265
+ },
266
+ "pair:sectorOf": {
267
+ "@type": "@id"
268
+ },
269
+ "pair:solvedBy": {
270
+ "@type": "@id"
271
+ },
272
+ "pair:solves": {
273
+ "@type": "@id"
274
+ },
275
+ "pair:subactivityOf": {
276
+ "@type": "@id"
277
+ },
278
+ "pair:subjectConceptProperties": {
279
+ "@type": "@id"
280
+ },
281
+ "pair:supportedBy": {
282
+ "@type": "@id"
283
+ },
284
+ "pair:supports": {
285
+ "@type": "@id"
286
+ },
287
+ "pair:typeOf": {
288
+ "@type": "@id"
289
+ },
290
+ "pair:typeOfConcept": {
291
+ "@type": "@id"
292
+ },
293
+ "pair:typeOfObject": {
294
+ "@type": "@id"
295
+ },
296
+ "pair:typeOfSubject": {
297
+ "@type": "@id"
298
+ },
299
+ "pair:usedBy": {
300
+ "@type": "@id"
301
+ },
302
+ "pair:uses": {
303
+ "@type": "@id"
304
+ },
305
+ "pair:hasTopic": {
306
+ "@type": "@id"
307
+ },
308
+ "pair:hasType": {
309
+ "@type": "@id"
310
+ },
311
+ "pair:hasLocation": {
312
+ "@type": "@id"
313
+ },
314
+ "pair:locationOf": {
315
+ "@type": "@id"
316
+ },
317
+
318
+ "pair:startDate": {
319
+ "@type": "xsd:dateTime"
320
+ },
321
+ "pair:endDate": {
322
+ "@type": "xsd:dateTime"
323
+ },
324
+ "pair:dueDate": {
325
+ "@type": "xsd:dateTime"
326
+ }
327
+ }
328
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "prefix": "petr",
3
+ "namespace": "https://data.petr-msb.data-players.com/ontology#"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "prefix": "schema",
3
+ "namespace": "http://schema.org/"
4
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "prefix": "skos",
3
+ "namespace": "http://www.w3.org/2004/02/skos/core#",
4
+ "owl": "https://raw.githubusercontent.com/openlink/rdf-editor/develop/app/data/skos.ttl",
5
+ "jsonldContext": {
6
+ "skos:broader": {
7
+ "@type": "@id"
8
+ },
9
+ "skos:narrower": {
10
+ "@type": "@id"
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "prefix": "syreen",
3
+ "namespace": "http://syreen.fr/ns/core#",
4
+ "jsonldContext": {
5
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
6
+ "syreen:hasPart": {
7
+ "@type": "@id"
8
+ },
9
+ "syreen:actor": {
10
+ "@type": "@id"
11
+ },
12
+ "syreen:partOf": {
13
+ "@type": "@id"
14
+ },
15
+ "syreen:depictedBy": {
16
+ "@type": "@id"
17
+ },
18
+ "syreen:hasLocation": {
19
+ "@type": "@id"
20
+ },
21
+ "syreen:hasCategory": {
22
+ "@type": "@id"
23
+ },
24
+ "syreen:hasBatiprixCategory": {
25
+ "@type": "@id"
26
+ },
27
+ "syreen:hasUnit": {
28
+ "@type": "@id"
29
+ },
30
+ "syreen:hasStage": {
31
+ "@type": "@id"
32
+ },
33
+ "syreen:hasProjectType": {
34
+ "@type": "@id"
35
+ },
36
+ "syreen:startDate": {
37
+ "@type": "xsd:dateTime"
38
+ },
39
+ "syreen:endDate": {
40
+ "@type": "xsd:dateTime"
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "prefix": "tutor",
3
+ "namespace": "http://virtual-assembly.org/ontologies/pair-tutor#",
4
+ "owl": "https://raw.githubusercontent.com/reconnexion/minicourses/master/ontology/pair-tutor.owl",
5
+ "jsonldContext": {
6
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
7
+ "tutor:currentLesson": {
8
+ "@type": "@id"
9
+ },
10
+ "tutor:hasRegistration": {
11
+ "@type": "@id"
12
+ },
13
+ "tutor:registeredFor": {
14
+ "@type": "@id"
15
+ },
16
+ "tutor:registrant": {
17
+ "@type": "@id"
18
+ },
19
+ "tutor:registrationFor": {
20
+ "@type": "@id"
21
+ },
22
+ "tutor:lessonStarted": {
23
+ "@type": "xsd:dateTime"
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "prefix": "apods",
3
+ "namespace": "http://activitypods.org/ns/core#",
4
+ "jsonldContext": {
5
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
6
+ "apods:closingTime": {
7
+ "@type": "xsd:dateTime"
8
+ },
9
+ "apods:hasFormat": {
10
+ "@type": "@id"
11
+ },
12
+ "apods:hasStatus": {
13
+ "@type": "@id"
14
+ },
15
+ "apods:contacts": {
16
+ "@type": "@id"
17
+ },
18
+ "apods:contactRequests": {
19
+ "@type": "@id"
20
+ },
21
+ "apods:ignoredContacts": {
22
+ "@type": "@id"
23
+ },
24
+ "apods:rejectedContacts": {
25
+ "@type": "@id"
26
+ },
27
+ "apods:announces": {
28
+ "@type": "@id"
29
+ },
30
+ "apods:announcers": {
31
+ "@type": "@id"
32
+ },
33
+ "apods:attendees": {
34
+ "@type": "@id"
35
+ },
36
+ "apods:preferredForTypes": {
37
+ "@type": "@id"
38
+ },
39
+ "apods:application": {
40
+ "@type": "@id"
41
+ },
42
+ "apods:hasSpecialRights": {
43
+ "@type": "@id"
44
+ },
45
+ "apods:acceptedAccessNeeds": {
46
+ "@type": "@id"
47
+ },
48
+ "apods:acceptedSpecialRights": {
49
+ "@type": "@id"
50
+ },
51
+ "apods:registeredClass": {
52
+ "@type": "@id"
53
+ }
54
+ }
55
+ }
@@ -0,0 +1 @@
1
+ module.exports = { apods: require('./apods.json'), interop: require('./interop.json'), oidc: require('./oidc.json') };
@@ -0,0 +1,64 @@
1
+ {
2
+ "prefix": "interop",
3
+ "namespace": "http://www.w3.org/ns/solid/interop#",
4
+ "jsonldContext": {
5
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
6
+ "interop:accessNecessity": {
7
+ "@type": "@id"
8
+ },
9
+ "interop:accessMode": {
10
+ "@type": "@id"
11
+ },
12
+ "interop:accessScenario": {
13
+ "@type": "@id"
14
+ },
15
+ "interop:applicationAuthor": {
16
+ "@type": "@id"
17
+ },
18
+ "interop:authenticatedAs": {
19
+ "@type": "@id"
20
+ },
21
+ "interop:dataOwner": {
22
+ "@type": "@id"
23
+ },
24
+ "interop:grantedAt": {
25
+ "@type": "xsd:dateTime"
26
+ },
27
+ "interop:grantedBy": {
28
+ "@type": "@id"
29
+ },
30
+ "interop:grantee": {
31
+ "@type": "@id"
32
+ },
33
+ "interop:hasAccessGrant": {
34
+ "@type": "@id"
35
+ },
36
+ "interop:hasAccessNeed": {
37
+ "@type": "@id"
38
+ },
39
+ "interop:hasAccessNeedGroup": {
40
+ "@type": "@id"
41
+ },
42
+ "interop:hasDataGrant": {
43
+ "@type": "@id"
44
+ },
45
+ "interop:satisfiesAccessNeed": {
46
+ "@type": "@id"
47
+ },
48
+ "interop:scopeOfGrant": {
49
+ "@type": "@id"
50
+ },
51
+ "interop:registeredAgent": {
52
+ "@type": "@id"
53
+ },
54
+ "interop:registeredAt": {
55
+ "@type": "xsd:dateTime"
56
+ },
57
+ "interop:registeredBy": {
58
+ "@type": "@id"
59
+ },
60
+ "interop:updatedAt": {
61
+ "@type": "@id"
62
+ }
63
+ }
64
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "prefix": "oidc",
3
+ "namespace": "http://www.w3.org/ns/solid/oidc#",
4
+ "jsonldContext": {
5
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
6
+ "oidc:client_uri": {
7
+ "@type": "@id"
8
+ },
9
+ "oidc:logo_uri": {
10
+ "@type": "@id"
11
+ },
12
+ "oidc:policy_uri": {
13
+ "@type": "@id"
14
+ },
15
+ "oidc:tos_uri": {
16
+ "@type": "@id"
17
+ },
18
+ "oidc:redirect_uris": {
19
+ "@type": "@id"
20
+ },
21
+ "oidc:require_auth_time": {
22
+ "@type": "xsd:boolean"
23
+ },
24
+ "oidc:default_max_age": {
25
+ "@type": "xsd:integer"
26
+ }
27
+ }
28
+ }
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@semapps/ontologies",
3
+ "version": "0.6.0-alpha.5",
4
+ "description": "SemApps ontologies",
5
+ "license": "Apache-2.0",
6
+ "author": "Virtual Assembly",
7
+ "dependencies": {
8
+ "@semapps/triplestore": "0.6.0-alpha.5",
9
+ "moleculer-db": "^0.8.16",
10
+ "node-fetch": "^2.6.6"
11
+ },
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "engines": {
16
+ "node": ">=14"
17
+ },
18
+ "gitHead": "414ac397e95e469019abecf11d404b1b489415a6"
19
+ }
package/service.js ADDED
@@ -0,0 +1,47 @@
1
+ const { TripleStoreAdapter } = require('@semapps/triplestore');
2
+ const OntologiesRegistryService = require('./sub-services/registry');
3
+ const findPrefixAction = require('./actions/findPrefix');
4
+ const getAction = require('./actions/get');
5
+ const getPrefixesAction = require('./actions/getPrefixes');
6
+ const getRdfPrefixesAction = require('./actions/getRdfPrefixes');
7
+ const listAction = require('./actions/list');
8
+ const registerAction = require('./actions/register');
9
+
10
+ module.exports = {
11
+ name: 'ontologies',
12
+ settings: {
13
+ ontologies: [],
14
+ persistRegistry: false,
15
+ settingsDataset: 'settings'
16
+ },
17
+ async created() {
18
+ const { persistRegistry, settingsDataset } = this.settings;
19
+ if (persistRegistry) {
20
+ await this.broker.createService(OntologiesRegistryService, {
21
+ adapter: new TripleStoreAdapter({ type: 'Ontology', dataset: settingsDataset })
22
+ });
23
+ }
24
+ },
25
+ async started() {
26
+ if (!this.settings.persistRegistry) this.ontologies = {};
27
+
28
+ // Do not await to avoid circular dependency with jsonld service
29
+ this.registerAll();
30
+ },
31
+ actions: {
32
+ findPrefix: findPrefixAction,
33
+ get: getAction,
34
+ getPrefixes: getPrefixesAction,
35
+ getRdfPrefixes: getRdfPrefixesAction,
36
+ list: listAction,
37
+ register: registerAction
38
+ },
39
+ methods: {
40
+ async registerAll() {
41
+ if (this.settings.persistRegistry) await this.broker.waitForServices(['ontologies.registry']);
42
+ for (const ontology of this.settings.ontologies) {
43
+ await this.actions.register({ ...ontology, overwrite: true });
44
+ }
45
+ }
46
+ }
47
+ };