@accordproject/concerto-vocabulary 4.2.0 → 5.0.0-beta.2

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/dist/esm/chunk-3VH3UOGB.mjs +398 -0
  2. package/dist/esm/chunk-3VH3UOGB.mjs.map +7 -0
  3. package/dist/esm/chunk-7RW3VXN4.mjs +185 -0
  4. package/dist/esm/chunk-7RW3VXN4.mjs.map +7 -0
  5. package/dist/esm/chunk-TA74NV57.mjs +38 -0
  6. package/dist/esm/chunk-TA74NV57.mjs.map +7 -0
  7. package/dist/esm/index.mjs +14 -0
  8. package/dist/esm/index.mjs.map +7 -0
  9. package/dist/esm/vocabulary.mjs +11 -0
  10. package/dist/esm/vocabulary.mjs.map +7 -0
  11. package/dist/esm/vocabularymanager.mjs +13 -0
  12. package/dist/esm/vocabularymanager.mjs.map +7 -0
  13. package/dist/esm/yamlparser.mjs +9 -0
  14. package/dist/esm/yamlparser.mjs.map +7 -0
  15. package/dist/esm-browser/chunk-2FE6COGH.mjs +2089 -0
  16. package/dist/esm-browser/chunk-2FE6COGH.mjs.map +7 -0
  17. package/dist/esm-browser/chunk-CKXQ5OWJ.mjs +187 -0
  18. package/dist/esm-browser/chunk-CKXQ5OWJ.mjs.map +7 -0
  19. package/dist/esm-browser/chunk-DSN2E4MW.mjs +6747 -0
  20. package/dist/esm-browser/chunk-DSN2E4MW.mjs.map +7 -0
  21. package/dist/esm-browser/chunk-K2X7J5YP.mjs +70 -0
  22. package/dist/esm-browser/chunk-K2X7J5YP.mjs.map +7 -0
  23. package/dist/esm-browser/index.mjs +18 -0
  24. package/dist/esm-browser/index.mjs.map +7 -0
  25. package/dist/esm-browser/vocabulary.mjs +10 -0
  26. package/dist/esm-browser/vocabulary.mjs.map +7 -0
  27. package/dist/esm-browser/vocabularymanager.mjs +12 -0
  28. package/dist/esm-browser/vocabularymanager.mjs.map +7 -0
  29. package/dist/esm-browser/yamlparser.mjs +8 -0
  30. package/dist/esm-browser/yamlparser.mjs.map +7 -0
  31. package/dist/index.d.ts +2 -2
  32. package/dist/index.js +7 -4
  33. package/dist/index.js.map +1 -1
  34. package/dist/vocabulary.d.ts +3 -2
  35. package/dist/vocabulary.js +5 -1
  36. package/dist/vocabulary.js.map +1 -1
  37. package/dist/vocabularymanager.d.ts +3 -2
  38. package/dist/vocabularymanager.js +6 -3
  39. package/dist/vocabularymanager.js.map +1 -1
  40. package/package.json +18 -5
@@ -0,0 +1,2089 @@
1
+ import {
2
+ vocabulary_default
3
+ } from "./chunk-CKXQ5OWJ.mjs";
4
+ import {
5
+ browser_default,
6
+ parseVocabularyYaml
7
+ } from "./chunk-DSN2E4MW.mjs";
8
+ import {
9
+ __commonJS,
10
+ __toESM,
11
+ init_browser_process_shim
12
+ } from "./chunk-K2X7J5YP.mjs";
13
+
14
+ // node_modules/@accordproject/concerto-metamodel/lib/metamodel.json
15
+ var require_metamodel = __commonJS({
16
+ "node_modules/@accordproject/concerto-metamodel/lib/metamodel.json"(exports, module) {
17
+ module.exports = {
18
+ $class: "concerto.metamodel@1.0.0.Model",
19
+ decorators: [
20
+ {
21
+ $class: "concerto.metamodel@1.0.0.Decorator",
22
+ name: "DotNetNamespace",
23
+ arguments: [
24
+ {
25
+ $class: "concerto.metamodel@1.0.0.DecoratorString",
26
+ value: "AccordProject.Concerto.Metamodel"
27
+ }
28
+ ]
29
+ }
30
+ ],
31
+ namespace: "concerto.metamodel@1.0.0",
32
+ imports: [],
33
+ declarations: [
34
+ {
35
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
36
+ name: "Position",
37
+ isAbstract: false,
38
+ properties: [
39
+ {
40
+ $class: "concerto.metamodel@1.0.0.IntegerProperty",
41
+ name: "line",
42
+ isArray: false,
43
+ isOptional: false
44
+ },
45
+ {
46
+ $class: "concerto.metamodel@1.0.0.IntegerProperty",
47
+ name: "column",
48
+ isArray: false,
49
+ isOptional: false
50
+ },
51
+ {
52
+ $class: "concerto.metamodel@1.0.0.IntegerProperty",
53
+ name: "offset",
54
+ isArray: false,
55
+ isOptional: false
56
+ }
57
+ ]
58
+ },
59
+ {
60
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
61
+ name: "Range",
62
+ isAbstract: false,
63
+ properties: [
64
+ {
65
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
66
+ name: "start",
67
+ type: {
68
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
69
+ name: "Position"
70
+ },
71
+ isArray: false,
72
+ isOptional: false
73
+ },
74
+ {
75
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
76
+ name: "end",
77
+ type: {
78
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
79
+ name: "Position"
80
+ },
81
+ isArray: false,
82
+ isOptional: false
83
+ },
84
+ {
85
+ $class: "concerto.metamodel@1.0.0.StringProperty",
86
+ name: "source",
87
+ isArray: false,
88
+ isOptional: true
89
+ }
90
+ ]
91
+ },
92
+ {
93
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
94
+ name: "TypeIdentifier",
95
+ isAbstract: false,
96
+ properties: [
97
+ {
98
+ $class: "concerto.metamodel@1.0.0.StringProperty",
99
+ name: "name",
100
+ isArray: false,
101
+ isOptional: false
102
+ },
103
+ {
104
+ $class: "concerto.metamodel@1.0.0.StringProperty",
105
+ name: "namespace",
106
+ isArray: false,
107
+ isOptional: true
108
+ },
109
+ {
110
+ $class: "concerto.metamodel@1.0.0.StringProperty",
111
+ name: "resolvedName",
112
+ isArray: false,
113
+ isOptional: true
114
+ }
115
+ ]
116
+ },
117
+ {
118
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
119
+ name: "DecoratorLiteral",
120
+ isAbstract: true,
121
+ properties: [
122
+ {
123
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
124
+ name: "location",
125
+ type: {
126
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
127
+ name: "Range"
128
+ },
129
+ isArray: false,
130
+ isOptional: true
131
+ }
132
+ ]
133
+ },
134
+ {
135
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
136
+ name: "DecoratorString",
137
+ isAbstract: false,
138
+ properties: [
139
+ {
140
+ $class: "concerto.metamodel@1.0.0.StringProperty",
141
+ name: "value",
142
+ isArray: false,
143
+ isOptional: false
144
+ }
145
+ ],
146
+ superType: {
147
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
148
+ name: "DecoratorLiteral"
149
+ }
150
+ },
151
+ {
152
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
153
+ name: "DecoratorNumber",
154
+ isAbstract: false,
155
+ properties: [
156
+ {
157
+ $class: "concerto.metamodel@1.0.0.DoubleProperty",
158
+ name: "value",
159
+ isArray: false,
160
+ isOptional: false
161
+ }
162
+ ],
163
+ superType: {
164
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
165
+ name: "DecoratorLiteral"
166
+ }
167
+ },
168
+ {
169
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
170
+ name: "DecoratorBoolean",
171
+ isAbstract: false,
172
+ properties: [
173
+ {
174
+ $class: "concerto.metamodel@1.0.0.BooleanProperty",
175
+ name: "value",
176
+ isArray: false,
177
+ isOptional: false
178
+ }
179
+ ],
180
+ superType: {
181
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
182
+ name: "DecoratorLiteral"
183
+ }
184
+ },
185
+ {
186
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
187
+ name: "DecoratorTypeReference",
188
+ isAbstract: false,
189
+ properties: [
190
+ {
191
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
192
+ name: "type",
193
+ type: {
194
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
195
+ name: "TypeIdentifier"
196
+ },
197
+ isArray: false,
198
+ isOptional: false
199
+ },
200
+ {
201
+ $class: "concerto.metamodel@1.0.0.BooleanProperty",
202
+ name: "isArray",
203
+ isArray: false,
204
+ isOptional: false,
205
+ defaultValue: false
206
+ }
207
+ ],
208
+ superType: {
209
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
210
+ name: "DecoratorLiteral"
211
+ }
212
+ },
213
+ {
214
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
215
+ name: "Decorator",
216
+ isAbstract: false,
217
+ properties: [
218
+ {
219
+ $class: "concerto.metamodel@1.0.0.StringProperty",
220
+ name: "name",
221
+ isArray: false,
222
+ isOptional: false
223
+ },
224
+ {
225
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
226
+ name: "arguments",
227
+ type: {
228
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
229
+ name: "DecoratorLiteral"
230
+ },
231
+ isArray: true,
232
+ isOptional: true
233
+ },
234
+ {
235
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
236
+ name: "location",
237
+ type: {
238
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
239
+ name: "Range"
240
+ },
241
+ isArray: false,
242
+ isOptional: true
243
+ }
244
+ ]
245
+ },
246
+ {
247
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
248
+ name: "Identified",
249
+ isAbstract: false,
250
+ properties: []
251
+ },
252
+ {
253
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
254
+ name: "IdentifiedBy",
255
+ isAbstract: false,
256
+ properties: [
257
+ {
258
+ $class: "concerto.metamodel@1.0.0.StringProperty",
259
+ name: "name",
260
+ isArray: false,
261
+ isOptional: false
262
+ }
263
+ ],
264
+ superType: {
265
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
266
+ name: "Identified"
267
+ }
268
+ },
269
+ {
270
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
271
+ name: "Declaration",
272
+ isAbstract: true,
273
+ properties: [
274
+ {
275
+ $class: "concerto.metamodel@1.0.0.StringProperty",
276
+ name: "name",
277
+ isArray: false,
278
+ isOptional: false,
279
+ validator: {
280
+ $class: "concerto.metamodel@1.0.0.StringRegexValidator",
281
+ pattern: "^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$",
282
+ flags: "u"
283
+ }
284
+ },
285
+ {
286
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
287
+ name: "decorators",
288
+ type: {
289
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
290
+ name: "Decorator"
291
+ },
292
+ isArray: true,
293
+ isOptional: true
294
+ },
295
+ {
296
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
297
+ name: "location",
298
+ type: {
299
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
300
+ name: "Range"
301
+ },
302
+ isArray: false,
303
+ isOptional: true
304
+ }
305
+ ]
306
+ },
307
+ {
308
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
309
+ name: "MapKeyType",
310
+ isAbstract: true,
311
+ properties: [
312
+ {
313
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
314
+ name: "decorators",
315
+ type: {
316
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
317
+ name: "Decorator"
318
+ },
319
+ isArray: true,
320
+ isOptional: true
321
+ },
322
+ {
323
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
324
+ name: "location",
325
+ type: {
326
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
327
+ name: "Range"
328
+ },
329
+ isArray: false,
330
+ isOptional: true
331
+ }
332
+ ]
333
+ },
334
+ {
335
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
336
+ name: "MapValueType",
337
+ isAbstract: true,
338
+ properties: [
339
+ {
340
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
341
+ name: "decorators",
342
+ type: {
343
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
344
+ name: "Decorator"
345
+ },
346
+ isArray: true,
347
+ isOptional: true
348
+ },
349
+ {
350
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
351
+ name: "location",
352
+ type: {
353
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
354
+ name: "Range"
355
+ },
356
+ isArray: false,
357
+ isOptional: true
358
+ }
359
+ ]
360
+ },
361
+ {
362
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
363
+ name: "MapDeclaration",
364
+ isAbstract: false,
365
+ properties: [
366
+ {
367
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
368
+ name: "key",
369
+ type: {
370
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
371
+ name: "MapKeyType"
372
+ },
373
+ isArray: false,
374
+ isOptional: false
375
+ },
376
+ {
377
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
378
+ name: "value",
379
+ type: {
380
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
381
+ name: "MapValueType"
382
+ },
383
+ isArray: false,
384
+ isOptional: false
385
+ }
386
+ ],
387
+ superType: {
388
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
389
+ name: "Declaration"
390
+ }
391
+ },
392
+ {
393
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
394
+ name: "StringMapKeyType",
395
+ isAbstract: false,
396
+ properties: [],
397
+ superType: {
398
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
399
+ name: "MapKeyType"
400
+ }
401
+ },
402
+ {
403
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
404
+ name: "DateTimeMapKeyType",
405
+ isAbstract: false,
406
+ properties: [],
407
+ superType: {
408
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
409
+ name: "MapKeyType"
410
+ }
411
+ },
412
+ {
413
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
414
+ name: "ObjectMapKeyType",
415
+ isAbstract: false,
416
+ properties: [
417
+ {
418
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
419
+ name: "type",
420
+ type: {
421
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
422
+ name: "TypeIdentifier"
423
+ },
424
+ isArray: false,
425
+ isOptional: false
426
+ }
427
+ ],
428
+ superType: {
429
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
430
+ name: "MapKeyType"
431
+ }
432
+ },
433
+ {
434
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
435
+ name: "BooleanMapValueType",
436
+ isAbstract: false,
437
+ properties: [],
438
+ superType: {
439
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
440
+ name: "MapValueType"
441
+ }
442
+ },
443
+ {
444
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
445
+ name: "DateTimeMapValueType",
446
+ isAbstract: false,
447
+ properties: [],
448
+ superType: {
449
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
450
+ name: "MapValueType"
451
+ }
452
+ },
453
+ {
454
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
455
+ name: "StringMapValueType",
456
+ isAbstract: false,
457
+ properties: [],
458
+ superType: {
459
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
460
+ name: "MapValueType"
461
+ }
462
+ },
463
+ {
464
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
465
+ name: "IntegerMapValueType",
466
+ isAbstract: false,
467
+ properties: [],
468
+ superType: {
469
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
470
+ name: "MapValueType"
471
+ }
472
+ },
473
+ {
474
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
475
+ name: "LongMapValueType",
476
+ isAbstract: false,
477
+ properties: [],
478
+ superType: {
479
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
480
+ name: "MapValueType"
481
+ }
482
+ },
483
+ {
484
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
485
+ name: "DoubleMapValueType",
486
+ isAbstract: false,
487
+ properties: [],
488
+ superType: {
489
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
490
+ name: "MapValueType"
491
+ }
492
+ },
493
+ {
494
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
495
+ name: "ObjectMapValueType",
496
+ isAbstract: false,
497
+ properties: [
498
+ {
499
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
500
+ name: "type",
501
+ type: {
502
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
503
+ name: "TypeIdentifier"
504
+ },
505
+ isArray: false,
506
+ isOptional: false
507
+ }
508
+ ],
509
+ superType: {
510
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
511
+ name: "MapValueType"
512
+ }
513
+ },
514
+ {
515
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
516
+ name: "RelationshipMapValueType",
517
+ isAbstract: false,
518
+ properties: [
519
+ {
520
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
521
+ name: "type",
522
+ type: {
523
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
524
+ name: "TypeIdentifier"
525
+ },
526
+ isArray: false,
527
+ isOptional: false
528
+ }
529
+ ],
530
+ superType: {
531
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
532
+ name: "MapValueType"
533
+ }
534
+ },
535
+ {
536
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
537
+ name: "EnumDeclaration",
538
+ isAbstract: false,
539
+ properties: [
540
+ {
541
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
542
+ name: "properties",
543
+ type: {
544
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
545
+ name: "EnumProperty"
546
+ },
547
+ isArray: true,
548
+ isOptional: false
549
+ }
550
+ ],
551
+ superType: {
552
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
553
+ name: "Declaration"
554
+ }
555
+ },
556
+ {
557
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
558
+ name: "EnumProperty",
559
+ isAbstract: false,
560
+ properties: [
561
+ {
562
+ $class: "concerto.metamodel@1.0.0.StringProperty",
563
+ name: "name",
564
+ isArray: false,
565
+ isOptional: false,
566
+ validator: {
567
+ $class: "concerto.metamodel@1.0.0.StringRegexValidator",
568
+ pattern: "^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$",
569
+ flags: "u"
570
+ }
571
+ },
572
+ {
573
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
574
+ name: "decorators",
575
+ type: {
576
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
577
+ name: "Decorator"
578
+ },
579
+ isArray: true,
580
+ isOptional: true
581
+ },
582
+ {
583
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
584
+ name: "location",
585
+ type: {
586
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
587
+ name: "Range"
588
+ },
589
+ isArray: false,
590
+ isOptional: true
591
+ }
592
+ ]
593
+ },
594
+ {
595
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
596
+ name: "ConceptDeclaration",
597
+ isAbstract: false,
598
+ properties: [
599
+ {
600
+ $class: "concerto.metamodel@1.0.0.BooleanProperty",
601
+ name: "isAbstract",
602
+ isArray: false,
603
+ isOptional: false,
604
+ defaultValue: false
605
+ },
606
+ {
607
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
608
+ name: "identified",
609
+ type: {
610
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
611
+ name: "Identified"
612
+ },
613
+ isArray: false,
614
+ isOptional: true
615
+ },
616
+ {
617
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
618
+ name: "superType",
619
+ type: {
620
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
621
+ name: "TypeIdentifier"
622
+ },
623
+ isArray: false,
624
+ isOptional: true
625
+ },
626
+ {
627
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
628
+ name: "properties",
629
+ type: {
630
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
631
+ name: "Property"
632
+ },
633
+ isArray: true,
634
+ isOptional: false
635
+ }
636
+ ],
637
+ superType: {
638
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
639
+ name: "Declaration"
640
+ }
641
+ },
642
+ {
643
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
644
+ name: "AssetDeclaration",
645
+ isAbstract: false,
646
+ properties: [],
647
+ superType: {
648
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
649
+ name: "ConceptDeclaration"
650
+ }
651
+ },
652
+ {
653
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
654
+ name: "ParticipantDeclaration",
655
+ isAbstract: false,
656
+ properties: [],
657
+ superType: {
658
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
659
+ name: "ConceptDeclaration"
660
+ }
661
+ },
662
+ {
663
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
664
+ name: "TransactionDeclaration",
665
+ isAbstract: false,
666
+ properties: [],
667
+ superType: {
668
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
669
+ name: "ConceptDeclaration"
670
+ }
671
+ },
672
+ {
673
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
674
+ name: "EventDeclaration",
675
+ isAbstract: false,
676
+ properties: [],
677
+ superType: {
678
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
679
+ name: "ConceptDeclaration"
680
+ }
681
+ },
682
+ {
683
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
684
+ name: "Property",
685
+ isAbstract: true,
686
+ properties: [
687
+ {
688
+ $class: "concerto.metamodel@1.0.0.StringProperty",
689
+ name: "name",
690
+ isArray: false,
691
+ isOptional: false,
692
+ validator: {
693
+ $class: "concerto.metamodel@1.0.0.StringRegexValidator",
694
+ pattern: "^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$",
695
+ flags: "u"
696
+ }
697
+ },
698
+ {
699
+ $class: "concerto.metamodel@1.0.0.BooleanProperty",
700
+ name: "isArray",
701
+ isArray: false,
702
+ isOptional: false,
703
+ defaultValue: false
704
+ },
705
+ {
706
+ $class: "concerto.metamodel@1.0.0.BooleanProperty",
707
+ name: "isOptional",
708
+ isArray: false,
709
+ isOptional: false,
710
+ defaultValue: false
711
+ },
712
+ {
713
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
714
+ name: "sizeValidator",
715
+ type: {
716
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
717
+ name: "CollectionSizeValidator"
718
+ },
719
+ isArray: false,
720
+ isOptional: true
721
+ },
722
+ {
723
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
724
+ name: "decorators",
725
+ type: {
726
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
727
+ name: "Decorator"
728
+ },
729
+ isArray: true,
730
+ isOptional: true
731
+ },
732
+ {
733
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
734
+ name: "location",
735
+ type: {
736
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
737
+ name: "Range"
738
+ },
739
+ isArray: false,
740
+ isOptional: true
741
+ }
742
+ ]
743
+ },
744
+ {
745
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
746
+ name: "CollectionSizeValidator",
747
+ isAbstract: false,
748
+ properties: [
749
+ {
750
+ $class: "concerto.metamodel@1.0.0.IntegerProperty",
751
+ name: "minSize",
752
+ isArray: false,
753
+ isOptional: true
754
+ },
755
+ {
756
+ $class: "concerto.metamodel@1.0.0.IntegerProperty",
757
+ name: "maxSize",
758
+ isArray: false,
759
+ isOptional: true
760
+ }
761
+ ]
762
+ },
763
+ {
764
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
765
+ name: "RelationshipProperty",
766
+ isAbstract: false,
767
+ properties: [
768
+ {
769
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
770
+ name: "type",
771
+ type: {
772
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
773
+ name: "TypeIdentifier"
774
+ },
775
+ isArray: false,
776
+ isOptional: false
777
+ }
778
+ ],
779
+ superType: {
780
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
781
+ name: "Property"
782
+ }
783
+ },
784
+ {
785
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
786
+ name: "ObjectProperty",
787
+ isAbstract: false,
788
+ properties: [
789
+ {
790
+ $class: "concerto.metamodel@1.0.0.StringProperty",
791
+ name: "defaultValue",
792
+ isArray: false,
793
+ isOptional: true
794
+ },
795
+ {
796
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
797
+ name: "type",
798
+ type: {
799
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
800
+ name: "TypeIdentifier"
801
+ },
802
+ isArray: false,
803
+ isOptional: false
804
+ }
805
+ ],
806
+ superType: {
807
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
808
+ name: "Property"
809
+ }
810
+ },
811
+ {
812
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
813
+ name: "BooleanProperty",
814
+ isAbstract: false,
815
+ properties: [
816
+ {
817
+ $class: "concerto.metamodel@1.0.0.BooleanProperty",
818
+ name: "defaultValue",
819
+ isArray: false,
820
+ isOptional: true
821
+ }
822
+ ],
823
+ superType: {
824
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
825
+ name: "Property"
826
+ }
827
+ },
828
+ {
829
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
830
+ name: "DateTimeProperty",
831
+ isAbstract: false,
832
+ properties: [],
833
+ superType: {
834
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
835
+ name: "Property"
836
+ }
837
+ },
838
+ {
839
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
840
+ name: "StringProperty",
841
+ isAbstract: false,
842
+ properties: [
843
+ {
844
+ $class: "concerto.metamodel@1.0.0.StringProperty",
845
+ name: "defaultValue",
846
+ isArray: false,
847
+ isOptional: true
848
+ },
849
+ {
850
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
851
+ name: "validator",
852
+ type: {
853
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
854
+ name: "StringRegexValidator"
855
+ },
856
+ isArray: false,
857
+ isOptional: true
858
+ },
859
+ {
860
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
861
+ name: "lengthValidator",
862
+ type: {
863
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
864
+ name: "StringLengthValidator"
865
+ },
866
+ isArray: false,
867
+ isOptional: true
868
+ }
869
+ ],
870
+ superType: {
871
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
872
+ name: "Property"
873
+ }
874
+ },
875
+ {
876
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
877
+ name: "StringRegexValidator",
878
+ isAbstract: false,
879
+ properties: [
880
+ {
881
+ $class: "concerto.metamodel@1.0.0.StringProperty",
882
+ name: "pattern",
883
+ isArray: false,
884
+ isOptional: false
885
+ },
886
+ {
887
+ $class: "concerto.metamodel@1.0.0.StringProperty",
888
+ name: "flags",
889
+ isArray: false,
890
+ isOptional: false
891
+ }
892
+ ]
893
+ },
894
+ {
895
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
896
+ name: "StringLengthValidator",
897
+ isAbstract: false,
898
+ properties: [
899
+ {
900
+ $class: "concerto.metamodel@1.0.0.IntegerProperty",
901
+ name: "minLength",
902
+ isArray: false,
903
+ isOptional: true
904
+ },
905
+ {
906
+ $class: "concerto.metamodel@1.0.0.IntegerProperty",
907
+ name: "maxLength",
908
+ isArray: false,
909
+ isOptional: true
910
+ }
911
+ ]
912
+ },
913
+ {
914
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
915
+ name: "DoubleProperty",
916
+ isAbstract: false,
917
+ properties: [
918
+ {
919
+ $class: "concerto.metamodel@1.0.0.DoubleProperty",
920
+ name: "defaultValue",
921
+ isArray: false,
922
+ isOptional: true
923
+ },
924
+ {
925
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
926
+ name: "validator",
927
+ type: {
928
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
929
+ name: "DoubleDomainValidator"
930
+ },
931
+ isArray: false,
932
+ isOptional: true
933
+ }
934
+ ],
935
+ superType: {
936
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
937
+ name: "Property"
938
+ }
939
+ },
940
+ {
941
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
942
+ name: "DoubleDomainValidator",
943
+ isAbstract: false,
944
+ properties: [
945
+ {
946
+ $class: "concerto.metamodel@1.0.0.DoubleProperty",
947
+ name: "lower",
948
+ isArray: false,
949
+ isOptional: true
950
+ },
951
+ {
952
+ $class: "concerto.metamodel@1.0.0.DoubleProperty",
953
+ name: "upper",
954
+ isArray: false,
955
+ isOptional: true
956
+ }
957
+ ]
958
+ },
959
+ {
960
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
961
+ name: "IntegerProperty",
962
+ isAbstract: false,
963
+ properties: [
964
+ {
965
+ $class: "concerto.metamodel@1.0.0.IntegerProperty",
966
+ name: "defaultValue",
967
+ isArray: false,
968
+ isOptional: true
969
+ },
970
+ {
971
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
972
+ name: "validator",
973
+ type: {
974
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
975
+ name: "IntegerDomainValidator"
976
+ },
977
+ isArray: false,
978
+ isOptional: true
979
+ }
980
+ ],
981
+ superType: {
982
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
983
+ name: "Property"
984
+ }
985
+ },
986
+ {
987
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
988
+ name: "IntegerDomainValidator",
989
+ isAbstract: false,
990
+ properties: [
991
+ {
992
+ $class: "concerto.metamodel@1.0.0.IntegerProperty",
993
+ name: "lower",
994
+ isArray: false,
995
+ isOptional: true
996
+ },
997
+ {
998
+ $class: "concerto.metamodel@1.0.0.IntegerProperty",
999
+ name: "upper",
1000
+ isArray: false,
1001
+ isOptional: true
1002
+ }
1003
+ ]
1004
+ },
1005
+ {
1006
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
1007
+ name: "LongProperty",
1008
+ isAbstract: false,
1009
+ properties: [
1010
+ {
1011
+ $class: "concerto.metamodel@1.0.0.LongProperty",
1012
+ name: "defaultValue",
1013
+ isArray: false,
1014
+ isOptional: true
1015
+ },
1016
+ {
1017
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
1018
+ name: "validator",
1019
+ type: {
1020
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1021
+ name: "LongDomainValidator"
1022
+ },
1023
+ isArray: false,
1024
+ isOptional: true
1025
+ }
1026
+ ],
1027
+ superType: {
1028
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1029
+ name: "Property"
1030
+ }
1031
+ },
1032
+ {
1033
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
1034
+ name: "LongDomainValidator",
1035
+ isAbstract: false,
1036
+ properties: [
1037
+ {
1038
+ $class: "concerto.metamodel@1.0.0.LongProperty",
1039
+ name: "lower",
1040
+ isArray: false,
1041
+ isOptional: true
1042
+ },
1043
+ {
1044
+ $class: "concerto.metamodel@1.0.0.LongProperty",
1045
+ name: "upper",
1046
+ isArray: false,
1047
+ isOptional: true
1048
+ }
1049
+ ]
1050
+ },
1051
+ {
1052
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
1053
+ name: "AliasedType",
1054
+ isAbstract: false,
1055
+ properties: [
1056
+ {
1057
+ $class: "concerto.metamodel@1.0.0.StringProperty",
1058
+ name: "name",
1059
+ isArray: false,
1060
+ isOptional: false
1061
+ },
1062
+ {
1063
+ $class: "concerto.metamodel@1.0.0.StringProperty",
1064
+ name: "aliasedName",
1065
+ isArray: false,
1066
+ isOptional: false
1067
+ }
1068
+ ]
1069
+ },
1070
+ {
1071
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
1072
+ name: "Import",
1073
+ isAbstract: true,
1074
+ properties: [
1075
+ {
1076
+ $class: "concerto.metamodel@1.0.0.StringProperty",
1077
+ name: "namespace",
1078
+ isArray: false,
1079
+ isOptional: false
1080
+ },
1081
+ {
1082
+ $class: "concerto.metamodel@1.0.0.StringProperty",
1083
+ name: "uri",
1084
+ isArray: false,
1085
+ isOptional: true
1086
+ }
1087
+ ]
1088
+ },
1089
+ {
1090
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
1091
+ name: "ImportAll",
1092
+ isAbstract: false,
1093
+ properties: [],
1094
+ superType: {
1095
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1096
+ name: "Import"
1097
+ }
1098
+ },
1099
+ {
1100
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
1101
+ name: "ImportType",
1102
+ isAbstract: false,
1103
+ properties: [
1104
+ {
1105
+ $class: "concerto.metamodel@1.0.0.StringProperty",
1106
+ name: "name",
1107
+ isArray: false,
1108
+ isOptional: false
1109
+ }
1110
+ ],
1111
+ superType: {
1112
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1113
+ name: "Import"
1114
+ }
1115
+ },
1116
+ {
1117
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
1118
+ name: "ImportTypes",
1119
+ isAbstract: false,
1120
+ properties: [
1121
+ {
1122
+ $class: "concerto.metamodel@1.0.0.StringProperty",
1123
+ name: "types",
1124
+ isArray: true,
1125
+ isOptional: false
1126
+ },
1127
+ {
1128
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
1129
+ name: "aliasedTypes",
1130
+ type: {
1131
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1132
+ name: "AliasedType"
1133
+ },
1134
+ isArray: true,
1135
+ isOptional: true
1136
+ }
1137
+ ],
1138
+ superType: {
1139
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1140
+ name: "Import"
1141
+ }
1142
+ },
1143
+ {
1144
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
1145
+ name: "Model",
1146
+ isAbstract: false,
1147
+ properties: [
1148
+ {
1149
+ $class: "concerto.metamodel@1.0.0.StringProperty",
1150
+ name: "namespace",
1151
+ isArray: false,
1152
+ isOptional: false
1153
+ },
1154
+ {
1155
+ $class: "concerto.metamodel@1.0.0.StringProperty",
1156
+ name: "sourceUri",
1157
+ isArray: false,
1158
+ isOptional: true
1159
+ },
1160
+ {
1161
+ $class: "concerto.metamodel@1.0.0.StringProperty",
1162
+ name: "concertoVersion",
1163
+ isArray: false,
1164
+ isOptional: true
1165
+ },
1166
+ {
1167
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
1168
+ name: "imports",
1169
+ type: {
1170
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1171
+ name: "Import"
1172
+ },
1173
+ isArray: true,
1174
+ isOptional: true
1175
+ },
1176
+ {
1177
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
1178
+ name: "declarations",
1179
+ type: {
1180
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1181
+ name: "Declaration"
1182
+ },
1183
+ isArray: true,
1184
+ isOptional: true
1185
+ },
1186
+ {
1187
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
1188
+ name: "decorators",
1189
+ type: {
1190
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1191
+ name: "Decorator"
1192
+ },
1193
+ isArray: true,
1194
+ isOptional: true
1195
+ }
1196
+ ]
1197
+ },
1198
+ {
1199
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
1200
+ name: "Models",
1201
+ isAbstract: false,
1202
+ properties: [
1203
+ {
1204
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
1205
+ name: "models",
1206
+ type: {
1207
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1208
+ name: "Model"
1209
+ },
1210
+ isArray: true,
1211
+ isOptional: false
1212
+ }
1213
+ ]
1214
+ },
1215
+ {
1216
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
1217
+ name: "ScalarDeclaration",
1218
+ isAbstract: true,
1219
+ properties: [
1220
+ {
1221
+ $class: "concerto.metamodel@1.0.0.StringProperty",
1222
+ name: "namespace",
1223
+ isArray: false,
1224
+ isOptional: true
1225
+ }
1226
+ ],
1227
+ superType: {
1228
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1229
+ name: "Declaration"
1230
+ }
1231
+ },
1232
+ {
1233
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
1234
+ name: "BooleanScalar",
1235
+ isAbstract: false,
1236
+ properties: [
1237
+ {
1238
+ $class: "concerto.metamodel@1.0.0.BooleanProperty",
1239
+ name: "defaultValue",
1240
+ isArray: false,
1241
+ isOptional: true
1242
+ }
1243
+ ],
1244
+ superType: {
1245
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1246
+ name: "ScalarDeclaration"
1247
+ }
1248
+ },
1249
+ {
1250
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
1251
+ name: "IntegerScalar",
1252
+ isAbstract: false,
1253
+ properties: [
1254
+ {
1255
+ $class: "concerto.metamodel@1.0.0.IntegerProperty",
1256
+ name: "defaultValue",
1257
+ isArray: false,
1258
+ isOptional: true
1259
+ },
1260
+ {
1261
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
1262
+ name: "validator",
1263
+ type: {
1264
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1265
+ name: "IntegerDomainValidator"
1266
+ },
1267
+ isArray: false,
1268
+ isOptional: true
1269
+ }
1270
+ ],
1271
+ superType: {
1272
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1273
+ name: "ScalarDeclaration"
1274
+ }
1275
+ },
1276
+ {
1277
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
1278
+ name: "LongScalar",
1279
+ isAbstract: false,
1280
+ properties: [
1281
+ {
1282
+ $class: "concerto.metamodel@1.0.0.LongProperty",
1283
+ name: "defaultValue",
1284
+ isArray: false,
1285
+ isOptional: true
1286
+ },
1287
+ {
1288
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
1289
+ name: "validator",
1290
+ type: {
1291
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1292
+ name: "LongDomainValidator"
1293
+ },
1294
+ isArray: false,
1295
+ isOptional: true
1296
+ }
1297
+ ],
1298
+ superType: {
1299
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1300
+ name: "ScalarDeclaration"
1301
+ }
1302
+ },
1303
+ {
1304
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
1305
+ name: "DoubleScalar",
1306
+ isAbstract: false,
1307
+ properties: [
1308
+ {
1309
+ $class: "concerto.metamodel@1.0.0.DoubleProperty",
1310
+ name: "defaultValue",
1311
+ isArray: false,
1312
+ isOptional: true
1313
+ },
1314
+ {
1315
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
1316
+ name: "validator",
1317
+ type: {
1318
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1319
+ name: "DoubleDomainValidator"
1320
+ },
1321
+ isArray: false,
1322
+ isOptional: true
1323
+ }
1324
+ ],
1325
+ superType: {
1326
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1327
+ name: "ScalarDeclaration"
1328
+ }
1329
+ },
1330
+ {
1331
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
1332
+ name: "StringScalar",
1333
+ isAbstract: false,
1334
+ properties: [
1335
+ {
1336
+ $class: "concerto.metamodel@1.0.0.StringProperty",
1337
+ name: "defaultValue",
1338
+ isArray: false,
1339
+ isOptional: true
1340
+ },
1341
+ {
1342
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
1343
+ name: "validator",
1344
+ type: {
1345
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1346
+ name: "StringRegexValidator"
1347
+ },
1348
+ isArray: false,
1349
+ isOptional: true
1350
+ },
1351
+ {
1352
+ $class: "concerto.metamodel@1.0.0.ObjectProperty",
1353
+ name: "lengthValidator",
1354
+ type: {
1355
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1356
+ name: "StringLengthValidator"
1357
+ },
1358
+ isArray: false,
1359
+ isOptional: true
1360
+ }
1361
+ ],
1362
+ superType: {
1363
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1364
+ name: "ScalarDeclaration"
1365
+ }
1366
+ },
1367
+ {
1368
+ $class: "concerto.metamodel@1.0.0.ConceptDeclaration",
1369
+ name: "DateTimeScalar",
1370
+ isAbstract: false,
1371
+ properties: [
1372
+ {
1373
+ $class: "concerto.metamodel@1.0.0.StringProperty",
1374
+ name: "defaultValue",
1375
+ isArray: false,
1376
+ isOptional: true
1377
+ }
1378
+ ],
1379
+ superType: {
1380
+ $class: "concerto.metamodel@1.0.0.TypeIdentifier",
1381
+ name: "ScalarDeclaration"
1382
+ }
1383
+ }
1384
+ ]
1385
+ };
1386
+ }
1387
+ });
1388
+
1389
+ // node_modules/@accordproject/concerto-metamodel/lib/metamodel.js
1390
+ var require_metamodel2 = __commonJS({
1391
+ "node_modules/@accordproject/concerto-metamodel/lib/metamodel.js"(exports, module) {
1392
+ "use strict";
1393
+ init_browser_process_shim();
1394
+ var metaModelCto = '/*\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@DotNetNamespace("AccordProject.Concerto.Metamodel")\nnamespace concerto.metamodel@1.0.0\n\nconcept Position {\n o Integer line\n o Integer column\n o Integer offset\n}\n\nconcept Range {\n o Position start\n o Position end\n o String source optional\n}\n\nconcept TypeIdentifier {\n o String name\n o String namespace optional\n o String resolvedName optional\n}\n\nabstract concept DecoratorLiteral {\n o Range location optional\n}\n\nconcept DecoratorString extends DecoratorLiteral {\n o String value\n}\n\nconcept DecoratorNumber extends DecoratorLiteral {\n o Double value\n}\n\nconcept DecoratorBoolean extends DecoratorLiteral {\n o Boolean value\n}\n\nconcept DecoratorTypeReference extends DecoratorLiteral {\n o TypeIdentifier type\n o Boolean isArray default=false\n}\n\nconcept Decorator {\n o String name\n o DecoratorLiteral[] arguments optional\n o Range location optional\n}\n\nconcept Identified {\n}\n\nconcept IdentifiedBy extends Identified {\n o String name\n}\n\nabstract concept Declaration {\n o String name regex=/^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$/u\n o Decorator[] decorators optional\n o Range location optional\n}\n\nabstract concept MapKeyType {\n o Decorator[] decorators optional\n o Range location optional\n}\n\nabstract concept MapValueType {\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept MapDeclaration extends Declaration {\n o MapKeyType key\n o MapValueType value\n}\n\nconcept StringMapKeyType extends MapKeyType {}\nconcept DateTimeMapKeyType extends MapKeyType {}\n\nconcept ObjectMapKeyType extends MapKeyType {\n o TypeIdentifier type\n}\n\nconcept BooleanMapValueType extends MapValueType {}\nconcept DateTimeMapValueType extends MapValueType {}\nconcept StringMapValueType extends MapValueType {}\nconcept IntegerMapValueType extends MapValueType {}\nconcept LongMapValueType extends MapValueType {}\nconcept DoubleMapValueType extends MapValueType {}\n\nconcept ObjectMapValueType extends MapValueType {\n o TypeIdentifier type\n}\n\nconcept RelationshipMapValueType extends MapValueType {\n o TypeIdentifier type\n}\n\nconcept EnumDeclaration extends Declaration {\n o EnumProperty[] properties\n}\n\nconcept EnumProperty {\n o String name regex=/^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$/u\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept ConceptDeclaration extends Declaration {\n o Boolean isAbstract default=false\n o Identified identified optional\n o TypeIdentifier superType optional\n o Property[] properties\n}\n\nconcept AssetDeclaration extends ConceptDeclaration {\n}\n\nconcept ParticipantDeclaration extends ConceptDeclaration {\n}\n\nconcept TransactionDeclaration extends ConceptDeclaration {\n}\n\nconcept EventDeclaration extends ConceptDeclaration {\n}\n\nabstract concept Property {\n o String name regex=/^(\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4})(?:\\p{Lu}|\\p{Ll}|\\p{Lt}|\\p{Lm}|\\p{Lo}|\\p{Nl}|\\$|_|\\\\u[0-9A-Fa-f]{4}|\\p{Mn}|\\p{Mc}|\\p{Nd}|\\p{Pc}|\\u200C|\\u200D)*$/u\n o Boolean isArray default=false\n o Boolean isOptional default=false\n o CollectionSizeValidator sizeValidator optional\n o Decorator[] decorators optional\n o Range location optional\n}\n\nconcept CollectionSizeValidator {\n o Integer minSize optional\n o Integer maxSize optional\n}\n\nconcept RelationshipProperty extends Property {\n o TypeIdentifier type\n}\n\nconcept ObjectProperty extends Property {\n o String defaultValue optional\n o TypeIdentifier type\n}\n\nconcept BooleanProperty extends Property {\n o Boolean defaultValue optional\n}\n\nconcept DateTimeProperty extends Property {\n}\n\nconcept StringProperty extends Property {\n o String defaultValue optional\n o StringRegexValidator validator optional\n o StringLengthValidator lengthValidator optional\n}\n\nconcept StringRegexValidator {\n o String pattern\n o String flags\n}\n\nconcept StringLengthValidator {\n o Integer minLength optional\n o Integer maxLength optional\n}\n\nconcept DoubleProperty extends Property {\n o Double defaultValue optional\n o DoubleDomainValidator validator optional\n}\n\nconcept DoubleDomainValidator {\n o Double lower optional\n o Double upper optional\n}\n\nconcept IntegerProperty extends Property {\n o Integer defaultValue optional\n o IntegerDomainValidator validator optional\n}\n\nconcept IntegerDomainValidator {\n o Integer lower optional\n o Integer upper optional\n}\n\nconcept LongProperty extends Property {\n o Long defaultValue optional\n o LongDomainValidator validator optional\n}\n\nconcept LongDomainValidator {\n o Long lower optional\n o Long upper optional\n}\n\nconcept AliasedType{\n o String name\n o String aliasedName\n}\nabstract concept Import {\n o String namespace\n o String uri optional\n}\n\nconcept ImportAll extends Import {\n}\n\nconcept ImportType extends Import {\n o String name\n}\n\nconcept ImportTypes extends Import {\n o String[] types\n o AliasedType[] aliasedTypes optional\n}\n\nconcept Model {\n o String namespace\n o String sourceUri optional\n o String concertoVersion optional\n o Import[] imports optional\n o Declaration[] declarations optional\n o Decorator[] decorators optional\n}\n\nconcept Models {\n o Model[] models\n}\n\nabstract concept ScalarDeclaration extends Declaration {\n o String namespace optional\n}\n\nconcept BooleanScalar extends ScalarDeclaration {\n o Boolean defaultValue optional\n}\n\nconcept IntegerScalar extends ScalarDeclaration {\n o Integer defaultValue optional\n o IntegerDomainValidator validator optional\n}\n\nconcept LongScalar extends ScalarDeclaration {\n o Long defaultValue optional\n o LongDomainValidator validator optional\n}\n\nconcept DoubleScalar extends ScalarDeclaration {\n o Double defaultValue optional\n o DoubleDomainValidator validator optional\n}\n\nconcept StringScalar extends ScalarDeclaration {\n o String defaultValue optional\n o StringRegexValidator validator optional\n o StringLengthValidator lengthValidator optional\n}\n\nconcept DateTimeScalar extends ScalarDeclaration {\n o String defaultValue optional\n}\n';
1395
+ module.exports = metaModelCto;
1396
+ }
1397
+ });
1398
+
1399
+ // node_modules/@accordproject/concerto-metamodel/lib/metamodelutil.js
1400
+ var require_metamodelutil = __commonJS({
1401
+ "node_modules/@accordproject/concerto-metamodel/lib/metamodelutil.js"(exports, module) {
1402
+ "use strict";
1403
+ init_browser_process_shim();
1404
+ var metaModelAst = require_metamodel();
1405
+ var MetaModelNamespace2 = "concerto.metamodel@1.0.0";
1406
+ var metaModelCto = require_metamodel2();
1407
+ function findNamespace(priorModels, namespace) {
1408
+ return priorModels.models.find((thisModel) => thisModel.namespace === namespace);
1409
+ }
1410
+ function findDeclaration(thisModel, name) {
1411
+ return thisModel.declarations.find((thisDecl) => thisDecl.name === name);
1412
+ }
1413
+ function createNameTable(priorModels, metaModel) {
1414
+ const concertoNs = "concerto@1.0.0";
1415
+ const table = {
1416
+ "Concept": { namespace: concertoNs, name: "Concept" },
1417
+ "Asset": { namespace: concertoNs, name: "Asset" },
1418
+ "Participant": { namespace: concertoNs, name: "Participant" },
1419
+ "Transaction": { namespace: concertoNs, name: "Transaction" },
1420
+ "Event": { namespace: concertoNs, name: "Event" }
1421
+ };
1422
+ (metaModel.imports || []).forEach((imp) => {
1423
+ const namespace = imp.namespace;
1424
+ const modelFile = findNamespace(priorModels, namespace);
1425
+ if (imp.$class === `${MetaModelNamespace2}.ImportType`) {
1426
+ if (!findDeclaration(modelFile, imp.name)) {
1427
+ throw new Error(`Declaration ${imp.name} in namespace ${namespace} not found`);
1428
+ }
1429
+ table[imp.name] = { namespace, name: imp.name };
1430
+ } else if (imp.$class === `${MetaModelNamespace2}.ImportTypes`) {
1431
+ const aliasedMap = imp.aliasedTypes ? new Map(imp.aliasedTypes.map(({ name, aliasedName }) => [name, aliasedName])) : /* @__PURE__ */ new Map();
1432
+ imp.types.forEach((type) => {
1433
+ const localName = aliasedMap.get(type) || type;
1434
+ if (!findDeclaration(modelFile, type)) {
1435
+ throw new Error(`Declaration ${type} in namespace ${namespace} not found`);
1436
+ }
1437
+ table[localName] = localName !== type ? { namespace, name: localName, resolvedName: type } : { namespace, name: type };
1438
+ });
1439
+ } else {
1440
+ (modelFile.declarations || []).forEach((decl) => {
1441
+ table[decl.name] = { namespace, name: decl.name };
1442
+ });
1443
+ }
1444
+ });
1445
+ (metaModel.declarations || []).forEach((decl) => {
1446
+ table[decl.name] = { namespace: metaModel.namespace, name: decl.name };
1447
+ });
1448
+ return table;
1449
+ }
1450
+ function resolveName(name, table) {
1451
+ if (!table[name]) {
1452
+ throw new Error(`Name ${name} not found`);
1453
+ }
1454
+ return table[name].namespace;
1455
+ }
1456
+ function resolveTypeNames(metaModel, table) {
1457
+ (metaModel.decorators || []).forEach((decorator) => {
1458
+ resolveTypeNames(decorator, table);
1459
+ });
1460
+ switch (metaModel.$class) {
1461
+ case `${MetaModelNamespace2}.Model`:
1462
+ {
1463
+ (metaModel.declarations || []).forEach((decl) => {
1464
+ resolveTypeNames(decl, table);
1465
+ });
1466
+ }
1467
+ break;
1468
+ case `${MetaModelNamespace2}.EnumDeclaration`:
1469
+ case `${MetaModelNamespace2}.AssetDeclaration`:
1470
+ case `${MetaModelNamespace2}.ConceptDeclaration`:
1471
+ case `${MetaModelNamespace2}.EventDeclaration`:
1472
+ case `${MetaModelNamespace2}.TransactionDeclaration`:
1473
+ case `${MetaModelNamespace2}.ParticipantDeclaration`:
1474
+ {
1475
+ if (metaModel.superType) {
1476
+ const name = metaModel.superType.name;
1477
+ metaModel.superType.namespace = resolveName(name, table);
1478
+ metaModel.superType.name = table[name].name;
1479
+ if (table[name]?.resolvedName) {
1480
+ metaModel.superType.resolvedName = table[name].resolvedName;
1481
+ }
1482
+ }
1483
+ (metaModel.properties || []).forEach((property) => {
1484
+ resolveTypeNames(property, table);
1485
+ });
1486
+ }
1487
+ break;
1488
+ case `${MetaModelNamespace2}.MapDeclaration`:
1489
+ {
1490
+ resolveTypeNames(metaModel.key, table);
1491
+ resolveTypeNames(metaModel.value, table);
1492
+ }
1493
+ break;
1494
+ case `${MetaModelNamespace2}.Decorator`:
1495
+ {
1496
+ (metaModel.arguments || []).forEach((argument) => {
1497
+ resolveTypeNames(argument, table);
1498
+ });
1499
+ }
1500
+ break;
1501
+ case `${MetaModelNamespace2}.ObjectProperty`:
1502
+ case `${MetaModelNamespace2}.RelationshipProperty`:
1503
+ case `${MetaModelNamespace2}.DecoratorTypeReference`:
1504
+ case `${MetaModelNamespace2}.ObjectMapKeyType`:
1505
+ case `${MetaModelNamespace2}.ObjectMapValueType`:
1506
+ case `${MetaModelNamespace2}.RelationshipMapValueType`:
1507
+ {
1508
+ metaModel.type.namespace = resolveName(metaModel.type.name, table);
1509
+ metaModel.type.name = table[metaModel.type.name].name;
1510
+ if (table[metaModel.type.name]?.resolvedName) {
1511
+ metaModel.type.resolvedName = table[metaModel.type.name].resolvedName;
1512
+ }
1513
+ }
1514
+ break;
1515
+ case `${MetaModelNamespace2}.StringScalar`:
1516
+ case `${MetaModelNamespace2}.BooleanScalar`:
1517
+ case `${MetaModelNamespace2}.DateTimeScalar`:
1518
+ case `${MetaModelNamespace2}.DoubleScalar`:
1519
+ case `${MetaModelNamespace2}.LongScalar`:
1520
+ case `${MetaModelNamespace2}.IntegerScalar`:
1521
+ {
1522
+ metaModel.namespace = resolveName(metaModel.name, table);
1523
+ metaModel.name = table[metaModel.name].name;
1524
+ }
1525
+ break;
1526
+ default: {
1527
+ if (!metaModel.$class) {
1528
+ throw new Error(`Unrecognized $class ${String(metaModel.$class)}`);
1529
+ }
1530
+ }
1531
+ }
1532
+ return metaModel;
1533
+ }
1534
+ function resolveLocalNames(priorModels, metaModel) {
1535
+ const result = JSON.parse(JSON.stringify(metaModel));
1536
+ const nameTable = createNameTable(priorModels, metaModel);
1537
+ resolveTypeNames(result, nameTable);
1538
+ return result;
1539
+ }
1540
+ function resolveLocalNamesForAll(allModels) {
1541
+ const result = {
1542
+ $class: `${MetaModelNamespace2}.Models`,
1543
+ models: []
1544
+ };
1545
+ allModels.models.forEach((metaModel) => {
1546
+ const resolved = resolveLocalNames(allModels, metaModel);
1547
+ result.models.push(resolved);
1548
+ });
1549
+ return result;
1550
+ }
1551
+ function importFullyQualifiedNames(imp) {
1552
+ const result = [];
1553
+ switch (imp.$class) {
1554
+ case `${MetaModelNamespace2}.ImportAll`:
1555
+ result.push(`${imp.namespace}.*`);
1556
+ break;
1557
+ case `${MetaModelNamespace2}.ImportType`:
1558
+ result.push(`${imp.namespace}.${imp.name}`);
1559
+ break;
1560
+ case `${MetaModelNamespace2}.ImportTypes`:
1561
+ {
1562
+ imp.types.forEach((type) => {
1563
+ result.push(`${imp.namespace}.${type}`);
1564
+ });
1565
+ }
1566
+ break;
1567
+ default:
1568
+ throw new Error(`Unrecognized imports ${imp.$class}`);
1569
+ }
1570
+ return result;
1571
+ }
1572
+ function getExternalImports(ast) {
1573
+ const uriMap = {};
1574
+ if (ast.imports) {
1575
+ ast.imports.forEach((imp) => {
1576
+ const fqns = importFullyQualifiedNames(imp);
1577
+ if (imp.uri) {
1578
+ uriMap[fqns[0]] = imp.uri;
1579
+ }
1580
+ });
1581
+ }
1582
+ return uriMap;
1583
+ }
1584
+ module.exports = {
1585
+ metaModelAst,
1586
+ metaModelCto,
1587
+ resolveLocalNames,
1588
+ resolveLocalNamesForAll,
1589
+ importFullyQualifiedNames,
1590
+ getExternalImports
1591
+ };
1592
+ }
1593
+ });
1594
+
1595
+ // node_modules/@accordproject/concerto-metamodel/lib/dcsmodel.js
1596
+ var require_dcsmodel = __commonJS({
1597
+ "node_modules/@accordproject/concerto-metamodel/lib/dcsmodel.js"(exports, module) {
1598
+ "use strict";
1599
+ init_browser_process_shim();
1600
+ var DcsCto = `/*
1601
+ * Licensed under the Apache License, Version 2.0 (the "License");
1602
+ * you may not use this file except in compliance with the License.
1603
+ * You may obtain a copy of the License at
1604
+ *
1605
+ * http://www.apache.org/licenses/LICENSE-2.0
1606
+ *
1607
+ * Unless required by applicable law or agreed to in writing, software
1608
+ * distributed under the License is distributed on an "AS IS" BASIS,
1609
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1610
+ * See the License for the specific language governing permissions and
1611
+ * limitations under the License.
1612
+ */
1613
+
1614
+ namespace org.accordproject.decoratorcommands@0.4.0
1615
+
1616
+ import concerto.metamodel@1.0.0.Decorator
1617
+
1618
+ /**
1619
+ * A reference to an existing named & versioned DecoratorCommandSet
1620
+ */
1621
+ concept DecoratorCommandSetReference {
1622
+ o String name
1623
+ o String version
1624
+ }
1625
+
1626
+ /**
1627
+ * Whether to upsert or append the decorator
1628
+ */
1629
+ enum CommandType {
1630
+ o UPSERT
1631
+ o APPEND
1632
+ }
1633
+
1634
+ /**
1635
+ * Which models elements to add the decorator to. Any null
1636
+ * elements are 'wildcards'.
1637
+ */
1638
+ concept CommandTarget {
1639
+ o String namespace optional
1640
+ o String declaration optional
1641
+ o String property optional
1642
+ o String[] properties optional // property and properties are mutually exclusive
1643
+ o String type optional
1644
+ o MapElement mapElement optional
1645
+ }
1646
+
1647
+ /**
1648
+ * Map Declaration elements which might be used as a target
1649
+ */
1650
+ enum MapElement {
1651
+ o KEY
1652
+ o VALUE
1653
+ o KEY_VALUE
1654
+ }
1655
+
1656
+ /**
1657
+ * Applies a decorator to a given target
1658
+ */
1659
+ concept Command {
1660
+ o CommandTarget target
1661
+ o Decorator decorator
1662
+ o CommandType type
1663
+ o String decoratorNamespace optional
1664
+ }
1665
+
1666
+ /**
1667
+ * A named and versioned set of commands. Includes are supported for modularity/reuse.
1668
+ */
1669
+ concept DecoratorCommandSet {
1670
+ o String name
1671
+ o String version
1672
+ o DecoratorCommandSetReference[] includes optional // not yet supported
1673
+ o Command[] commands
1674
+ }`;
1675
+ var DcsNamespace = "org.accordproject.decoratorcommands@0.4.0";
1676
+ module.exports = {
1677
+ DcsCto,
1678
+ DcsNamespace
1679
+ };
1680
+ }
1681
+ });
1682
+
1683
+ // node_modules/@accordproject/concerto-metamodel/index.js
1684
+ var require_concerto_metamodel = __commonJS({
1685
+ "node_modules/@accordproject/concerto-metamodel/index.js"(exports) {
1686
+ "use strict";
1687
+ init_browser_process_shim();
1688
+ var MetaModelUtil = require_metamodelutil();
1689
+ var { DcsCto, DcsNamespace } = require_dcsmodel();
1690
+ var MetaModelNamespace2 = (
1691
+ /** @type {string} */
1692
+ "concerto.metamodel@1.0.0"
1693
+ );
1694
+ exports.MetaModelUtil = MetaModelUtil;
1695
+ exports.MetaModelNamespace = MetaModelNamespace2;
1696
+ exports.DcsCto = DcsCto;
1697
+ exports.DcsNamespace = DcsNamespace;
1698
+ }
1699
+ });
1700
+
1701
+ // src/vocabularymanager.ts
1702
+ init_browser_process_shim();
1703
+ var import_concerto_metamodel = __toESM(require_concerto_metamodel());
1704
+ import { ModelUtil } from "@accordproject/concerto-core";
1705
+ var DC_NAMESPACE = "org.accordproject.decoratorcommands@0.4.0";
1706
+ function camelCaseToSentence(text) {
1707
+ const result = text.replace(/([A-Z]+)/g, " $1").trim();
1708
+ return result.charAt(0).toUpperCase() + result.slice(1);
1709
+ }
1710
+ var VocabularyManager = class _VocabularyManager {
1711
+ /**
1712
+ * Create the VocabularyManager
1713
+ * @param {*} [options] options to configure vocabulary lookup
1714
+ * @param {*} [options.missingTermGenerator] A function to call for missing terms. The function
1715
+ * should accept namespace, locale, declarationName, propertyName as arguments
1716
+ * @constructor
1717
+ */
1718
+ constructor(options) {
1719
+ this.vocabularies = {};
1720
+ this.missingTermGenerator = options ? options.missingTermGenerator : null;
1721
+ }
1722
+ /**
1723
+ * Computes a term in English based on declaration and property name.
1724
+ * @param {string} namespace the namespace
1725
+ * @param {string} locale the BCP-47 locale identifier
1726
+ * @param {string} declarationName the name of a concept or enum
1727
+ * @param {string} [propertyName] the name of a property (optional)
1728
+ * @returns {string} the term or null if it does not exist
1729
+ */
1730
+ static englishMissingTermGenerator(namespace, locale, declarationName, propertyName) {
1731
+ if (!declarationName) {
1732
+ return camelCaseToSentence(ModelUtil.parseNamespace(namespace).name);
1733
+ }
1734
+ const firstPart = propertyName ? propertyName.replace("$", "") + " of the" : "";
1735
+ return camelCaseToSentence(firstPart + declarationName);
1736
+ }
1737
+ /**
1738
+ * Removes all vocabularies
1739
+ */
1740
+ clear() {
1741
+ this.vocabularies = {};
1742
+ }
1743
+ /**
1744
+ * Removes a vocabulary from the vocabulary manager
1745
+ * @param {string} namespace the namespace for the vocabulary
1746
+ * @param {string} locale the BCP-47 locale identifier
1747
+ */
1748
+ removeVocabulary(namespace, locale) {
1749
+ delete this.vocabularies[`${namespace}/${locale}`];
1750
+ }
1751
+ /**
1752
+ * Adds a vocabulary to the vocabulary manager
1753
+ * @param {string} contents the YAML string for the vocabulary
1754
+ * @param {*} [options] options to configure vocabulary parsing
1755
+ * @param {boolean} [options.enableSafeVocabParsing] When true, ensures vocabulary values are resolved correctly as strings
1756
+ * @returns {Vocabulary} the vocabulary the was added
1757
+ */
1758
+ addVocabulary(contents, options) {
1759
+ if (!contents) {
1760
+ throw new Error("Vocabulary contents must be specified");
1761
+ }
1762
+ const voc = new vocabulary_default(this, options?.enableSafeVocabParsing ? parseVocabularyYaml(contents) : browser_default.parse(contents));
1763
+ if (this.vocabularies[voc.getIdentifier()]) {
1764
+ throw new Error("Vocabulary has already been added.");
1765
+ }
1766
+ this.vocabularies[voc.getIdentifier()] = voc;
1767
+ return voc;
1768
+ }
1769
+ /**
1770
+ * Finds the vocabulary for a requested locale, removing language
1771
+ * identifiers from the locale until the locale matches, or if no
1772
+ * vocabulary is found, null is returned
1773
+ * @param {string} requestedLocale the BCP-47 locale identifier
1774
+ * @param {Vocabulary[]} vocabularies the vocabularies to match against
1775
+ * @param {*} [options] options to configure vocabulary lookup
1776
+ * @param {*} [options.localeMatcher] Pass 'lookup' to find a general vocabulary, if available
1777
+ * @returns {Vocabulary} the most specific vocabulary, or null
1778
+ */
1779
+ static findVocabulary(requestedLocale, vocabularies, options) {
1780
+ let locale = requestedLocale;
1781
+ let done = false;
1782
+ do {
1783
+ const voc = vocabularies.find((v) => v.getLocale() === locale);
1784
+ if (voc) {
1785
+ return voc;
1786
+ }
1787
+ if (options?.localeMatcher !== "lookup") {
1788
+ done = true;
1789
+ break;
1790
+ }
1791
+ const pos = locale.lastIndexOf("-");
1792
+ if (pos === -1) {
1793
+ done = true;
1794
+ break;
1795
+ }
1796
+ locale = locale.substring(0, pos);
1797
+ } while (!done);
1798
+ return null;
1799
+ }
1800
+ /**
1801
+ * Gets a vocabulary for a given namespace plus locale
1802
+ * @param {string} namespace the namespace for the vocabulary
1803
+ * @param {string} locale the BCP-47 locale identifier
1804
+ * @param {*} [options] options to configure vocabulary lookup
1805
+ * @param {*} [options.localeMatcher] Pass 'lookup' to find a general vocabulary, if available
1806
+ * @returns {Vocabulary} the vocabulary or null if no vocabulary exists for the locale
1807
+ */
1808
+ getVocabulary(namespace, locale, options) {
1809
+ const loc = locale.toLowerCase();
1810
+ const voc = this.vocabularies[`${namespace}/${loc}`];
1811
+ if (voc) {
1812
+ return voc;
1813
+ }
1814
+ if (options?.localeMatcher === "lookup") {
1815
+ const vocs = this.getVocabulariesForNamespace(namespace);
1816
+ return _VocabularyManager.findVocabulary(loc, vocs, options);
1817
+ }
1818
+ return null;
1819
+ }
1820
+ /**
1821
+ * Gets all the vocabulary files for a given namespace
1822
+ * @param {string} namespace the namespace
1823
+ * @returns {Vocabulary[]} the array of vocabularies
1824
+ */
1825
+ getVocabulariesForNamespace(namespace) {
1826
+ return Object.values(this.vocabularies).filter((v) => v.getNamespace() === namespace);
1827
+ }
1828
+ /**
1829
+ * Gets all the vocabulary files for a given locale
1830
+ * @param {string} locale the BCP-47 locale identifier
1831
+ * @returns {Vocabulary[]} the array of vocabularies
1832
+ */
1833
+ getVocabulariesForLocale(locale) {
1834
+ return Object.values(this.vocabularies).filter((v) => v.getLocale() === locale.toLowerCase());
1835
+ }
1836
+ /**
1837
+ * Resolve the term for a property, looking up terms from a more general vocabulary
1838
+ * if required, and resolving properties using an object manager, allowing terms defined
1839
+ * on super types to be automatically resolved.
1840
+ * @param {ModelManager} modelManager the model manager
1841
+ * @param {string} namespace the namespace
1842
+ * @param {string} locale the BCP-47 locale identifier
1843
+ * @param {string} declarationName the name of a concept or enum
1844
+ * @param {string} [propertyName] the name of a property (optional)
1845
+ * @param {string} [identifier] the identifier of the term (optional)
1846
+ * @returns {string|number|boolean|null} the term or null if it does not exist
1847
+ */
1848
+ resolveTerm(modelManager, namespace, locale, declarationName, propertyName, identifier) {
1849
+ const modelFile = modelManager.getModelFile(namespace);
1850
+ const classDecl = modelFile ? modelFile.getType(declarationName) : null;
1851
+ const property = propertyName ? classDecl ? classDecl.getProperty(propertyName) : null : null;
1852
+ return this.getTerm(property ? property.getNamespace() : namespace, locale, property ? property.getParent().getName() : declarationName, propertyName, identifier);
1853
+ }
1854
+ /**
1855
+ * Resolve the terms for a property, looking up terms from a more general vocabulary
1856
+ * if required, and resolving properties using an object manager, allowing terms defined
1857
+ * on super types to be automatically resolved.
1858
+ * @param {ModelManager} modelManager the model manager
1859
+ * @param {string} namespace the namespace
1860
+ * @param {string} locale the BCP-47 locale identifier
1861
+ * @param {string} declarationName the name of a concept or enum
1862
+ * @param {string} [propertyName] the name of a property (optional)
1863
+ * @param {*} [options] options to configure term resolution
1864
+ * @param {boolean} [options.generateMissing=true] whether to synthesize missing terms
1865
+ * @returns {*} the terms or null if it does not exist
1866
+ */
1867
+ resolveTerms(modelManager, namespace, locale, declarationName, propertyName, options) {
1868
+ const modelFile = modelManager.getModelFile(namespace);
1869
+ const classDecl = modelFile ? modelFile.getType(declarationName) : null;
1870
+ let property;
1871
+ if (classDecl && !classDecl.isScalarDeclaration()) {
1872
+ if (classDecl.isMapDeclaration()) {
1873
+ if (propertyName === "KEY") {
1874
+ property = classDecl.getKey();
1875
+ } else if (propertyName === "VALUE") {
1876
+ property = classDecl.getValue();
1877
+ }
1878
+ } else {
1879
+ property = propertyName ? classDecl ? classDecl.getProperty(propertyName) : null : null;
1880
+ }
1881
+ }
1882
+ return this.getTerms(property ? property.getNamespace() : namespace, locale, property ? property.getParent().getName() : declarationName, propertyName, options);
1883
+ }
1884
+ /**
1885
+ * Gets the term for a concept, enum or property, looking up terms
1886
+ * from a more general vocabulary if required
1887
+ * @param {string} namespace the namespace
1888
+ * @param {string} locale the BCP-47 locale identifier
1889
+ * @param {string} declarationName the name of a concept or enum
1890
+ * @param {string} [propertyName] the name of a property (optional)
1891
+ * @param {string} [identifier] the identifier of the term (optional)
1892
+ * @returns {string|number|boolean|null} the term or null if it does not exist
1893
+ */
1894
+ getTerm(namespace, locale, declarationName, propertyName, identifier) {
1895
+ const voc = this.getVocabulary(namespace, locale);
1896
+ let term = null;
1897
+ if (voc) {
1898
+ term = voc.getTerm(declarationName, propertyName, identifier);
1899
+ }
1900
+ if (term != null) {
1901
+ return term;
1902
+ } else {
1903
+ const dashIndex = locale.lastIndexOf("-");
1904
+ if (dashIndex >= 0) {
1905
+ return this.getTerm(namespace, locale.substring(0, dashIndex), declarationName, propertyName, identifier);
1906
+ } else {
1907
+ return this.missingTermGenerator ? this.missingTermGenerator(namespace, locale, declarationName, propertyName) : null;
1908
+ }
1909
+ }
1910
+ }
1911
+ /**
1912
+ * Gets the term for a concept, enum or property, looking up terms
1913
+ * from a more general vocabulary if required
1914
+ * @param {string} namespace the namespace
1915
+ * @param {string} locale the BCP-47 locale identifier
1916
+ * @param {string} declarationName the name of a concept or enum
1917
+ * @param {string} [propertyName] the name of a property (optional)
1918
+ * @param {*} [options] options to configure term resolution
1919
+ * @param {boolean} [options.generateMissing=true] whether to synthesize missing terms
1920
+ * @returns {*} the terms or null if it does not exist
1921
+ */
1922
+ getTerms(namespace, locale, declarationName, propertyName, options) {
1923
+ const voc = this.getVocabulary(namespace, locale);
1924
+ let term = null;
1925
+ if (voc) {
1926
+ term = voc.getElementTerms(declarationName, propertyName);
1927
+ }
1928
+ if (term != null) {
1929
+ return term;
1930
+ } else {
1931
+ const dashIndex = locale.lastIndexOf("-");
1932
+ if (dashIndex >= 0) {
1933
+ return this.getTerms(namespace, locale.substring(0, dashIndex), declarationName, propertyName, options);
1934
+ } else {
1935
+ if (options?.generateMissing === false) {
1936
+ return;
1937
+ }
1938
+ let missingKey = propertyName ? propertyName : declarationName;
1939
+ missingKey = missingKey ? missingKey : "term";
1940
+ return this.missingTermGenerator ? { [missingKey]: this.missingTermGenerator(namespace, locale, declarationName, propertyName) } : null;
1941
+ }
1942
+ }
1943
+ }
1944
+ /**
1945
+ * Creates a DecoractorCommandSet with @Term decorators
1946
+ * to decorate all model elements based on the vocabulary for a locale.
1947
+ * Pass the return value to the DecoratorManager.decorateModel to apply
1948
+ * the decorators to a ModelManager.
1949
+ * @param {ModelManager} modelManager - the Model Manager
1950
+ * @param {string} locale the BCP-47 locale identifier
1951
+ * @returns {*} the decorator command set used to decorate the model.
1952
+ */
1953
+ generateDecoratorCommands(modelManager, locale) {
1954
+ const commands = [];
1955
+ const CLASS_COMMAND = `${DC_NAMESPACE}.Command`;
1956
+ const CLASS_TARGET = `${DC_NAMESPACE}.CommandTarget`;
1957
+ const CLASS_DECORATOR = `${import_concerto_metamodel.MetaModelNamespace}.Decorator`;
1958
+ const CLASS_DECORATOR_STRING = `${import_concerto_metamodel.MetaModelNamespace}.DecoratorString`;
1959
+ const makeCommand = (target, decoratorName, value) => ({
1960
+ "$class": CLASS_COMMAND,
1961
+ "type": "UPSERT",
1962
+ "target": target,
1963
+ "decorator": {
1964
+ "$class": CLASS_DECORATOR,
1965
+ "name": decoratorName,
1966
+ "arguments": [{ "$class": CLASS_DECORATOR_STRING, "value": value }]
1967
+ }
1968
+ });
1969
+ modelManager.getModelFiles().forEach((model) => {
1970
+ const namespace = model.getNamespace();
1971
+ const nsTerms = this.getTerms(namespace, locale, "", void 0, { generateMissing: false });
1972
+ if (nsTerms) {
1973
+ const keys = Object.keys(nsTerms);
1974
+ for (let i = 0; i < keys.length; i++) {
1975
+ const term = keys[i];
1976
+ if (term === "term") {
1977
+ commands.push(makeCommand(
1978
+ { "$class": CLASS_TARGET, "namespace": namespace },
1979
+ "Term",
1980
+ nsTerms[term]
1981
+ ));
1982
+ } else if (term !== "declarations" && term !== "namespace" && term !== "locale") {
1983
+ commands.push(makeCommand(
1984
+ { "$class": CLASS_TARGET, "namespace": namespace },
1985
+ `Term_${term}`,
1986
+ nsTerms[term]
1987
+ ));
1988
+ }
1989
+ }
1990
+ }
1991
+ model.getAllDeclarations().forEach((decl) => {
1992
+ const declName = decl.getName();
1993
+ const declTerms = this.getTerms(namespace, locale, declName);
1994
+ if (declTerms) {
1995
+ const keys = Object.keys(declTerms);
1996
+ for (let i = 0; i < keys.length; i++) {
1997
+ const term = keys[i];
1998
+ if (term === declName) {
1999
+ commands.push(makeCommand(
2000
+ { "$class": CLASS_TARGET, "namespace": namespace, "declaration": declName },
2001
+ "Term",
2002
+ declTerms[term]
2003
+ ));
2004
+ } else if (term !== "properties") {
2005
+ commands.push(makeCommand(
2006
+ { "$class": CLASS_TARGET, "namespace": namespace, "declaration": declName },
2007
+ `Term_${term}`,
2008
+ declTerms[term]
2009
+ ));
2010
+ }
2011
+ }
2012
+ }
2013
+ let propertyNames = [];
2014
+ if (decl.getProperties) {
2015
+ propertyNames = decl.getProperties().map((p) => p.getName());
2016
+ } else if (decl.isMapDeclaration?.()) {
2017
+ propertyNames = ["KEY", "VALUE"];
2018
+ } else {
2019
+ return;
2020
+ }
2021
+ for (let p = 0; p < propertyNames.length; p++) {
2022
+ const propertyName = propertyNames[p];
2023
+ const propertyTerms = this.resolveTerms(modelManager, namespace, locale, declName, propertyName);
2024
+ if (propertyTerms) {
2025
+ const propertyType = propertyName === "KEY" || propertyName === "VALUE" ? "mapElement" : "property";
2026
+ const keys = Object.keys(propertyTerms);
2027
+ for (let i = 0; i < keys.length; i++) {
2028
+ const term = keys[i];
2029
+ commands.push(makeCommand(
2030
+ { "$class": CLASS_TARGET, "namespace": namespace, "declaration": declName, [propertyType]: propertyName },
2031
+ term === propertyName ? "Term" : `Term_${term}`,
2032
+ propertyTerms[term]
2033
+ ));
2034
+ }
2035
+ }
2036
+ }
2037
+ });
2038
+ });
2039
+ return {
2040
+ "$class": `${DC_NAMESPACE}.DecoratorCommandSet`,
2041
+ "name": `terms-${locale}`,
2042
+ "version": "1.0.0",
2043
+ "commands": commands
2044
+ };
2045
+ }
2046
+ /**
2047
+ * Validates the terms in the vocabulary against the namespaces and declarations
2048
+ * within a ModelManager
2049
+ * @param {ModelManager} modelManager - the Model Manager
2050
+ * @param {string} locale the BCP-47 locale identifier
2051
+ * @returns {*} the result of validation
2052
+ */
2053
+ validate(modelManager) {
2054
+ const missingVocabularies = modelManager.getModelFiles().map((m) => this.getVocabulariesForNamespace(m.getNamespace()).length === 0 ? m.getNamespace() : null).filter((m) => m !== null);
2055
+ const additionalVocabularies = Object.values(this.vocabularies).filter((v) => !modelManager.getModelFile(v.getNamespace()));
2056
+ const result = {
2057
+ missingVocabularies,
2058
+ additionalVocabularies,
2059
+ vocabularies: {}
2060
+ };
2061
+ Object.values(this.vocabularies).forEach((voc) => {
2062
+ const vocResult = {
2063
+ locale: voc.getLocale(),
2064
+ namespace: voc.getNamespace(),
2065
+ missingTerms: [],
2066
+ additionalTerms: []
2067
+ };
2068
+ const model = modelManager.getModelFile(voc.getNamespace());
2069
+ if (model) {
2070
+ const errors = voc.validate(model);
2071
+ if (errors.missingTerms) {
2072
+ vocResult.missingTerms = vocResult.missingTerms.concat(errors.missingTerms);
2073
+ }
2074
+ if (errors.additionalTerms) {
2075
+ vocResult.additionalTerms = vocResult.additionalTerms.concat(errors.additionalTerms);
2076
+ }
2077
+ result.vocabularies[`${vocResult.namespace}/${vocResult.locale}`] = vocResult;
2078
+ }
2079
+ });
2080
+ return result;
2081
+ }
2082
+ };
2083
+ var vocabularymanager_default = VocabularyManager;
2084
+
2085
+ export {
2086
+ VocabularyManager,
2087
+ vocabularymanager_default
2088
+ };
2089
+ //# sourceMappingURL=chunk-2FE6COGH.mjs.map