@singi-labs/sifa-sdk 0.12.69 → 0.12.71

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.
@@ -1,465 +1,452 @@
1
1
  'use strict';
2
2
 
3
- // src/jsonld/terms.ts
4
- var VOCABULARIES = {
5
- schema: "https://schema.org/",
6
- bibo: "http://purl.org/ontology/bibo/",
7
- dcterms: "http://purl.org/dc/terms/",
8
- foaf: "http://xmlns.com/foaf/0.1/",
9
- org: "http://www.w3.org/ns/org#",
10
- prism: "http://prismstandard.org/namespaces/basic/2.1/",
11
- event: "http://purl.org/NET/c4dm/event.owl#",
12
- skos: "http://www.w3.org/2004/02/skos/core#"
3
+ // src/jsonld/term-mappings.json
4
+ var term_mappings_default = {
5
+ vocabularies: {
6
+ schema: "https://schema.org/",
7
+ bibo: "http://purl.org/ontology/bibo/",
8
+ dcterms: "http://purl.org/dc/terms/",
9
+ foaf: "http://xmlns.com/foaf/0.1/",
10
+ org: "http://www.w3.org/ns/org#",
11
+ prism: "http://prismstandard.org/namespaces/basic/2.1/",
12
+ event: "http://purl.org/NET/c4dm/event.owl#",
13
+ skos: "http://www.w3.org/2004/02/skos/core#"
14
+ },
15
+ mappings: [
16
+ {
17
+ lexicon: "id.sifa.org.profile",
18
+ match: "exactMatch",
19
+ terms: ["schema:Organization", "org:FormalOrganization"],
20
+ note: "ROR is the value anchor."
21
+ },
22
+ {
23
+ lexicon: "id.sifa.profile.certification",
24
+ match: "exactMatch",
25
+ terms: ["schema:EducationalOccupationalCredential"]
26
+ },
27
+ {
28
+ lexicon: "id.sifa.profile.certification",
29
+ field: "credentialUrl",
30
+ match: "exactMatch",
31
+ terms: ["schema:url"]
32
+ },
33
+ {
34
+ lexicon: "id.sifa.profile.certification",
35
+ field: "expiresAt",
36
+ match: "exactMatch",
37
+ terms: ["schema:validUntil"]
38
+ },
39
+ {
40
+ lexicon: "id.sifa.profile.course",
41
+ match: "exactMatch",
42
+ terms: ["schema:Course"]
43
+ },
44
+ {
45
+ lexicon: "id.sifa.profile.course",
46
+ field: "number",
47
+ match: "exactMatch",
48
+ terms: ["schema:courseCode"]
49
+ },
50
+ {
51
+ lexicon: "id.sifa.profile.education",
52
+ match: "closeMatch",
53
+ terms: ["schema:EducationalOccupationalCredential"],
54
+ note: "One record maps to two schema.org assertions: alumniOf for the institution and hasCredential for the degree."
55
+ },
56
+ {
57
+ lexicon: "id.sifa.profile.education",
58
+ field: "degree",
59
+ match: "closeMatch",
60
+ terms: ["schema:hasCredential", "bibo:degree"]
61
+ },
62
+ {
63
+ lexicon: "id.sifa.profile.education",
64
+ field: "fieldOfStudy",
65
+ match: "closeMatch",
66
+ terms: ["schema:educationalCredentialAwarded"],
67
+ note: "ISCED-F is the value anchor."
68
+ },
69
+ {
70
+ lexicon: "id.sifa.profile.education",
71
+ field: "institution",
72
+ match: "exactMatch",
73
+ terms: ["schema:alumniOf"]
74
+ },
75
+ {
76
+ lexicon: "id.sifa.profile.externalAccount",
77
+ match: "exactMatch",
78
+ terms: ["schema:sameAs", "foaf:account"]
79
+ },
80
+ {
81
+ lexicon: "id.sifa.profile.honor",
82
+ match: "broadMatch",
83
+ terms: ["schema:award"],
84
+ note: "schema:award is a bare string, so issuer and date are lost. No better term exists in BIBO either."
85
+ },
86
+ {
87
+ lexicon: "id.sifa.profile.involvement",
88
+ match: "broadMatch",
89
+ terms: ["org:Membership"],
90
+ note: "The kind known values have no external equivalent."
91
+ },
92
+ {
93
+ lexicon: "id.sifa.profile.language",
94
+ match: "exactMatch",
95
+ terms: ["schema:knowsLanguage"]
96
+ },
97
+ {
98
+ lexicon: "id.sifa.profile.position",
99
+ match: "closeMatch",
100
+ terms: ["org:Membership", "schema:OrganizationRole"]
101
+ },
102
+ {
103
+ lexicon: "id.sifa.profile.position",
104
+ field: "company",
105
+ match: "exactMatch",
106
+ terms: ["org:organization", "schema:worksFor"]
107
+ },
108
+ {
109
+ lexicon: "id.sifa.profile.position",
110
+ field: "description",
111
+ match: "exactMatch",
112
+ terms: ["dcterms:description"]
113
+ },
114
+ {
115
+ lexicon: "id.sifa.profile.position",
116
+ field: "employmentType",
117
+ match: "closeMatch",
118
+ terms: ["schema:employmentType"],
119
+ note: "schema:employmentType is free text. ESCO is the better value anchor."
120
+ },
121
+ {
122
+ lexicon: "id.sifa.profile.position",
123
+ field: "endedAt",
124
+ match: "exactMatch",
125
+ terms: ["schema:endDate"]
126
+ },
127
+ {
128
+ lexicon: "id.sifa.profile.position",
129
+ field: "entityRef",
130
+ match: "closeMatch",
131
+ terms: ["schema:sameAs"]
132
+ },
133
+ {
134
+ lexicon: "id.sifa.profile.position",
135
+ field: "location",
136
+ match: "exactMatch",
137
+ terms: ["schema:jobLocation"]
138
+ },
139
+ {
140
+ lexicon: "id.sifa.profile.position",
141
+ field: "startedAt",
142
+ match: "exactMatch",
143
+ terms: ["schema:startDate"]
144
+ },
145
+ {
146
+ lexicon: "id.sifa.profile.position",
147
+ field: "title",
148
+ match: "exactMatch",
149
+ terms: ["org:role", "schema:roleName"]
150
+ },
151
+ {
152
+ lexicon: "id.sifa.profile.position",
153
+ field: "workplaceType",
154
+ match: "narrowMatch",
155
+ terms: ["schema:jobLocationType"],
156
+ note: "schema.org models only a remote flag; Sifa distinguishes onSite, remote, and hybrid."
157
+ },
158
+ {
159
+ lexicon: "id.sifa.profile.presentation",
160
+ match: "closeMatch",
161
+ terms: ["bibo:Slideshow", "schema:PresentationDigitalDocument"],
162
+ note: 'Neither term carries the "reusable, deliverable more than once" semantics of the Sifa record.'
163
+ },
164
+ {
165
+ lexicon: "id.sifa.profile.presentation",
166
+ field: "coverImage",
167
+ match: "exactMatch",
168
+ terms: ["schema:image", "foaf:depiction"]
169
+ },
170
+ {
171
+ lexicon: "id.sifa.profile.presentation",
172
+ field: "description",
173
+ match: "exactMatch",
174
+ terms: ["bibo:abstract", "schema:abstract"]
175
+ },
176
+ {
177
+ lexicon: "id.sifa.profile.presentation",
178
+ field: "duration",
179
+ match: "narrowMatch",
180
+ terms: ["schema:timeRequired"],
181
+ note: "The lexicon models a range; schema:timeRequired is a single ISO 8601 duration."
182
+ },
183
+ {
184
+ lexicon: "id.sifa.profile.presentation",
185
+ field: "intendedAudiences",
186
+ match: "closeMatch",
187
+ terms: ["schema:audience"]
188
+ },
189
+ {
190
+ lexicon: "id.sifa.profile.presentation",
191
+ field: "title",
192
+ match: "exactMatch",
193
+ terms: ["dcterms:title", "schema:name"]
194
+ },
195
+ {
196
+ lexicon: "id.sifa.profile.presentation",
197
+ field: "writeupRef",
198
+ match: "closeMatch",
199
+ terms: ["dcterms:isReferencedBy", "schema:subjectOf"]
200
+ },
201
+ {
202
+ lexicon: "id.sifa.profile.presentationDelivery",
203
+ match: "closeMatch",
204
+ terms: ["schema:Event", "event:Event"],
205
+ note: "BIBO models this relation as bibo:Slideshow bibo:presentedAt event:Event."
206
+ },
207
+ {
208
+ lexicon: "id.sifa.profile.presentationDelivery",
209
+ field: "address",
210
+ match: "exactMatch",
211
+ terms: ["schema:location", "event:place"]
212
+ },
213
+ {
214
+ lexicon: "id.sifa.profile.presentationDelivery",
215
+ field: "coSpeakers",
216
+ match: "exactMatch",
217
+ terms: ["schema:performer"]
218
+ },
219
+ {
220
+ lexicon: "id.sifa.profile.presentationDelivery",
221
+ field: "date",
222
+ match: "exactMatch",
223
+ terms: ["schema:startDate", "event:time"]
224
+ },
225
+ {
226
+ lexicon: "id.sifa.profile.presentationDelivery",
227
+ field: "eventName",
228
+ match: "closeMatch",
229
+ terms: ["schema:superEvent", "bibo:Conference"]
230
+ },
231
+ {
232
+ lexicon: "id.sifa.profile.presentationDelivery",
233
+ field: "mode",
234
+ match: "exactMatch",
235
+ terms: ["schema:eventAttendanceMode"],
236
+ note: "The community.lexicon.calendar.event known values are already one-to-one with the schema.org enumeration."
237
+ },
238
+ {
239
+ lexicon: "id.sifa.profile.presentationDelivery",
240
+ field: "presentationRef",
241
+ match: "closeMatch",
242
+ terms: ["bibo:presentedAt", "schema:workPerformed"]
243
+ },
244
+ {
245
+ lexicon: "id.sifa.profile.presentationDelivery",
246
+ field: "role",
247
+ match: "closeMatch",
248
+ terms: ["bibo:performer", "schema:performer"],
249
+ note: "No external vocabulary distinguishes presenter, panelist, keynote, workshop and host at this granularity."
250
+ },
251
+ {
252
+ lexicon: "id.sifa.profile.presentationDelivery",
253
+ field: "status",
254
+ match: "exactMatch",
255
+ terms: ["schema:eventStatus"],
256
+ note: "As with mode, already one-to-one with the schema.org enumeration."
257
+ },
258
+ {
259
+ lexicon: "id.sifa.profile.presentationDelivery",
260
+ field: "title",
261
+ match: "exactMatch",
262
+ terms: ["dcterms:title", "schema:name"]
263
+ },
264
+ {
265
+ lexicon: "id.sifa.profile.project",
266
+ match: "exactMatch",
267
+ terms: ["schema:Project", "foaf:Project"]
268
+ },
269
+ {
270
+ lexicon: "id.sifa.profile.publication",
271
+ match: "broadMatch",
272
+ terms: ["bibo:Document", "schema:CreativeWork"],
273
+ note: "Refine to bibo:AcademicArticle, bibo:Book, bibo:Report or bibo:Thesis when a resource type is known. COAR is the value anchor."
274
+ },
275
+ {
276
+ lexicon: "id.sifa.profile.publication",
277
+ field: "authors",
278
+ match: "exactMatch",
279
+ terms: ["bibo:authorList", "schema:author"],
280
+ note: "bibo:authorList is an ordered rdf:List and preserves author order, which schema:author does not guarantee."
281
+ },
282
+ {
283
+ lexicon: "id.sifa.profile.publication",
284
+ field: "description",
285
+ match: "exactMatch",
286
+ terms: ["bibo:abstract", "schema:abstract"]
287
+ },
288
+ {
289
+ lexicon: "id.sifa.profile.publication",
290
+ field: "publishedAt",
291
+ match: "exactMatch",
292
+ terms: ["dcterms:issued", "schema:datePublished"]
293
+ },
294
+ {
295
+ lexicon: "id.sifa.profile.publication",
296
+ field: "publisher",
297
+ match: "exactMatch",
298
+ terms: ["dcterms:publisher", "schema:publisher"]
299
+ },
300
+ {
301
+ lexicon: "id.sifa.profile.publication",
302
+ field: "subtitle",
303
+ match: "closeMatch",
304
+ terms: ["schema:alternativeHeadline"]
305
+ },
306
+ {
307
+ lexicon: "id.sifa.profile.publication",
308
+ field: "title",
309
+ match: "exactMatch",
310
+ terms: ["dcterms:title", "schema:name"]
311
+ },
312
+ {
313
+ lexicon: "id.sifa.profile.publication",
314
+ field: "url",
315
+ match: "exactMatch",
316
+ terms: ["bibo:uri", "schema:url"]
317
+ },
318
+ {
319
+ lexicon: "id.sifa.profile.self",
320
+ match: "exactMatch",
321
+ terms: ["schema:Person", "foaf:Person"]
322
+ },
323
+ {
324
+ lexicon: "id.sifa.profile.self",
325
+ field: "about",
326
+ match: "exactMatch",
327
+ terms: ["schema:description"]
328
+ },
329
+ {
330
+ lexicon: "id.sifa.profile.self",
331
+ field: "avatar",
332
+ match: "exactMatch",
333
+ terms: ["schema:image", "foaf:depiction"]
334
+ },
335
+ {
336
+ lexicon: "id.sifa.profile.self",
337
+ field: "displayName",
338
+ match: "exactMatch",
339
+ terms: ["schema:name", "foaf:name"]
340
+ },
341
+ {
342
+ lexicon: "id.sifa.profile.self",
343
+ field: "familyName",
344
+ match: "exactMatch",
345
+ terms: ["schema:familyName", "foaf:family_name"]
346
+ },
347
+ {
348
+ lexicon: "id.sifa.profile.self",
349
+ field: "givenName",
350
+ match: "exactMatch",
351
+ terms: ["schema:givenName", "foaf:givenname"]
352
+ },
353
+ {
354
+ lexicon: "id.sifa.profile.self",
355
+ field: "headline",
356
+ match: "closeMatch",
357
+ terms: ["schema:jobTitle"]
358
+ },
359
+ {
360
+ lexicon: "id.sifa.profile.self",
361
+ field: "location",
362
+ match: "closeMatch",
363
+ terms: ["schema:homeLocation"]
364
+ },
365
+ {
366
+ lexicon: "id.sifa.profile.skill",
367
+ match: "closeMatch",
368
+ terms: ["schema:knowsAbout", "schema:DefinedTerm"],
369
+ note: "ESCO is the value anchor."
370
+ },
371
+ {
372
+ lexicon: "id.sifa.profile.volunteering",
373
+ match: "closeMatch",
374
+ terms: ["org:Membership", "schema:OrganizationRole"]
375
+ },
376
+ {
377
+ lexicon: "id.sifa.profile.publication",
378
+ field: "doi",
379
+ terms: ["bibo:doi", "prism:doi"],
380
+ match: "exactMatch",
381
+ note: "Present on the AppView view type (ORCID-sourced), not yet on the id.sifa.profile.publication lexicon, so user-authored publications cannot carry one."
382
+ }
383
+ ],
384
+ unmapped: [
385
+ {
386
+ lexicon: "id.sifa.profile.self",
387
+ field: "pronouns",
388
+ reason: "No stable external term. schema.org has no pronouns property."
389
+ },
390
+ {
391
+ lexicon: "id.sifa.profile.self",
392
+ field: "discoverable",
393
+ reason: "Sifa indexing control, not a fact about the person."
394
+ },
395
+ {
396
+ lexicon: "id.sifa.profile.position",
397
+ field: "isPrimary",
398
+ reason: "Sifa display ordering concern."
399
+ },
400
+ {
401
+ lexicon: "id.sifa.profile.education",
402
+ field: "grade",
403
+ reason: "No comparable external term; grading scales are not portable."
404
+ },
405
+ {
406
+ lexicon: "id.sifa.profile.language",
407
+ field: "proficiency",
408
+ reason: "The known values are CEFR-shaped but not CEFR-named. Map only; renaming a published lexicon for a cosmetic gain is not worth the break."
409
+ },
410
+ {
411
+ lexicon: "id.sifa.confirmation",
412
+ reason: "A record affirming another record is reification. schema:Review and schema:ClaimReview both imply an evaluation that a confirmation does not make."
413
+ },
414
+ {
415
+ lexicon: "id.sifa.endorsement",
416
+ reason: "Same reification problem as confirmation. Any mapping that lets a consumer aggregate endorsements into a score works against the descriptive-only trust model."
417
+ },
418
+ {
419
+ lexicon: "id.sifa.graph.connection",
420
+ reason: "foaf:knows carries no consent semantics. A Sifa connection is bilateral and confirmed; flattening it to foaf:knows would misrepresent an unconfirmed acquaintance claim as mutual."
421
+ },
422
+ {
423
+ lexicon: "id.sifa.graph.follow",
424
+ reason: "See id.sifa.graph.connection."
425
+ },
426
+ {
427
+ lexicon: "id.sifa.meeting",
428
+ reason: "Attestation semantics; same reification problem as confirmation."
429
+ }
430
+ ]
13
431
  };
14
- var UNMAPPED = [
15
- {
16
- lexicon: "id.sifa.confirmation",
17
- terms: [],
18
- match: "noMatch",
19
- note: "A record affirming another record is reification. schema:Review and schema:ClaimReview both imply an evaluation that a confirmation does not make."
20
- },
21
- {
22
- lexicon: "id.sifa.endorsement",
23
- terms: [],
24
- match: "noMatch",
25
- note: "Same reification problem as confirmation. Any mapping that lets a consumer aggregate endorsements into a score works against the descriptive-only trust model."
26
- },
27
- {
28
- lexicon: "id.sifa.graph.connection",
29
- terms: [],
30
- match: "noMatch",
31
- note: "foaf:knows carries no consent semantics. A Sifa connection is bilateral and confirmed; flattening it to foaf:knows would misrepresent an unconfirmed acquaintance claim as mutual."
32
- },
33
- {
34
- lexicon: "id.sifa.graph.follow",
35
- terms: [],
36
- match: "noMatch",
37
- note: "See id.sifa.graph.connection."
38
- },
39
- {
40
- lexicon: "id.sifa.meeting",
41
- terms: [],
42
- match: "noMatch",
43
- note: "Attestation semantics; same reification problem as confirmation."
44
- }
45
- ];
46
- var PROFILE_SELF = [
47
- { lexicon: "id.sifa.profile.self", terms: ["schema:Person", "foaf:Person"], match: "exactMatch" },
48
- {
49
- lexicon: "id.sifa.profile.self",
50
- field: "displayName",
51
- terms: ["schema:name", "foaf:name"],
52
- match: "exactMatch"
53
- },
54
- {
55
- lexicon: "id.sifa.profile.self",
56
- field: "givenName",
57
- terms: ["schema:givenName", "foaf:givenname"],
58
- match: "exactMatch"
59
- },
60
- {
61
- lexicon: "id.sifa.profile.self",
62
- field: "familyName",
63
- terms: ["schema:familyName", "foaf:family_name"],
64
- match: "exactMatch"
65
- },
66
- {
67
- lexicon: "id.sifa.profile.self",
68
- field: "avatar",
69
- terms: ["schema:image", "foaf:depiction"],
70
- match: "exactMatch"
71
- },
72
- {
73
- lexicon: "id.sifa.profile.self",
74
- field: "headline",
75
- terms: ["schema:jobTitle"],
76
- match: "closeMatch"
77
- },
78
- {
79
- lexicon: "id.sifa.profile.self",
80
- field: "about",
81
- terms: ["schema:description"],
82
- match: "exactMatch"
83
- },
84
- {
85
- lexicon: "id.sifa.profile.self",
86
- field: "location",
87
- terms: ["schema:homeLocation"],
88
- match: "closeMatch"
89
- },
90
- {
91
- lexicon: "id.sifa.profile.self",
92
- field: "pronouns",
93
- terms: [],
94
- match: "noMatch",
95
- note: "No stable external term. schema.org has no pronouns property."
96
- },
97
- {
98
- lexicon: "id.sifa.profile.self",
99
- field: "discoverable",
100
- terms: [],
101
- match: "noMatch",
102
- note: "Sifa indexing control, not a fact about the person."
103
- }
104
- ];
105
- var PROFILE_POSITION = [
106
- {
107
- lexicon: "id.sifa.profile.position",
108
- terms: ["org:Membership", "schema:OrganizationRole"],
109
- match: "closeMatch"
110
- },
111
- {
112
- lexicon: "id.sifa.profile.position",
113
- field: "company",
114
- terms: ["org:organization", "schema:worksFor"],
115
- match: "exactMatch"
116
- },
117
- {
118
- lexicon: "id.sifa.profile.position",
119
- field: "entityRef",
120
- terms: ["schema:sameAs"],
121
- match: "closeMatch"
122
- },
123
- {
124
- lexicon: "id.sifa.profile.position",
125
- field: "title",
126
- terms: ["org:role", "schema:roleName"],
127
- match: "exactMatch"
128
- },
129
- {
130
- lexicon: "id.sifa.profile.position",
131
- field: "description",
132
- terms: ["dcterms:description"],
133
- match: "exactMatch"
134
- },
135
- {
136
- lexicon: "id.sifa.profile.position",
137
- field: "employmentType",
138
- terms: ["schema:employmentType"],
139
- match: "closeMatch",
140
- note: "schema:employmentType is free text. ESCO is the better value anchor."
141
- },
142
- {
143
- lexicon: "id.sifa.profile.position",
144
- field: "workplaceType",
145
- terms: ["schema:jobLocationType"],
146
- match: "narrowMatch",
147
- note: "schema.org models only a remote flag; Sifa distinguishes onSite, remote, and hybrid."
148
- },
149
- {
150
- lexicon: "id.sifa.profile.position",
151
- field: "location",
152
- terms: ["schema:jobLocation"],
153
- match: "exactMatch"
154
- },
155
- {
156
- lexicon: "id.sifa.profile.position",
157
- field: "startedAt",
158
- terms: ["schema:startDate"],
159
- match: "exactMatch"
160
- },
161
- {
162
- lexicon: "id.sifa.profile.position",
163
- field: "endedAt",
164
- terms: ["schema:endDate"],
165
- match: "exactMatch"
166
- },
167
- {
168
- lexicon: "id.sifa.profile.position",
169
- field: "isPrimary",
170
- terms: [],
171
- match: "noMatch",
172
- note: "Sifa display ordering concern."
173
- }
174
- ];
175
- var PROFILE_EDUCATION = [
176
- {
177
- lexicon: "id.sifa.profile.education",
178
- terms: ["schema:EducationalOccupationalCredential"],
179
- match: "closeMatch",
180
- note: "One record maps to two schema.org assertions: alumniOf for the institution and hasCredential for the degree."
181
- },
182
- {
183
- lexicon: "id.sifa.profile.education",
184
- field: "institution",
185
- terms: ["schema:alumniOf"],
186
- match: "exactMatch"
187
- },
188
- {
189
- lexicon: "id.sifa.profile.education",
190
- field: "degree",
191
- terms: ["schema:hasCredential", "bibo:degree"],
192
- match: "closeMatch"
193
- },
194
- {
195
- lexicon: "id.sifa.profile.education",
196
- field: "fieldOfStudy",
197
- terms: ["schema:educationalCredentialAwarded"],
198
- match: "closeMatch",
199
- note: "ISCED-F is the value anchor."
200
- },
201
- {
202
- lexicon: "id.sifa.profile.education",
203
- field: "grade",
204
- terms: [],
205
- match: "noMatch",
206
- note: "No comparable external term; grading scales are not portable."
207
- }
208
- ];
209
- var PROFILE_PUBLICATION = [
210
- {
211
- lexicon: "id.sifa.profile.publication",
212
- terms: ["bibo:Document", "schema:CreativeWork"],
213
- match: "broadMatch",
214
- note: "Refine to bibo:AcademicArticle, bibo:Book, bibo:Report or bibo:Thesis when a resource type is known. COAR is the value anchor."
215
- },
216
- {
217
- lexicon: "id.sifa.profile.publication",
218
- field: "title",
219
- terms: ["dcterms:title", "schema:name"],
220
- match: "exactMatch"
221
- },
222
- {
223
- lexicon: "id.sifa.profile.publication",
224
- field: "subtitle",
225
- terms: ["schema:alternativeHeadline"],
226
- match: "closeMatch"
227
- },
228
- {
229
- lexicon: "id.sifa.profile.publication",
230
- field: "publisher",
231
- terms: ["dcterms:publisher", "schema:publisher"],
232
- match: "exactMatch"
233
- },
234
- {
235
- lexicon: "id.sifa.profile.publication",
236
- field: "url",
237
- terms: ["bibo:uri", "schema:url"],
238
- match: "exactMatch"
239
- },
240
- {
241
- lexicon: "id.sifa.profile.publication",
242
- field: "description",
243
- terms: ["bibo:abstract", "schema:abstract"],
244
- match: "exactMatch"
245
- },
246
- {
247
- lexicon: "id.sifa.profile.publication",
248
- field: "authors",
249
- terms: ["bibo:authorList", "schema:author"],
250
- match: "exactMatch",
251
- note: "bibo:authorList is an ordered rdf:List and preserves author order, which schema:author does not guarantee."
252
- },
253
- {
254
- lexicon: "id.sifa.profile.publication",
255
- field: "publishedAt",
256
- terms: ["dcterms:issued", "schema:datePublished"],
257
- match: "exactMatch"
258
- },
259
- {
260
- lexicon: "id.sifa.profile.publication",
261
- field: "doi",
262
- terms: ["bibo:doi", "prism:doi"],
263
- match: "exactMatch",
264
- note: "Present on the AppView view type (ORCID-sourced), not yet on the id.sifa.profile.publication lexicon, so user-authored publications cannot carry one."
265
- }
266
- ];
267
- var PROFILE_PRESENTATION = [
268
- {
269
- lexicon: "id.sifa.profile.presentation",
270
- terms: ["bibo:Slideshow", "schema:PresentationDigitalDocument"],
271
- match: "closeMatch",
272
- note: 'Neither term carries the "reusable, deliverable more than once" semantics of the Sifa record.'
273
- },
274
- {
275
- lexicon: "id.sifa.profile.presentation",
276
- field: "title",
277
- terms: ["dcterms:title", "schema:name"],
278
- match: "exactMatch"
279
- },
280
- {
281
- lexicon: "id.sifa.profile.presentation",
282
- field: "description",
283
- terms: ["bibo:abstract", "schema:abstract"],
284
- match: "exactMatch"
285
- },
286
- {
287
- lexicon: "id.sifa.profile.presentation",
288
- field: "duration",
289
- terms: ["schema:timeRequired"],
290
- match: "narrowMatch",
291
- note: "The lexicon models a range; schema:timeRequired is a single ISO 8601 duration."
292
- },
293
- {
294
- lexicon: "id.sifa.profile.presentation",
295
- field: "intendedAudiences",
296
- terms: ["schema:audience"],
297
- match: "closeMatch"
298
- },
299
- {
300
- lexicon: "id.sifa.profile.presentation",
301
- field: "writeupRef",
302
- terms: ["dcterms:isReferencedBy", "schema:subjectOf"],
303
- match: "closeMatch"
304
- },
305
- {
306
- lexicon: "id.sifa.profile.presentation",
307
- field: "coverImage",
308
- terms: ["schema:image", "foaf:depiction"],
309
- match: "exactMatch"
310
- }
311
- ];
312
- var PROFILE_PRESENTATION_DELIVERY = [
313
- {
314
- lexicon: "id.sifa.profile.presentationDelivery",
315
- terms: ["schema:Event", "event:Event"],
316
- match: "closeMatch",
317
- note: "BIBO models this relation as bibo:Slideshow bibo:presentedAt event:Event."
318
- },
319
- {
320
- lexicon: "id.sifa.profile.presentationDelivery",
321
- field: "presentationRef",
322
- terms: ["bibo:presentedAt", "schema:workPerformed"],
323
- match: "closeMatch"
324
- },
325
- {
326
- lexicon: "id.sifa.profile.presentationDelivery",
327
- field: "title",
328
- terms: ["dcterms:title", "schema:name"],
329
- match: "exactMatch"
330
- },
331
- {
332
- lexicon: "id.sifa.profile.presentationDelivery",
333
- field: "role",
334
- terms: ["bibo:performer", "schema:performer"],
335
- match: "closeMatch",
336
- note: "No external vocabulary distinguishes presenter, panelist, keynote, workshop and host at this granularity."
337
- },
338
- {
339
- lexicon: "id.sifa.profile.presentationDelivery",
340
- field: "eventName",
341
- terms: ["schema:superEvent", "bibo:Conference"],
342
- match: "closeMatch"
343
- },
344
- {
345
- lexicon: "id.sifa.profile.presentationDelivery",
346
- field: "date",
347
- terms: ["schema:startDate", "event:time"],
348
- match: "exactMatch"
349
- },
350
- {
351
- lexicon: "id.sifa.profile.presentationDelivery",
352
- field: "address",
353
- terms: ["schema:location", "event:place"],
354
- match: "exactMatch"
355
- },
356
- {
357
- lexicon: "id.sifa.profile.presentationDelivery",
358
- field: "mode",
359
- terms: ["schema:eventAttendanceMode"],
360
- match: "exactMatch",
361
- note: "The community.lexicon.calendar.event known values are already one-to-one with the schema.org enumeration."
362
- },
363
- {
364
- lexicon: "id.sifa.profile.presentationDelivery",
365
- field: "status",
366
- terms: ["schema:eventStatus"],
367
- match: "exactMatch",
368
- note: "As with mode, already one-to-one with the schema.org enumeration."
369
- },
370
- {
371
- lexicon: "id.sifa.profile.presentationDelivery",
372
- field: "coSpeakers",
373
- terms: ["schema:performer"],
374
- match: "exactMatch"
375
- }
376
- ];
377
- var PROFILE_OTHER = [
378
- {
379
- lexicon: "id.sifa.profile.certification",
380
- terms: ["schema:EducationalOccupationalCredential"],
381
- match: "exactMatch"
382
- },
383
- {
384
- lexicon: "id.sifa.profile.certification",
385
- field: "credentialUrl",
386
- terms: ["schema:url"],
387
- match: "exactMatch"
388
- },
389
- {
390
- lexicon: "id.sifa.profile.certification",
391
- field: "expiresAt",
392
- terms: ["schema:validUntil"],
393
- match: "exactMatch"
394
- },
395
- { lexicon: "id.sifa.profile.course", terms: ["schema:Course"], match: "exactMatch" },
396
- {
397
- lexicon: "id.sifa.profile.course",
398
- field: "number",
399
- terms: ["schema:courseCode"],
400
- match: "exactMatch"
401
- },
402
- {
403
- lexicon: "id.sifa.profile.honor",
404
- terms: ["schema:award"],
405
- match: "broadMatch",
406
- note: "schema:award is a bare string, so issuer and date are lost. No better term exists in BIBO either."
407
- },
408
- {
409
- lexicon: "id.sifa.profile.project",
410
- terms: ["schema:Project", "foaf:Project"],
411
- match: "exactMatch"
412
- },
413
- {
414
- lexicon: "id.sifa.profile.skill",
415
- terms: ["schema:knowsAbout", "schema:DefinedTerm"],
416
- match: "closeMatch",
417
- note: "ESCO is the value anchor."
418
- },
419
- {
420
- lexicon: "id.sifa.profile.volunteering",
421
- terms: ["org:Membership", "schema:OrganizationRole"],
422
- match: "closeMatch"
423
- },
424
- {
425
- lexicon: "id.sifa.profile.involvement",
426
- terms: ["org:Membership"],
427
- match: "broadMatch",
428
- note: "The kind known values have no external equivalent."
429
- },
430
- {
431
- lexicon: "id.sifa.profile.language",
432
- terms: ["schema:knowsLanguage"],
433
- match: "exactMatch"
434
- },
435
- {
436
- lexicon: "id.sifa.profile.language",
437
- field: "proficiency",
432
+
433
+ // src/jsonld/terms.ts
434
+ var VOCABULARIES = term_mappings_default.vocabularies;
435
+ var TERM_MAPPINGS = [
436
+ ...term_mappings_default.mappings.map((m) => ({
437
+ lexicon: m.lexicon,
438
+ ...m.field ? { field: m.field } : {},
439
+ terms: m.terms,
440
+ match: m.match,
441
+ ...m.note ? { note: m.note } : {}
442
+ })),
443
+ ...term_mappings_default.unmapped.map((u) => ({
444
+ lexicon: u.lexicon,
445
+ ...u.field ? { field: u.field } : {},
438
446
  terms: [],
439
447
  match: "noMatch",
440
- note: "The known values are CEFR-shaped but not CEFR-named. Map only; renaming a published lexicon for a cosmetic gain is not worth the break."
441
- },
442
- {
443
- lexicon: "id.sifa.profile.externalAccount",
444
- terms: ["schema:sameAs", "foaf:account"],
445
- match: "exactMatch"
446
- },
447
- {
448
- lexicon: "id.sifa.org.profile",
449
- terms: ["schema:Organization", "org:FormalOrganization"],
450
- match: "exactMatch",
451
- note: "ROR is the value anchor."
452
- }
453
- ];
454
- var TERM_MAPPINGS = [
455
- ...PROFILE_SELF,
456
- ...PROFILE_POSITION,
457
- ...PROFILE_EDUCATION,
458
- ...PROFILE_PUBLICATION,
459
- ...PROFILE_PRESENTATION,
460
- ...PROFILE_PRESENTATION_DELIVERY,
461
- ...PROFILE_OTHER,
462
- ...UNMAPPED
448
+ note: u.reason
449
+ }))
463
450
  ];
464
451
  function expandCurie(curie) {
465
452
  const separator = curie.indexOf(":");