@shaclmate/shacl-ast 4.0.32 → 4.0.34
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.
- package/dist/ShapesGraph.d.ts +3 -3
- package/dist/ShapesGraph.js +4 -4
- package/dist/generated.d.ts +146 -68
- package/dist/generated.js +209 -1256
- package/package.json +4 -4
package/dist/generated.js
CHANGED
|
@@ -15,6 +15,93 @@ function $compactRecord(record) {
|
|
|
15
15
|
return definedProperties;
|
|
16
16
|
}, {});
|
|
17
17
|
}
|
|
18
|
+
function $convertToBoolean(_schema, value) {
|
|
19
|
+
return Either.of(value);
|
|
20
|
+
}
|
|
21
|
+
function $convertToIdentifier(_schema, value) {
|
|
22
|
+
switch (typeof value) {
|
|
23
|
+
case "object":
|
|
24
|
+
return Either.of(value);
|
|
25
|
+
case "string":
|
|
26
|
+
return Either.of(dataFactory.namedNode(value));
|
|
27
|
+
case "undefined":
|
|
28
|
+
return Either.of(dataFactory.blankNode());
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function $convertToIdentifierProperty(identifier) {
|
|
32
|
+
switch (typeof identifier) {
|
|
33
|
+
case "function":
|
|
34
|
+
return Either.of(identifier);
|
|
35
|
+
case "object": {
|
|
36
|
+
const captureIdentifier = identifier;
|
|
37
|
+
return Either.of(() => captureIdentifier);
|
|
38
|
+
}
|
|
39
|
+
case "string": {
|
|
40
|
+
const captureIdentifier = dataFactory.namedNode(identifier);
|
|
41
|
+
return Either.of(() => captureIdentifier);
|
|
42
|
+
}
|
|
43
|
+
case "undefined": {
|
|
44
|
+
const captureIdentifier = dataFactory.blankNode();
|
|
45
|
+
return Either.of(() => captureIdentifier);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function $convertToIri(_schema, value) {
|
|
50
|
+
switch (typeof value) {
|
|
51
|
+
case "object":
|
|
52
|
+
return Either.of(value);
|
|
53
|
+
case "string":
|
|
54
|
+
return Either.of(dataFactory.namedNode(value));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function $convertToLiteral(_schema, value) {
|
|
58
|
+
if (typeof value === "object") {
|
|
59
|
+
if (value instanceof Date) {
|
|
60
|
+
return Either.of($literalFactory.date(value));
|
|
61
|
+
}
|
|
62
|
+
return Either.of(value);
|
|
63
|
+
}
|
|
64
|
+
return Either.of($literalFactory.primitive(value));
|
|
65
|
+
}
|
|
66
|
+
function $convertToMaybe(convertToItem) {
|
|
67
|
+
return (schema, value) => {
|
|
68
|
+
switch (typeof value) {
|
|
69
|
+
case "object": {
|
|
70
|
+
if (Maybe.isMaybe(value)) {
|
|
71
|
+
return Either.of(value);
|
|
72
|
+
}
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
case "undefined":
|
|
76
|
+
return Either.of(Maybe.empty());
|
|
77
|
+
}
|
|
78
|
+
return convertToItem(schema.item(), value).map(Maybe.of);
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function $convertToNumeric(_schema, value) {
|
|
82
|
+
return Either.of(value);
|
|
83
|
+
}
|
|
84
|
+
function $convertToObject(_schema, value) {
|
|
85
|
+
return Either.of(value);
|
|
86
|
+
}
|
|
87
|
+
function $convertToReadonlyArray(convertToItem) {
|
|
88
|
+
return (schema, value) => {
|
|
89
|
+
return (typeof value === "undefined"
|
|
90
|
+
? Either.of([])
|
|
91
|
+
: Either.sequence(value.map((item) => convertToItem(schema.item(), item)))).chain((array) => {
|
|
92
|
+
if (schema.minCount !== undefined && array.length < schema.minCount) {
|
|
93
|
+
return Left(new Error(`array has length (${array.length}) less than minCount (${schema.minCount})`));
|
|
94
|
+
}
|
|
95
|
+
return Either.of(array);
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function $convertToString(_schema, value) {
|
|
100
|
+
return Either.of(value);
|
|
101
|
+
}
|
|
102
|
+
function $convertToTerm(_schema, value) {
|
|
103
|
+
return Either.of(value);
|
|
104
|
+
}
|
|
18
105
|
function $filterArray(filterItem) {
|
|
19
106
|
return (filter, values) => {
|
|
20
107
|
for (const value of values) {
|
|
@@ -172,21 +259,6 @@ class $IdentifierSet {
|
|
|
172
259
|
}
|
|
173
260
|
}
|
|
174
261
|
}
|
|
175
|
-
function $isReadonlyBigIntArray(x) {
|
|
176
|
-
return Array.isArray(x) && x.every((z) => typeof z === "bigint");
|
|
177
|
-
}
|
|
178
|
-
function $isReadonlyBooleanArray(x) {
|
|
179
|
-
return Array.isArray(x) && x.every((z) => typeof z === "boolean");
|
|
180
|
-
}
|
|
181
|
-
function $isReadonlyNumberArray(x) {
|
|
182
|
-
return Array.isArray(x) && x.every((z) => typeof z === "number");
|
|
183
|
-
}
|
|
184
|
-
function $isReadonlyObjectArray(x) {
|
|
185
|
-
return Array.isArray(x) && x.every((z) => typeof z === "object");
|
|
186
|
-
}
|
|
187
|
-
function $isReadonlyStringArray(x) {
|
|
188
|
-
return Array.isArray(x) && x.every((z) => typeof z === "string");
|
|
189
|
-
}
|
|
190
262
|
const $literalFactory = new LiteralFactory({ dataFactory: dataFactory });
|
|
191
263
|
const $parseIdentifier = NTriplesIdentifier.parser(dataFactory);
|
|
192
264
|
export var $PropertyPath;
|
|
@@ -293,595 +365,53 @@ function $wrap_ToRdfResourceFunction(_toRdfResourceFunction) {
|
|
|
293
365
|
export var PropertyShape;
|
|
294
366
|
(function (PropertyShape) {
|
|
295
367
|
function create(parameters) {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
$
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
$
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
$
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
$
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
$
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
}
|
|
338
|
-
else if ($isReadonlyStringArray(parameters.classes)) {
|
|
339
|
-
classes = parameters.classes.map((item) => dataFactory.namedNode(item));
|
|
340
|
-
}
|
|
341
|
-
else {
|
|
342
|
-
classes = parameters.classes;
|
|
343
|
-
}
|
|
344
|
-
let comment;
|
|
345
|
-
if (Maybe.isMaybe(parameters.comment)) {
|
|
346
|
-
comment = parameters.comment;
|
|
347
|
-
}
|
|
348
|
-
else if (typeof parameters.comment === "string") {
|
|
349
|
-
comment = Maybe.of(parameters.comment);
|
|
350
|
-
}
|
|
351
|
-
else if (parameters.comment === undefined) {
|
|
352
|
-
comment = Maybe.empty();
|
|
353
|
-
}
|
|
354
|
-
else {
|
|
355
|
-
comment = parameters.comment;
|
|
356
|
-
}
|
|
357
|
-
let datatype;
|
|
358
|
-
if (Maybe.isMaybe(parameters.datatype)) {
|
|
359
|
-
datatype = parameters.datatype;
|
|
360
|
-
}
|
|
361
|
-
else if (typeof parameters.datatype === "object") {
|
|
362
|
-
datatype = Maybe.of(parameters.datatype);
|
|
363
|
-
}
|
|
364
|
-
else if (typeof parameters.datatype === "string") {
|
|
365
|
-
datatype = Maybe.of(dataFactory.namedNode(parameters.datatype));
|
|
366
|
-
}
|
|
367
|
-
else if (parameters.datatype === undefined) {
|
|
368
|
-
datatype = Maybe.empty();
|
|
369
|
-
}
|
|
370
|
-
else {
|
|
371
|
-
datatype = parameters.datatype;
|
|
372
|
-
}
|
|
373
|
-
let deactivated;
|
|
374
|
-
if (Maybe.isMaybe(parameters.deactivated)) {
|
|
375
|
-
deactivated = parameters.deactivated;
|
|
376
|
-
}
|
|
377
|
-
else if (typeof parameters.deactivated === "boolean") {
|
|
378
|
-
deactivated = Maybe.of(parameters.deactivated);
|
|
379
|
-
}
|
|
380
|
-
else if (parameters.deactivated === undefined) {
|
|
381
|
-
deactivated = Maybe.empty();
|
|
382
|
-
}
|
|
383
|
-
else {
|
|
384
|
-
deactivated = parameters.deactivated;
|
|
385
|
-
}
|
|
386
|
-
let defaultValue;
|
|
387
|
-
if (Maybe.isMaybe(parameters.defaultValue)) {
|
|
388
|
-
defaultValue = parameters.defaultValue;
|
|
389
|
-
}
|
|
390
|
-
else if (typeof parameters.defaultValue === "bigint") {
|
|
391
|
-
defaultValue = Maybe.of($literalFactory.bigint(parameters.defaultValue));
|
|
392
|
-
}
|
|
393
|
-
else if (typeof parameters.defaultValue === "boolean") {
|
|
394
|
-
defaultValue = Maybe.of($literalFactory.boolean(parameters.defaultValue));
|
|
395
|
-
}
|
|
396
|
-
else if (typeof parameters.defaultValue === "object" &&
|
|
397
|
-
parameters.defaultValue instanceof Date) {
|
|
398
|
-
defaultValue = Maybe.of($literalFactory.date(parameters.defaultValue));
|
|
399
|
-
}
|
|
400
|
-
else if (typeof parameters.defaultValue === "number") {
|
|
401
|
-
defaultValue = Maybe.of($literalFactory.number(parameters.defaultValue));
|
|
402
|
-
}
|
|
403
|
-
else if (typeof parameters.defaultValue === "string") {
|
|
404
|
-
defaultValue = Maybe.of($literalFactory.string(parameters.defaultValue));
|
|
405
|
-
}
|
|
406
|
-
else if (typeof parameters.defaultValue === "object") {
|
|
407
|
-
defaultValue = Maybe.of(parameters.defaultValue);
|
|
408
|
-
}
|
|
409
|
-
else if (parameters.defaultValue === undefined) {
|
|
410
|
-
defaultValue = Maybe.empty();
|
|
411
|
-
}
|
|
412
|
-
else {
|
|
413
|
-
defaultValue = parameters.defaultValue;
|
|
414
|
-
}
|
|
415
|
-
let description;
|
|
416
|
-
if (Maybe.isMaybe(parameters.description)) {
|
|
417
|
-
description = parameters.description;
|
|
418
|
-
}
|
|
419
|
-
else if (typeof parameters.description === "string") {
|
|
420
|
-
description = Maybe.of(parameters.description);
|
|
421
|
-
}
|
|
422
|
-
else if (parameters.description === undefined) {
|
|
423
|
-
description = Maybe.empty();
|
|
424
|
-
}
|
|
425
|
-
else {
|
|
426
|
-
description = parameters.description;
|
|
427
|
-
}
|
|
428
|
-
let flags;
|
|
429
|
-
if (parameters.flags === undefined) {
|
|
430
|
-
flags = [];
|
|
431
|
-
}
|
|
432
|
-
else if (typeof parameters.flags === "object") {
|
|
433
|
-
flags = parameters.flags;
|
|
434
|
-
}
|
|
435
|
-
else {
|
|
436
|
-
flags = parameters.flags;
|
|
437
|
-
}
|
|
438
|
-
let groups;
|
|
439
|
-
if (parameters.groups === undefined) {
|
|
440
|
-
groups = [];
|
|
441
|
-
}
|
|
442
|
-
else if ($isReadonlyObjectArray(parameters.groups)) {
|
|
443
|
-
groups = parameters.groups;
|
|
444
|
-
}
|
|
445
|
-
else if ($isReadonlyStringArray(parameters.groups)) {
|
|
446
|
-
groups = parameters.groups.map((item) => dataFactory.namedNode(item));
|
|
447
|
-
}
|
|
448
|
-
else {
|
|
449
|
-
groups = parameters.groups;
|
|
450
|
-
}
|
|
451
|
-
let hasValues;
|
|
452
|
-
if (parameters.hasValues === undefined) {
|
|
453
|
-
hasValues = [];
|
|
454
|
-
}
|
|
455
|
-
else if ($isReadonlyObjectArray(parameters.hasValues)) {
|
|
456
|
-
hasValues = parameters.hasValues;
|
|
457
|
-
}
|
|
458
|
-
else if ($isReadonlyBigIntArray(parameters.hasValues)) {
|
|
459
|
-
hasValues = parameters.hasValues.map((item) => $literalFactory.bigint(item));
|
|
460
|
-
}
|
|
461
|
-
else if ($isReadonlyBooleanArray(parameters.hasValues)) {
|
|
462
|
-
hasValues = parameters.hasValues.map((item) => $literalFactory.boolean(item));
|
|
463
|
-
}
|
|
464
|
-
else if ($isReadonlyNumberArray(parameters.hasValues)) {
|
|
465
|
-
hasValues = parameters.hasValues.map((item) => $literalFactory.number(item));
|
|
466
|
-
}
|
|
467
|
-
else if ($isReadonlyStringArray(parameters.hasValues)) {
|
|
468
|
-
hasValues = parameters.hasValues.map((item) => $literalFactory.string(item));
|
|
469
|
-
}
|
|
470
|
-
else {
|
|
471
|
-
hasValues = parameters.hasValues;
|
|
472
|
-
}
|
|
473
|
-
let in_;
|
|
474
|
-
if (Maybe.isMaybe(parameters.in_)) {
|
|
475
|
-
in_ = parameters.in_;
|
|
476
|
-
}
|
|
477
|
-
else if ($isReadonlyObjectArray(parameters.in_)) {
|
|
478
|
-
in_ = Maybe.of(parameters.in_);
|
|
479
|
-
}
|
|
480
|
-
else if ($isReadonlyBigIntArray(parameters.in_)) {
|
|
481
|
-
in_ = Maybe.of(parameters.in_.map((item) => $literalFactory.bigint(item)));
|
|
482
|
-
}
|
|
483
|
-
else if ($isReadonlyBooleanArray(parameters.in_)) {
|
|
484
|
-
in_ = Maybe.of(parameters.in_.map((item) => $literalFactory.boolean(item)));
|
|
485
|
-
}
|
|
486
|
-
else if ($isReadonlyNumberArray(parameters.in_)) {
|
|
487
|
-
in_ = Maybe.of(parameters.in_.map((item) => $literalFactory.number(item)));
|
|
488
|
-
}
|
|
489
|
-
else if ($isReadonlyStringArray(parameters.in_)) {
|
|
490
|
-
in_ = Maybe.of(parameters.in_.map((item) => $literalFactory.string(item)));
|
|
491
|
-
}
|
|
492
|
-
else if (parameters.in_ === undefined) {
|
|
493
|
-
in_ = Maybe.empty();
|
|
494
|
-
}
|
|
495
|
-
else {
|
|
496
|
-
in_ = parameters.in_;
|
|
497
|
-
}
|
|
498
|
-
let isDefinedBy;
|
|
499
|
-
if (Maybe.isMaybe(parameters.isDefinedBy)) {
|
|
500
|
-
isDefinedBy = parameters.isDefinedBy;
|
|
501
|
-
}
|
|
502
|
-
else if (typeof parameters.isDefinedBy === "object") {
|
|
503
|
-
isDefinedBy = Maybe.of(parameters.isDefinedBy);
|
|
504
|
-
}
|
|
505
|
-
else if (typeof parameters.isDefinedBy === "string") {
|
|
506
|
-
isDefinedBy = Maybe.of(dataFactory.namedNode(parameters.isDefinedBy));
|
|
507
|
-
}
|
|
508
|
-
else if (parameters.isDefinedBy === undefined) {
|
|
509
|
-
isDefinedBy = Maybe.empty();
|
|
510
|
-
}
|
|
511
|
-
else {
|
|
512
|
-
isDefinedBy = parameters.isDefinedBy;
|
|
513
|
-
}
|
|
514
|
-
let label;
|
|
515
|
-
if (Maybe.isMaybe(parameters.label)) {
|
|
516
|
-
label = parameters.label;
|
|
517
|
-
}
|
|
518
|
-
else if (typeof parameters.label === "string") {
|
|
519
|
-
label = Maybe.of(parameters.label);
|
|
520
|
-
}
|
|
521
|
-
else if (parameters.label === undefined) {
|
|
522
|
-
label = Maybe.empty();
|
|
523
|
-
}
|
|
524
|
-
else {
|
|
525
|
-
label = parameters.label;
|
|
526
|
-
}
|
|
527
|
-
let languageIn;
|
|
528
|
-
if (Maybe.isMaybe(parameters.languageIn)) {
|
|
529
|
-
languageIn = parameters.languageIn;
|
|
530
|
-
}
|
|
531
|
-
else if (typeof parameters.languageIn === "object") {
|
|
532
|
-
languageIn = Maybe.of(parameters.languageIn);
|
|
533
|
-
}
|
|
534
|
-
else if (parameters.languageIn === undefined) {
|
|
535
|
-
languageIn = Maybe.empty();
|
|
536
|
-
}
|
|
537
|
-
else {
|
|
538
|
-
languageIn = parameters.languageIn;
|
|
539
|
-
}
|
|
540
|
-
let maxCount;
|
|
541
|
-
if (Maybe.isMaybe(parameters.maxCount)) {
|
|
542
|
-
maxCount = parameters.maxCount;
|
|
543
|
-
}
|
|
544
|
-
else if (typeof parameters.maxCount === "bigint") {
|
|
545
|
-
maxCount = Maybe.of(parameters.maxCount);
|
|
546
|
-
}
|
|
547
|
-
else if (typeof parameters.maxCount === "number") {
|
|
548
|
-
maxCount = Maybe.of(BigInt(parameters.maxCount));
|
|
549
|
-
}
|
|
550
|
-
else if (parameters.maxCount === undefined) {
|
|
551
|
-
maxCount = Maybe.empty();
|
|
552
|
-
}
|
|
553
|
-
else {
|
|
554
|
-
maxCount = parameters.maxCount;
|
|
555
|
-
}
|
|
556
|
-
let maxExclusive;
|
|
557
|
-
if (Maybe.isMaybe(parameters.maxExclusive)) {
|
|
558
|
-
maxExclusive = parameters.maxExclusive;
|
|
559
|
-
}
|
|
560
|
-
else if (typeof parameters.maxExclusive === "bigint") {
|
|
561
|
-
maxExclusive = Maybe.of($literalFactory.bigint(parameters.maxExclusive));
|
|
562
|
-
}
|
|
563
|
-
else if (typeof parameters.maxExclusive === "boolean") {
|
|
564
|
-
maxExclusive = Maybe.of($literalFactory.boolean(parameters.maxExclusive));
|
|
565
|
-
}
|
|
566
|
-
else if (typeof parameters.maxExclusive === "object" &&
|
|
567
|
-
parameters.maxExclusive instanceof Date) {
|
|
568
|
-
maxExclusive = Maybe.of($literalFactory.date(parameters.maxExclusive));
|
|
569
|
-
}
|
|
570
|
-
else if (typeof parameters.maxExclusive === "number") {
|
|
571
|
-
maxExclusive = Maybe.of($literalFactory.number(parameters.maxExclusive));
|
|
572
|
-
}
|
|
573
|
-
else if (typeof parameters.maxExclusive === "string") {
|
|
574
|
-
maxExclusive = Maybe.of($literalFactory.string(parameters.maxExclusive));
|
|
575
|
-
}
|
|
576
|
-
else if (typeof parameters.maxExclusive === "object") {
|
|
577
|
-
maxExclusive = Maybe.of(parameters.maxExclusive);
|
|
578
|
-
}
|
|
579
|
-
else if (parameters.maxExclusive === undefined) {
|
|
580
|
-
maxExclusive = Maybe.empty();
|
|
581
|
-
}
|
|
582
|
-
else {
|
|
583
|
-
maxExclusive = parameters.maxExclusive;
|
|
584
|
-
}
|
|
585
|
-
let maxInclusive;
|
|
586
|
-
if (Maybe.isMaybe(parameters.maxInclusive)) {
|
|
587
|
-
maxInclusive = parameters.maxInclusive;
|
|
588
|
-
}
|
|
589
|
-
else if (typeof parameters.maxInclusive === "bigint") {
|
|
590
|
-
maxInclusive = Maybe.of($literalFactory.bigint(parameters.maxInclusive));
|
|
591
|
-
}
|
|
592
|
-
else if (typeof parameters.maxInclusive === "boolean") {
|
|
593
|
-
maxInclusive = Maybe.of($literalFactory.boolean(parameters.maxInclusive));
|
|
594
|
-
}
|
|
595
|
-
else if (typeof parameters.maxInclusive === "object" &&
|
|
596
|
-
parameters.maxInclusive instanceof Date) {
|
|
597
|
-
maxInclusive = Maybe.of($literalFactory.date(parameters.maxInclusive));
|
|
598
|
-
}
|
|
599
|
-
else if (typeof parameters.maxInclusive === "number") {
|
|
600
|
-
maxInclusive = Maybe.of($literalFactory.number(parameters.maxInclusive));
|
|
601
|
-
}
|
|
602
|
-
else if (typeof parameters.maxInclusive === "string") {
|
|
603
|
-
maxInclusive = Maybe.of($literalFactory.string(parameters.maxInclusive));
|
|
604
|
-
}
|
|
605
|
-
else if (typeof parameters.maxInclusive === "object") {
|
|
606
|
-
maxInclusive = Maybe.of(parameters.maxInclusive);
|
|
607
|
-
}
|
|
608
|
-
else if (parameters.maxInclusive === undefined) {
|
|
609
|
-
maxInclusive = Maybe.empty();
|
|
610
|
-
}
|
|
611
|
-
else {
|
|
612
|
-
maxInclusive = parameters.maxInclusive;
|
|
613
|
-
}
|
|
614
|
-
let maxLength;
|
|
615
|
-
if (Maybe.isMaybe(parameters.maxLength)) {
|
|
616
|
-
maxLength = parameters.maxLength;
|
|
617
|
-
}
|
|
618
|
-
else if (typeof parameters.maxLength === "bigint") {
|
|
619
|
-
maxLength = Maybe.of(parameters.maxLength);
|
|
620
|
-
}
|
|
621
|
-
else if (typeof parameters.maxLength === "number") {
|
|
622
|
-
maxLength = Maybe.of(BigInt(parameters.maxLength));
|
|
623
|
-
}
|
|
624
|
-
else if (parameters.maxLength === undefined) {
|
|
625
|
-
maxLength = Maybe.empty();
|
|
626
|
-
}
|
|
627
|
-
else {
|
|
628
|
-
maxLength = parameters.maxLength;
|
|
629
|
-
}
|
|
630
|
-
let minCount;
|
|
631
|
-
if (Maybe.isMaybe(parameters.minCount)) {
|
|
632
|
-
minCount = parameters.minCount;
|
|
633
|
-
}
|
|
634
|
-
else if (typeof parameters.minCount === "bigint") {
|
|
635
|
-
minCount = Maybe.of(parameters.minCount);
|
|
636
|
-
}
|
|
637
|
-
else if (typeof parameters.minCount === "number") {
|
|
638
|
-
minCount = Maybe.of(BigInt(parameters.minCount));
|
|
639
|
-
}
|
|
640
|
-
else if (parameters.minCount === undefined) {
|
|
641
|
-
minCount = Maybe.empty();
|
|
642
|
-
}
|
|
643
|
-
else {
|
|
644
|
-
minCount = parameters.minCount;
|
|
645
|
-
}
|
|
646
|
-
let minExclusive;
|
|
647
|
-
if (Maybe.isMaybe(parameters.minExclusive)) {
|
|
648
|
-
minExclusive = parameters.minExclusive;
|
|
649
|
-
}
|
|
650
|
-
else if (typeof parameters.minExclusive === "bigint") {
|
|
651
|
-
minExclusive = Maybe.of($literalFactory.bigint(parameters.minExclusive));
|
|
652
|
-
}
|
|
653
|
-
else if (typeof parameters.minExclusive === "boolean") {
|
|
654
|
-
minExclusive = Maybe.of($literalFactory.boolean(parameters.minExclusive));
|
|
655
|
-
}
|
|
656
|
-
else if (typeof parameters.minExclusive === "object" &&
|
|
657
|
-
parameters.minExclusive instanceof Date) {
|
|
658
|
-
minExclusive = Maybe.of($literalFactory.date(parameters.minExclusive));
|
|
659
|
-
}
|
|
660
|
-
else if (typeof parameters.minExclusive === "number") {
|
|
661
|
-
minExclusive = Maybe.of($literalFactory.number(parameters.minExclusive));
|
|
662
|
-
}
|
|
663
|
-
else if (typeof parameters.minExclusive === "string") {
|
|
664
|
-
minExclusive = Maybe.of($literalFactory.string(parameters.minExclusive));
|
|
665
|
-
}
|
|
666
|
-
else if (typeof parameters.minExclusive === "object") {
|
|
667
|
-
minExclusive = Maybe.of(parameters.minExclusive);
|
|
668
|
-
}
|
|
669
|
-
else if (parameters.minExclusive === undefined) {
|
|
670
|
-
minExclusive = Maybe.empty();
|
|
671
|
-
}
|
|
672
|
-
else {
|
|
673
|
-
minExclusive = parameters.minExclusive;
|
|
674
|
-
}
|
|
675
|
-
let minInclusive;
|
|
676
|
-
if (Maybe.isMaybe(parameters.minInclusive)) {
|
|
677
|
-
minInclusive = parameters.minInclusive;
|
|
678
|
-
}
|
|
679
|
-
else if (typeof parameters.minInclusive === "bigint") {
|
|
680
|
-
minInclusive = Maybe.of($literalFactory.bigint(parameters.minInclusive));
|
|
681
|
-
}
|
|
682
|
-
else if (typeof parameters.minInclusive === "boolean") {
|
|
683
|
-
minInclusive = Maybe.of($literalFactory.boolean(parameters.minInclusive));
|
|
684
|
-
}
|
|
685
|
-
else if (typeof parameters.minInclusive === "object" &&
|
|
686
|
-
parameters.minInclusive instanceof Date) {
|
|
687
|
-
minInclusive = Maybe.of($literalFactory.date(parameters.minInclusive));
|
|
688
|
-
}
|
|
689
|
-
else if (typeof parameters.minInclusive === "number") {
|
|
690
|
-
minInclusive = Maybe.of($literalFactory.number(parameters.minInclusive));
|
|
691
|
-
}
|
|
692
|
-
else if (typeof parameters.minInclusive === "string") {
|
|
693
|
-
minInclusive = Maybe.of($literalFactory.string(parameters.minInclusive));
|
|
694
|
-
}
|
|
695
|
-
else if (typeof parameters.minInclusive === "object") {
|
|
696
|
-
minInclusive = Maybe.of(parameters.minInclusive);
|
|
697
|
-
}
|
|
698
|
-
else if (parameters.minInclusive === undefined) {
|
|
699
|
-
minInclusive = Maybe.empty();
|
|
700
|
-
}
|
|
701
|
-
else {
|
|
702
|
-
minInclusive = parameters.minInclusive;
|
|
703
|
-
}
|
|
704
|
-
let minLength;
|
|
705
|
-
if (Maybe.isMaybe(parameters.minLength)) {
|
|
706
|
-
minLength = parameters.minLength;
|
|
707
|
-
}
|
|
708
|
-
else if (typeof parameters.minLength === "bigint") {
|
|
709
|
-
minLength = Maybe.of(parameters.minLength);
|
|
710
|
-
}
|
|
711
|
-
else if (typeof parameters.minLength === "number") {
|
|
712
|
-
minLength = Maybe.of(BigInt(parameters.minLength));
|
|
713
|
-
}
|
|
714
|
-
else if (parameters.minLength === undefined) {
|
|
715
|
-
minLength = Maybe.empty();
|
|
716
|
-
}
|
|
717
|
-
else {
|
|
718
|
-
minLength = parameters.minLength;
|
|
719
|
-
}
|
|
720
|
-
let name;
|
|
721
|
-
if (Maybe.isMaybe(parameters.name)) {
|
|
722
|
-
name = parameters.name;
|
|
723
|
-
}
|
|
724
|
-
else if (typeof parameters.name === "string") {
|
|
725
|
-
name = Maybe.of(parameters.name);
|
|
726
|
-
}
|
|
727
|
-
else if (parameters.name === undefined) {
|
|
728
|
-
name = Maybe.empty();
|
|
729
|
-
}
|
|
730
|
-
else {
|
|
731
|
-
name = parameters.name;
|
|
732
|
-
}
|
|
733
|
-
let node;
|
|
734
|
-
if (Maybe.isMaybe(parameters.node)) {
|
|
735
|
-
node = parameters.node;
|
|
736
|
-
}
|
|
737
|
-
else if (typeof parameters.node === "object") {
|
|
738
|
-
node = Maybe.of(parameters.node);
|
|
739
|
-
}
|
|
740
|
-
else if (typeof parameters.node === "string") {
|
|
741
|
-
node = Maybe.of(dataFactory.namedNode(parameters.node));
|
|
742
|
-
}
|
|
743
|
-
else if (parameters.node === undefined) {
|
|
744
|
-
node = Maybe.empty();
|
|
745
|
-
}
|
|
746
|
-
else {
|
|
747
|
-
node = parameters.node;
|
|
748
|
-
}
|
|
749
|
-
let nodeKind;
|
|
750
|
-
if (Maybe.isMaybe(parameters.nodeKind)) {
|
|
751
|
-
nodeKind = parameters.nodeKind;
|
|
752
|
-
}
|
|
753
|
-
else if (typeof parameters.nodeKind === "object") {
|
|
754
|
-
nodeKind = Maybe.of(parameters.nodeKind);
|
|
755
|
-
}
|
|
756
|
-
else if (typeof parameters.nodeKind === "string") {
|
|
757
|
-
nodeKind = Maybe.of(dataFactory.namedNode(parameters.nodeKind));
|
|
758
|
-
}
|
|
759
|
-
else if (parameters.nodeKind === undefined) {
|
|
760
|
-
nodeKind = Maybe.empty();
|
|
761
|
-
}
|
|
762
|
-
else {
|
|
763
|
-
nodeKind = parameters.nodeKind;
|
|
764
|
-
}
|
|
765
|
-
let not;
|
|
766
|
-
if (parameters.not === undefined) {
|
|
767
|
-
not = [];
|
|
768
|
-
}
|
|
769
|
-
else if ($isReadonlyObjectArray(parameters.not)) {
|
|
770
|
-
not = parameters.not;
|
|
771
|
-
}
|
|
772
|
-
else if ($isReadonlyStringArray(parameters.not)) {
|
|
773
|
-
not = parameters.not.map((item) => dataFactory.namedNode(item));
|
|
774
|
-
}
|
|
775
|
-
else {
|
|
776
|
-
not = parameters.not;
|
|
777
|
-
}
|
|
778
|
-
let or;
|
|
779
|
-
if (Maybe.isMaybe(parameters.or)) {
|
|
780
|
-
or = parameters.or;
|
|
781
|
-
}
|
|
782
|
-
else if ($isReadonlyObjectArray(parameters.or)) {
|
|
783
|
-
or = Maybe.of(parameters.or);
|
|
784
|
-
}
|
|
785
|
-
else if ($isReadonlyStringArray(parameters.or)) {
|
|
786
|
-
or = Maybe.of(parameters.or.map((item) => dataFactory.namedNode(item)));
|
|
787
|
-
}
|
|
788
|
-
else if (parameters.or === undefined) {
|
|
789
|
-
or = Maybe.empty();
|
|
790
|
-
}
|
|
791
|
-
else {
|
|
792
|
-
or = parameters.or;
|
|
793
|
-
}
|
|
794
|
-
let order;
|
|
795
|
-
if (Maybe.isMaybe(parameters.order)) {
|
|
796
|
-
order = parameters.order;
|
|
797
|
-
}
|
|
798
|
-
else if (typeof parameters.order === "number") {
|
|
799
|
-
order = Maybe.of(parameters.order);
|
|
800
|
-
}
|
|
801
|
-
else if (parameters.order === undefined) {
|
|
802
|
-
order = Maybe.empty();
|
|
803
|
-
}
|
|
804
|
-
else {
|
|
805
|
-
order = parameters.order;
|
|
806
|
-
}
|
|
807
|
-
const path = parameters.path;
|
|
808
|
-
let patterns;
|
|
809
|
-
if (parameters.patterns === undefined) {
|
|
810
|
-
patterns = [];
|
|
811
|
-
}
|
|
812
|
-
else if (typeof parameters.patterns === "object") {
|
|
813
|
-
patterns = parameters.patterns;
|
|
814
|
-
}
|
|
815
|
-
else {
|
|
816
|
-
patterns = parameters.patterns;
|
|
817
|
-
}
|
|
818
|
-
let uniqueLang;
|
|
819
|
-
if (Maybe.isMaybe(parameters.uniqueLang)) {
|
|
820
|
-
uniqueLang = parameters.uniqueLang;
|
|
821
|
-
}
|
|
822
|
-
else if (typeof parameters.uniqueLang === "boolean") {
|
|
823
|
-
uniqueLang = Maybe.of(parameters.uniqueLang);
|
|
824
|
-
}
|
|
825
|
-
else if (parameters.uniqueLang === undefined) {
|
|
826
|
-
uniqueLang = Maybe.empty();
|
|
827
|
-
}
|
|
828
|
-
else {
|
|
829
|
-
uniqueLang = parameters.uniqueLang;
|
|
830
|
-
}
|
|
831
|
-
let xone;
|
|
832
|
-
if (Maybe.isMaybe(parameters.xone)) {
|
|
833
|
-
xone = parameters.xone;
|
|
834
|
-
}
|
|
835
|
-
else if ($isReadonlyObjectArray(parameters.xone)) {
|
|
836
|
-
xone = Maybe.of(parameters.xone);
|
|
837
|
-
}
|
|
838
|
-
else if ($isReadonlyStringArray(parameters.xone)) {
|
|
839
|
-
xone = Maybe.of(parameters.xone.map((item) => dataFactory.namedNode(item)));
|
|
840
|
-
}
|
|
841
|
-
else if (parameters.xone === undefined) {
|
|
842
|
-
xone = Maybe.empty();
|
|
843
|
-
}
|
|
844
|
-
else {
|
|
845
|
-
xone = parameters.xone;
|
|
846
|
-
}
|
|
847
|
-
return {
|
|
848
|
-
$identifier,
|
|
849
|
-
$type,
|
|
850
|
-
and,
|
|
851
|
-
classes,
|
|
852
|
-
comment,
|
|
853
|
-
datatype,
|
|
854
|
-
deactivated,
|
|
855
|
-
defaultValue,
|
|
856
|
-
description,
|
|
857
|
-
flags,
|
|
858
|
-
groups,
|
|
859
|
-
hasValues,
|
|
860
|
-
in_,
|
|
861
|
-
isDefinedBy,
|
|
862
|
-
label,
|
|
863
|
-
languageIn,
|
|
864
|
-
maxCount,
|
|
865
|
-
maxExclusive,
|
|
866
|
-
maxInclusive,
|
|
867
|
-
maxLength,
|
|
868
|
-
minCount,
|
|
869
|
-
minExclusive,
|
|
870
|
-
minInclusive,
|
|
871
|
-
minLength,
|
|
872
|
-
name,
|
|
873
|
-
node,
|
|
874
|
-
nodeKind,
|
|
875
|
-
not,
|
|
876
|
-
or,
|
|
877
|
-
order,
|
|
878
|
-
path,
|
|
879
|
-
patterns,
|
|
880
|
-
uniqueLang,
|
|
881
|
-
xone,
|
|
882
|
-
};
|
|
368
|
+
return $sequenceRecord({
|
|
369
|
+
$identifier: $convertToIdentifierProperty(parameters.$identifier),
|
|
370
|
+
and: $convertToMaybe($convertToReadonlyArray($convertToIdentifier))(PropertyShape.schema.properties.and.type(), parameters.and),
|
|
371
|
+
classes: $convertToReadonlyArray(($convertToIri))(PropertyShape.schema.properties.classes.type(), parameters.classes),
|
|
372
|
+
comment: $convertToMaybe(($convertToString))(PropertyShape.schema.properties.comment.type(), parameters.comment),
|
|
373
|
+
datatype: $convertToMaybe(($convertToIri))(PropertyShape.schema.properties.datatype.type(), parameters.datatype),
|
|
374
|
+
deactivated: $convertToMaybe(($convertToBoolean))(PropertyShape.schema.properties.deactivated.type(), parameters.deactivated),
|
|
375
|
+
defaultValue: $convertToMaybe(($convertToTerm))(PropertyShape.schema.properties.defaultValue.type(), parameters.defaultValue),
|
|
376
|
+
description: $convertToMaybe(($convertToString))(PropertyShape.schema.properties.description.type(), parameters.description),
|
|
377
|
+
flags: $convertToReadonlyArray(($convertToString))(PropertyShape.schema.properties.flags.type(), parameters.flags),
|
|
378
|
+
groups: $convertToReadonlyArray($convertToIdentifier)(PropertyShape.schema.properties.groups.type(), parameters.groups),
|
|
379
|
+
hasValues: $convertToReadonlyArray(($convertToTerm))(PropertyShape.schema.properties.hasValues.type(), parameters.hasValues),
|
|
380
|
+
in_: $convertToMaybe($convertToReadonlyArray(($convertToTerm)))(PropertyShape.schema.properties.in_.type(), parameters.in_),
|
|
381
|
+
isDefinedBy: $convertToMaybe($convertToIdentifier)(PropertyShape.schema.properties.isDefinedBy.type(), parameters.isDefinedBy),
|
|
382
|
+
label: $convertToMaybe(($convertToString))(PropertyShape.schema.properties.label.type(), parameters.label),
|
|
383
|
+
languageIn: $convertToMaybe($convertToReadonlyArray(($convertToString)))(PropertyShape.schema.properties.languageIn.type(), parameters.languageIn),
|
|
384
|
+
maxCount: $convertToMaybe(($convertToNumeric))(PropertyShape.schema.properties.maxCount.type(), parameters.maxCount),
|
|
385
|
+
maxExclusive: $convertToMaybe($convertToLiteral)(PropertyShape.schema.properties.maxExclusive.type(), parameters.maxExclusive),
|
|
386
|
+
maxInclusive: $convertToMaybe($convertToLiteral)(PropertyShape.schema.properties.maxInclusive.type(), parameters.maxInclusive),
|
|
387
|
+
maxLength: $convertToMaybe(($convertToNumeric))(PropertyShape.schema.properties.maxLength.type(), parameters.maxLength),
|
|
388
|
+
minCount: $convertToMaybe(($convertToNumeric))(PropertyShape.schema.properties.minCount.type(), parameters.minCount),
|
|
389
|
+
minExclusive: $convertToMaybe($convertToLiteral)(PropertyShape.schema.properties.minExclusive.type(), parameters.minExclusive),
|
|
390
|
+
minInclusive: $convertToMaybe($convertToLiteral)(PropertyShape.schema.properties.minInclusive.type(), parameters.minInclusive),
|
|
391
|
+
minLength: $convertToMaybe(($convertToNumeric))(PropertyShape.schema.properties.minLength.type(), parameters.minLength),
|
|
392
|
+
name: $convertToMaybe(($convertToString))(PropertyShape.schema.properties.name.type(), parameters.name),
|
|
393
|
+
node: $convertToMaybe($convertToIdentifier)(PropertyShape.schema.properties.node.type(), parameters.node),
|
|
394
|
+
nodeKind: $convertToMaybe(($convertToIri))(PropertyShape.schema.properties.nodeKind.type(), parameters.nodeKind),
|
|
395
|
+
not: $convertToReadonlyArray($convertToIdentifier)(PropertyShape.schema.properties.not.type(), parameters.not),
|
|
396
|
+
or: $convertToMaybe($convertToReadonlyArray($convertToIdentifier))(PropertyShape.schema.properties.or.type(), parameters.or),
|
|
397
|
+
order: $convertToMaybe(($convertToNumeric))(PropertyShape.schema.properties.order.type(), parameters.order),
|
|
398
|
+
path: $convertToObject(PropertyShape.schema.properties.path.type(), parameters.path),
|
|
399
|
+
patterns: $convertToReadonlyArray(($convertToString))(PropertyShape.schema.properties.patterns.type(), parameters.patterns),
|
|
400
|
+
uniqueLang: $convertToMaybe(($convertToBoolean))(PropertyShape.schema.properties.uniqueLang.type(), parameters.uniqueLang),
|
|
401
|
+
xone: $convertToMaybe($convertToReadonlyArray($convertToIdentifier))(PropertyShape.schema.properties.xone.type(), parameters.xone),
|
|
402
|
+
}).map((properties) => {
|
|
403
|
+
const finalObject = { ...properties, $type: "PropertyShape" };
|
|
404
|
+
if (!globalThis.Object.prototype.hasOwnProperty.call(finalObject, "toString")) {
|
|
405
|
+
finalObject.toString = $toString;
|
|
406
|
+
}
|
|
407
|
+
return finalObject;
|
|
408
|
+
});
|
|
883
409
|
}
|
|
884
410
|
PropertyShape.create = create;
|
|
411
|
+
function createUnsafe(parameters) {
|
|
412
|
+
return create(parameters).unsafeCoerce();
|
|
413
|
+
}
|
|
414
|
+
PropertyShape.createUnsafe = createUnsafe;
|
|
885
415
|
let Identifier;
|
|
886
416
|
(function (Identifier) {
|
|
887
417
|
Identifier.parse = $parseIdentifier;
|
|
@@ -1581,7 +1111,7 @@ export var PropertyShape;
|
|
|
1581
1111
|
value: Maybe.empty(),
|
|
1582
1112
|
})),
|
|
1583
1113
|
}),
|
|
1584
|
-
}).
|
|
1114
|
+
}).chain((properties) => create(properties)));
|
|
1585
1115
|
};
|
|
1586
1116
|
PropertyShape.fromRdfResource = $wrap_FromRdfResourceFunction(PropertyShape._fromRdfResource);
|
|
1587
1117
|
PropertyShape.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|
|
@@ -2094,54 +1624,23 @@ export var PropertyShape;
|
|
|
2094
1624
|
export var PropertyGroup;
|
|
2095
1625
|
(function (PropertyGroup) {
|
|
2096
1626
|
function create(parameters) {
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
$
|
|
2101
|
-
}
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
}
|
|
2108
|
-
else if ($identifierParameter === undefined) {
|
|
2109
|
-
const $eagerIdentifier = dataFactory.blankNode();
|
|
2110
|
-
$identifier = () => $eagerIdentifier;
|
|
2111
|
-
}
|
|
2112
|
-
else {
|
|
2113
|
-
$identifier = $identifierParameter;
|
|
2114
|
-
}
|
|
2115
|
-
const $type = "PropertyGroup";
|
|
2116
|
-
let comment;
|
|
2117
|
-
if (Maybe.isMaybe(parameters?.comment)) {
|
|
2118
|
-
comment = parameters?.comment;
|
|
2119
|
-
}
|
|
2120
|
-
else if (typeof parameters?.comment === "string") {
|
|
2121
|
-
comment = Maybe.of(parameters?.comment);
|
|
2122
|
-
}
|
|
2123
|
-
else if (parameters?.comment === undefined) {
|
|
2124
|
-
comment = Maybe.empty();
|
|
2125
|
-
}
|
|
2126
|
-
else {
|
|
2127
|
-
comment = parameters?.comment;
|
|
2128
|
-
}
|
|
2129
|
-
let label;
|
|
2130
|
-
if (Maybe.isMaybe(parameters?.label)) {
|
|
2131
|
-
label = parameters?.label;
|
|
2132
|
-
}
|
|
2133
|
-
else if (typeof parameters?.label === "string") {
|
|
2134
|
-
label = Maybe.of(parameters?.label);
|
|
2135
|
-
}
|
|
2136
|
-
else if (parameters?.label === undefined) {
|
|
2137
|
-
label = Maybe.empty();
|
|
2138
|
-
}
|
|
2139
|
-
else {
|
|
2140
|
-
label = parameters?.label;
|
|
2141
|
-
}
|
|
2142
|
-
return { $identifier, $type, comment, label };
|
|
1627
|
+
return $sequenceRecord({
|
|
1628
|
+
$identifier: $convertToIdentifierProperty(parameters?.$identifier),
|
|
1629
|
+
comment: $convertToMaybe(($convertToString))(PropertyGroup.schema.properties.comment.type(), parameters?.comment),
|
|
1630
|
+
label: $convertToMaybe(($convertToString))(PropertyGroup.schema.properties.label.type(), parameters?.label),
|
|
1631
|
+
}).map((properties) => {
|
|
1632
|
+
const finalObject = { ...properties, $type: "PropertyGroup" };
|
|
1633
|
+
if (!globalThis.Object.prototype.hasOwnProperty.call(finalObject, "toString")) {
|
|
1634
|
+
finalObject.toString = $toString;
|
|
1635
|
+
}
|
|
1636
|
+
return finalObject;
|
|
1637
|
+
});
|
|
2143
1638
|
}
|
|
2144
1639
|
PropertyGroup.create = create;
|
|
1640
|
+
function createUnsafe(parameters) {
|
|
1641
|
+
return create(parameters).unsafeCoerce();
|
|
1642
|
+
}
|
|
1643
|
+
PropertyGroup.createUnsafe = createUnsafe;
|
|
2145
1644
|
let Identifier;
|
|
2146
1645
|
(function (Identifier) {
|
|
2147
1646
|
Identifier.parse = $parseIdentifier;
|
|
@@ -2221,7 +1720,7 @@ export var PropertyGroup;
|
|
|
2221
1720
|
value: Maybe.empty(),
|
|
2222
1721
|
})),
|
|
2223
1722
|
}),
|
|
2224
|
-
}).
|
|
1723
|
+
}).chain((properties) => create(properties)));
|
|
2225
1724
|
};
|
|
2226
1725
|
PropertyGroup.fromRdfResource = $wrap_FromRdfResourceFunction(PropertyGroup._fromRdfResource);
|
|
2227
1726
|
PropertyGroup.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|
|
@@ -2296,54 +1795,23 @@ export var PropertyGroup;
|
|
|
2296
1795
|
export var Ontology;
|
|
2297
1796
|
(function (Ontology) {
|
|
2298
1797
|
function create(parameters) {
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
$
|
|
2303
|
-
}
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
}
|
|
2310
|
-
else if ($identifierParameter === undefined) {
|
|
2311
|
-
const $eagerIdentifier = dataFactory.blankNode();
|
|
2312
|
-
$identifier = () => $eagerIdentifier;
|
|
2313
|
-
}
|
|
2314
|
-
else {
|
|
2315
|
-
$identifier = $identifierParameter;
|
|
2316
|
-
}
|
|
2317
|
-
const $type = "Ontology";
|
|
2318
|
-
let comment;
|
|
2319
|
-
if (Maybe.isMaybe(parameters?.comment)) {
|
|
2320
|
-
comment = parameters?.comment;
|
|
2321
|
-
}
|
|
2322
|
-
else if (typeof parameters?.comment === "string") {
|
|
2323
|
-
comment = Maybe.of(parameters?.comment);
|
|
2324
|
-
}
|
|
2325
|
-
else if (parameters?.comment === undefined) {
|
|
2326
|
-
comment = Maybe.empty();
|
|
2327
|
-
}
|
|
2328
|
-
else {
|
|
2329
|
-
comment = parameters?.comment;
|
|
2330
|
-
}
|
|
2331
|
-
let label;
|
|
2332
|
-
if (Maybe.isMaybe(parameters?.label)) {
|
|
2333
|
-
label = parameters?.label;
|
|
2334
|
-
}
|
|
2335
|
-
else if (typeof parameters?.label === "string") {
|
|
2336
|
-
label = Maybe.of(parameters?.label);
|
|
2337
|
-
}
|
|
2338
|
-
else if (parameters?.label === undefined) {
|
|
2339
|
-
label = Maybe.empty();
|
|
2340
|
-
}
|
|
2341
|
-
else {
|
|
2342
|
-
label = parameters?.label;
|
|
2343
|
-
}
|
|
2344
|
-
return { $identifier, $type, comment, label };
|
|
1798
|
+
return $sequenceRecord({
|
|
1799
|
+
$identifier: $convertToIdentifierProperty(parameters?.$identifier),
|
|
1800
|
+
comment: $convertToMaybe(($convertToString))(Ontology.schema.properties.comment.type(), parameters?.comment),
|
|
1801
|
+
label: $convertToMaybe(($convertToString))(Ontology.schema.properties.label.type(), parameters?.label),
|
|
1802
|
+
}).map((properties) => {
|
|
1803
|
+
const finalObject = { ...properties, $type: "Ontology" };
|
|
1804
|
+
if (!globalThis.Object.prototype.hasOwnProperty.call(finalObject, "toString")) {
|
|
1805
|
+
finalObject.toString = $toString;
|
|
1806
|
+
}
|
|
1807
|
+
return finalObject;
|
|
1808
|
+
});
|
|
2345
1809
|
}
|
|
2346
1810
|
Ontology.create = create;
|
|
1811
|
+
function createUnsafe(parameters) {
|
|
1812
|
+
return create(parameters).unsafeCoerce();
|
|
1813
|
+
}
|
|
1814
|
+
Ontology.createUnsafe = createUnsafe;
|
|
2347
1815
|
let Identifier;
|
|
2348
1816
|
(function (Identifier) {
|
|
2349
1817
|
Identifier.parse = $parseIdentifier;
|
|
@@ -2423,7 +1891,7 @@ export var Ontology;
|
|
|
2423
1891
|
value: Maybe.empty(),
|
|
2424
1892
|
})),
|
|
2425
1893
|
}),
|
|
2426
|
-
}).
|
|
1894
|
+
}).chain((properties) => create(properties)));
|
|
2427
1895
|
};
|
|
2428
1896
|
Ontology.fromRdfResource = $wrap_FromRdfResourceFunction(Ontology._fromRdfResource);
|
|
2429
1897
|
Ontology.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|
|
@@ -2498,566 +1966,51 @@ export var Ontology;
|
|
|
2498
1966
|
export var NodeShape;
|
|
2499
1967
|
(function (NodeShape) {
|
|
2500
1968
|
function create(parameters) {
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
$
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
$
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
$
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
$
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
$
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
}
|
|
2540
|
-
else if ($isReadonlyObjectArray(parameters?.classes)) {
|
|
2541
|
-
classes = parameters?.classes;
|
|
2542
|
-
}
|
|
2543
|
-
else if ($isReadonlyStringArray(parameters?.classes)) {
|
|
2544
|
-
classes = parameters?.classes.map((item) => dataFactory.namedNode(item));
|
|
2545
|
-
}
|
|
2546
|
-
else {
|
|
2547
|
-
classes = parameters?.classes;
|
|
2548
|
-
}
|
|
2549
|
-
let closed;
|
|
2550
|
-
if (Maybe.isMaybe(parameters?.closed)) {
|
|
2551
|
-
closed = parameters?.closed;
|
|
2552
|
-
}
|
|
2553
|
-
else if (typeof parameters?.closed === "boolean") {
|
|
2554
|
-
closed = Maybe.of(parameters?.closed);
|
|
2555
|
-
}
|
|
2556
|
-
else if (parameters?.closed === undefined) {
|
|
2557
|
-
closed = Maybe.empty();
|
|
2558
|
-
}
|
|
2559
|
-
else {
|
|
2560
|
-
closed = parameters?.closed;
|
|
2561
|
-
}
|
|
2562
|
-
let comment;
|
|
2563
|
-
if (Maybe.isMaybe(parameters?.comment)) {
|
|
2564
|
-
comment = parameters?.comment;
|
|
2565
|
-
}
|
|
2566
|
-
else if (typeof parameters?.comment === "string") {
|
|
2567
|
-
comment = Maybe.of(parameters?.comment);
|
|
2568
|
-
}
|
|
2569
|
-
else if (parameters?.comment === undefined) {
|
|
2570
|
-
comment = Maybe.empty();
|
|
2571
|
-
}
|
|
2572
|
-
else {
|
|
2573
|
-
comment = parameters?.comment;
|
|
2574
|
-
}
|
|
2575
|
-
let datatype;
|
|
2576
|
-
if (Maybe.isMaybe(parameters?.datatype)) {
|
|
2577
|
-
datatype = parameters?.datatype;
|
|
2578
|
-
}
|
|
2579
|
-
else if (typeof parameters?.datatype === "object") {
|
|
2580
|
-
datatype = Maybe.of(parameters?.datatype);
|
|
2581
|
-
}
|
|
2582
|
-
else if (typeof parameters?.datatype === "string") {
|
|
2583
|
-
datatype = Maybe.of(dataFactory.namedNode(parameters?.datatype));
|
|
2584
|
-
}
|
|
2585
|
-
else if (parameters?.datatype === undefined) {
|
|
2586
|
-
datatype = Maybe.empty();
|
|
2587
|
-
}
|
|
2588
|
-
else {
|
|
2589
|
-
datatype = parameters?.datatype;
|
|
2590
|
-
}
|
|
2591
|
-
let deactivated;
|
|
2592
|
-
if (Maybe.isMaybe(parameters?.deactivated)) {
|
|
2593
|
-
deactivated = parameters?.deactivated;
|
|
2594
|
-
}
|
|
2595
|
-
else if (typeof parameters?.deactivated === "boolean") {
|
|
2596
|
-
deactivated = Maybe.of(parameters?.deactivated);
|
|
2597
|
-
}
|
|
2598
|
-
else if (parameters?.deactivated === undefined) {
|
|
2599
|
-
deactivated = Maybe.empty();
|
|
2600
|
-
}
|
|
2601
|
-
else {
|
|
2602
|
-
deactivated = parameters?.deactivated;
|
|
2603
|
-
}
|
|
2604
|
-
let flags;
|
|
2605
|
-
if (parameters?.flags === undefined) {
|
|
2606
|
-
flags = [];
|
|
2607
|
-
}
|
|
2608
|
-
else if (typeof parameters?.flags === "object") {
|
|
2609
|
-
flags = parameters?.flags;
|
|
2610
|
-
}
|
|
2611
|
-
else {
|
|
2612
|
-
flags = parameters?.flags;
|
|
2613
|
-
}
|
|
2614
|
-
let hasValues;
|
|
2615
|
-
if (parameters?.hasValues === undefined) {
|
|
2616
|
-
hasValues = [];
|
|
2617
|
-
}
|
|
2618
|
-
else if ($isReadonlyObjectArray(parameters?.hasValues)) {
|
|
2619
|
-
hasValues = parameters?.hasValues;
|
|
2620
|
-
}
|
|
2621
|
-
else if ($isReadonlyBigIntArray(parameters?.hasValues)) {
|
|
2622
|
-
hasValues = parameters?.hasValues.map((item) => $literalFactory.bigint(item));
|
|
2623
|
-
}
|
|
2624
|
-
else if ($isReadonlyBooleanArray(parameters?.hasValues)) {
|
|
2625
|
-
hasValues = parameters?.hasValues.map((item) => $literalFactory.boolean(item));
|
|
2626
|
-
}
|
|
2627
|
-
else if ($isReadonlyNumberArray(parameters?.hasValues)) {
|
|
2628
|
-
hasValues = parameters?.hasValues.map((item) => $literalFactory.number(item));
|
|
2629
|
-
}
|
|
2630
|
-
else if ($isReadonlyStringArray(parameters?.hasValues)) {
|
|
2631
|
-
hasValues = parameters?.hasValues.map((item) => $literalFactory.string(item));
|
|
2632
|
-
}
|
|
2633
|
-
else {
|
|
2634
|
-
hasValues = parameters?.hasValues;
|
|
2635
|
-
}
|
|
2636
|
-
let ignoredProperties;
|
|
2637
|
-
if (Maybe.isMaybe(parameters?.ignoredProperties)) {
|
|
2638
|
-
ignoredProperties = parameters?.ignoredProperties;
|
|
2639
|
-
}
|
|
2640
|
-
else if ($isReadonlyObjectArray(parameters?.ignoredProperties)) {
|
|
2641
|
-
ignoredProperties = Maybe.of(parameters?.ignoredProperties);
|
|
2642
|
-
}
|
|
2643
|
-
else if ($isReadonlyStringArray(parameters?.ignoredProperties)) {
|
|
2644
|
-
ignoredProperties = Maybe.of(parameters?.ignoredProperties.map((item) => dataFactory.namedNode(item)));
|
|
2645
|
-
}
|
|
2646
|
-
else if (parameters?.ignoredProperties === undefined) {
|
|
2647
|
-
ignoredProperties = Maybe.empty();
|
|
2648
|
-
}
|
|
2649
|
-
else {
|
|
2650
|
-
ignoredProperties = parameters?.ignoredProperties;
|
|
2651
|
-
}
|
|
2652
|
-
let in_;
|
|
2653
|
-
if (Maybe.isMaybe(parameters?.in_)) {
|
|
2654
|
-
in_ = parameters?.in_;
|
|
2655
|
-
}
|
|
2656
|
-
else if ($isReadonlyObjectArray(parameters?.in_)) {
|
|
2657
|
-
in_ = Maybe.of(parameters?.in_);
|
|
2658
|
-
}
|
|
2659
|
-
else if ($isReadonlyBigIntArray(parameters?.in_)) {
|
|
2660
|
-
in_ = Maybe.of(parameters?.in_.map((item) => $literalFactory.bigint(item)));
|
|
2661
|
-
}
|
|
2662
|
-
else if ($isReadonlyBooleanArray(parameters?.in_)) {
|
|
2663
|
-
in_ = Maybe.of(parameters?.in_.map((item) => $literalFactory.boolean(item)));
|
|
2664
|
-
}
|
|
2665
|
-
else if ($isReadonlyNumberArray(parameters?.in_)) {
|
|
2666
|
-
in_ = Maybe.of(parameters?.in_.map((item) => $literalFactory.number(item)));
|
|
2667
|
-
}
|
|
2668
|
-
else if ($isReadonlyStringArray(parameters?.in_)) {
|
|
2669
|
-
in_ = Maybe.of(parameters?.in_.map((item) => $literalFactory.string(item)));
|
|
2670
|
-
}
|
|
2671
|
-
else if (parameters?.in_ === undefined) {
|
|
2672
|
-
in_ = Maybe.empty();
|
|
2673
|
-
}
|
|
2674
|
-
else {
|
|
2675
|
-
in_ = parameters?.in_;
|
|
2676
|
-
}
|
|
2677
|
-
let isDefinedBy;
|
|
2678
|
-
if (Maybe.isMaybe(parameters?.isDefinedBy)) {
|
|
2679
|
-
isDefinedBy = parameters?.isDefinedBy;
|
|
2680
|
-
}
|
|
2681
|
-
else if (typeof parameters?.isDefinedBy === "object") {
|
|
2682
|
-
isDefinedBy = Maybe.of(parameters?.isDefinedBy);
|
|
2683
|
-
}
|
|
2684
|
-
else if (typeof parameters?.isDefinedBy === "string") {
|
|
2685
|
-
isDefinedBy = Maybe.of(dataFactory.namedNode(parameters?.isDefinedBy));
|
|
2686
|
-
}
|
|
2687
|
-
else if (parameters?.isDefinedBy === undefined) {
|
|
2688
|
-
isDefinedBy = Maybe.empty();
|
|
2689
|
-
}
|
|
2690
|
-
else {
|
|
2691
|
-
isDefinedBy = parameters?.isDefinedBy;
|
|
2692
|
-
}
|
|
2693
|
-
let label;
|
|
2694
|
-
if (Maybe.isMaybe(parameters?.label)) {
|
|
2695
|
-
label = parameters?.label;
|
|
2696
|
-
}
|
|
2697
|
-
else if (typeof parameters?.label === "string") {
|
|
2698
|
-
label = Maybe.of(parameters?.label);
|
|
2699
|
-
}
|
|
2700
|
-
else if (parameters?.label === undefined) {
|
|
2701
|
-
label = Maybe.empty();
|
|
2702
|
-
}
|
|
2703
|
-
else {
|
|
2704
|
-
label = parameters?.label;
|
|
2705
|
-
}
|
|
2706
|
-
let languageIn;
|
|
2707
|
-
if (Maybe.isMaybe(parameters?.languageIn)) {
|
|
2708
|
-
languageIn = parameters?.languageIn;
|
|
2709
|
-
}
|
|
2710
|
-
else if (typeof parameters?.languageIn === "object") {
|
|
2711
|
-
languageIn = Maybe.of(parameters?.languageIn);
|
|
2712
|
-
}
|
|
2713
|
-
else if (parameters?.languageIn === undefined) {
|
|
2714
|
-
languageIn = Maybe.empty();
|
|
2715
|
-
}
|
|
2716
|
-
else {
|
|
2717
|
-
languageIn = parameters?.languageIn;
|
|
2718
|
-
}
|
|
2719
|
-
let maxCount;
|
|
2720
|
-
if (Maybe.isMaybe(parameters?.maxCount)) {
|
|
2721
|
-
maxCount = parameters?.maxCount;
|
|
2722
|
-
}
|
|
2723
|
-
else if (typeof parameters?.maxCount === "bigint") {
|
|
2724
|
-
maxCount = Maybe.of(parameters?.maxCount);
|
|
2725
|
-
}
|
|
2726
|
-
else if (typeof parameters?.maxCount === "number") {
|
|
2727
|
-
maxCount = Maybe.of(BigInt(parameters?.maxCount));
|
|
2728
|
-
}
|
|
2729
|
-
else if (parameters?.maxCount === undefined) {
|
|
2730
|
-
maxCount = Maybe.empty();
|
|
2731
|
-
}
|
|
2732
|
-
else {
|
|
2733
|
-
maxCount = parameters?.maxCount;
|
|
2734
|
-
}
|
|
2735
|
-
let maxExclusive;
|
|
2736
|
-
if (Maybe.isMaybe(parameters?.maxExclusive)) {
|
|
2737
|
-
maxExclusive = parameters?.maxExclusive;
|
|
2738
|
-
}
|
|
2739
|
-
else if (typeof parameters?.maxExclusive === "bigint") {
|
|
2740
|
-
maxExclusive = Maybe.of($literalFactory.bigint(parameters?.maxExclusive));
|
|
2741
|
-
}
|
|
2742
|
-
else if (typeof parameters?.maxExclusive === "boolean") {
|
|
2743
|
-
maxExclusive = Maybe.of($literalFactory.boolean(parameters?.maxExclusive));
|
|
2744
|
-
}
|
|
2745
|
-
else if (typeof parameters?.maxExclusive === "object" &&
|
|
2746
|
-
parameters?.maxExclusive instanceof Date) {
|
|
2747
|
-
maxExclusive = Maybe.of($literalFactory.date(parameters?.maxExclusive));
|
|
2748
|
-
}
|
|
2749
|
-
else if (typeof parameters?.maxExclusive === "number") {
|
|
2750
|
-
maxExclusive = Maybe.of($literalFactory.number(parameters?.maxExclusive));
|
|
2751
|
-
}
|
|
2752
|
-
else if (typeof parameters?.maxExclusive === "string") {
|
|
2753
|
-
maxExclusive = Maybe.of($literalFactory.string(parameters?.maxExclusive));
|
|
2754
|
-
}
|
|
2755
|
-
else if (typeof parameters?.maxExclusive === "object") {
|
|
2756
|
-
maxExclusive = Maybe.of(parameters?.maxExclusive);
|
|
2757
|
-
}
|
|
2758
|
-
else if (parameters?.maxExclusive === undefined) {
|
|
2759
|
-
maxExclusive = Maybe.empty();
|
|
2760
|
-
}
|
|
2761
|
-
else {
|
|
2762
|
-
maxExclusive = parameters?.maxExclusive;
|
|
2763
|
-
}
|
|
2764
|
-
let maxInclusive;
|
|
2765
|
-
if (Maybe.isMaybe(parameters?.maxInclusive)) {
|
|
2766
|
-
maxInclusive = parameters?.maxInclusive;
|
|
2767
|
-
}
|
|
2768
|
-
else if (typeof parameters?.maxInclusive === "bigint") {
|
|
2769
|
-
maxInclusive = Maybe.of($literalFactory.bigint(parameters?.maxInclusive));
|
|
2770
|
-
}
|
|
2771
|
-
else if (typeof parameters?.maxInclusive === "boolean") {
|
|
2772
|
-
maxInclusive = Maybe.of($literalFactory.boolean(parameters?.maxInclusive));
|
|
2773
|
-
}
|
|
2774
|
-
else if (typeof parameters?.maxInclusive === "object" &&
|
|
2775
|
-
parameters?.maxInclusive instanceof Date) {
|
|
2776
|
-
maxInclusive = Maybe.of($literalFactory.date(parameters?.maxInclusive));
|
|
2777
|
-
}
|
|
2778
|
-
else if (typeof parameters?.maxInclusive === "number") {
|
|
2779
|
-
maxInclusive = Maybe.of($literalFactory.number(parameters?.maxInclusive));
|
|
2780
|
-
}
|
|
2781
|
-
else if (typeof parameters?.maxInclusive === "string") {
|
|
2782
|
-
maxInclusive = Maybe.of($literalFactory.string(parameters?.maxInclusive));
|
|
2783
|
-
}
|
|
2784
|
-
else if (typeof parameters?.maxInclusive === "object") {
|
|
2785
|
-
maxInclusive = Maybe.of(parameters?.maxInclusive);
|
|
2786
|
-
}
|
|
2787
|
-
else if (parameters?.maxInclusive === undefined) {
|
|
2788
|
-
maxInclusive = Maybe.empty();
|
|
2789
|
-
}
|
|
2790
|
-
else {
|
|
2791
|
-
maxInclusive = parameters?.maxInclusive;
|
|
2792
|
-
}
|
|
2793
|
-
let maxLength;
|
|
2794
|
-
if (Maybe.isMaybe(parameters?.maxLength)) {
|
|
2795
|
-
maxLength = parameters?.maxLength;
|
|
2796
|
-
}
|
|
2797
|
-
else if (typeof parameters?.maxLength === "bigint") {
|
|
2798
|
-
maxLength = Maybe.of(parameters?.maxLength);
|
|
2799
|
-
}
|
|
2800
|
-
else if (typeof parameters?.maxLength === "number") {
|
|
2801
|
-
maxLength = Maybe.of(BigInt(parameters?.maxLength));
|
|
2802
|
-
}
|
|
2803
|
-
else if (parameters?.maxLength === undefined) {
|
|
2804
|
-
maxLength = Maybe.empty();
|
|
2805
|
-
}
|
|
2806
|
-
else {
|
|
2807
|
-
maxLength = parameters?.maxLength;
|
|
2808
|
-
}
|
|
2809
|
-
let minCount;
|
|
2810
|
-
if (Maybe.isMaybe(parameters?.minCount)) {
|
|
2811
|
-
minCount = parameters?.minCount;
|
|
2812
|
-
}
|
|
2813
|
-
else if (typeof parameters?.minCount === "bigint") {
|
|
2814
|
-
minCount = Maybe.of(parameters?.minCount);
|
|
2815
|
-
}
|
|
2816
|
-
else if (typeof parameters?.minCount === "number") {
|
|
2817
|
-
minCount = Maybe.of(BigInt(parameters?.minCount));
|
|
2818
|
-
}
|
|
2819
|
-
else if (parameters?.minCount === undefined) {
|
|
2820
|
-
minCount = Maybe.empty();
|
|
2821
|
-
}
|
|
2822
|
-
else {
|
|
2823
|
-
minCount = parameters?.minCount;
|
|
2824
|
-
}
|
|
2825
|
-
let minExclusive;
|
|
2826
|
-
if (Maybe.isMaybe(parameters?.minExclusive)) {
|
|
2827
|
-
minExclusive = parameters?.minExclusive;
|
|
2828
|
-
}
|
|
2829
|
-
else if (typeof parameters?.minExclusive === "bigint") {
|
|
2830
|
-
minExclusive = Maybe.of($literalFactory.bigint(parameters?.minExclusive));
|
|
2831
|
-
}
|
|
2832
|
-
else if (typeof parameters?.minExclusive === "boolean") {
|
|
2833
|
-
minExclusive = Maybe.of($literalFactory.boolean(parameters?.minExclusive));
|
|
2834
|
-
}
|
|
2835
|
-
else if (typeof parameters?.minExclusive === "object" &&
|
|
2836
|
-
parameters?.minExclusive instanceof Date) {
|
|
2837
|
-
minExclusive = Maybe.of($literalFactory.date(parameters?.minExclusive));
|
|
2838
|
-
}
|
|
2839
|
-
else if (typeof parameters?.minExclusive === "number") {
|
|
2840
|
-
minExclusive = Maybe.of($literalFactory.number(parameters?.minExclusive));
|
|
2841
|
-
}
|
|
2842
|
-
else if (typeof parameters?.minExclusive === "string") {
|
|
2843
|
-
minExclusive = Maybe.of($literalFactory.string(parameters?.minExclusive));
|
|
2844
|
-
}
|
|
2845
|
-
else if (typeof parameters?.minExclusive === "object") {
|
|
2846
|
-
minExclusive = Maybe.of(parameters?.minExclusive);
|
|
2847
|
-
}
|
|
2848
|
-
else if (parameters?.minExclusive === undefined) {
|
|
2849
|
-
minExclusive = Maybe.empty();
|
|
2850
|
-
}
|
|
2851
|
-
else {
|
|
2852
|
-
minExclusive = parameters?.minExclusive;
|
|
2853
|
-
}
|
|
2854
|
-
let minInclusive;
|
|
2855
|
-
if (Maybe.isMaybe(parameters?.minInclusive)) {
|
|
2856
|
-
minInclusive = parameters?.minInclusive;
|
|
2857
|
-
}
|
|
2858
|
-
else if (typeof parameters?.minInclusive === "bigint") {
|
|
2859
|
-
minInclusive = Maybe.of($literalFactory.bigint(parameters?.minInclusive));
|
|
2860
|
-
}
|
|
2861
|
-
else if (typeof parameters?.minInclusive === "boolean") {
|
|
2862
|
-
minInclusive = Maybe.of($literalFactory.boolean(parameters?.minInclusive));
|
|
2863
|
-
}
|
|
2864
|
-
else if (typeof parameters?.minInclusive === "object" &&
|
|
2865
|
-
parameters?.minInclusive instanceof Date) {
|
|
2866
|
-
minInclusive = Maybe.of($literalFactory.date(parameters?.minInclusive));
|
|
2867
|
-
}
|
|
2868
|
-
else if (typeof parameters?.minInclusive === "number") {
|
|
2869
|
-
minInclusive = Maybe.of($literalFactory.number(parameters?.minInclusive));
|
|
2870
|
-
}
|
|
2871
|
-
else if (typeof parameters?.minInclusive === "string") {
|
|
2872
|
-
minInclusive = Maybe.of($literalFactory.string(parameters?.minInclusive));
|
|
2873
|
-
}
|
|
2874
|
-
else if (typeof parameters?.minInclusive === "object") {
|
|
2875
|
-
minInclusive = Maybe.of(parameters?.minInclusive);
|
|
2876
|
-
}
|
|
2877
|
-
else if (parameters?.minInclusive === undefined) {
|
|
2878
|
-
minInclusive = Maybe.empty();
|
|
2879
|
-
}
|
|
2880
|
-
else {
|
|
2881
|
-
minInclusive = parameters?.minInclusive;
|
|
2882
|
-
}
|
|
2883
|
-
let minLength;
|
|
2884
|
-
if (Maybe.isMaybe(parameters?.minLength)) {
|
|
2885
|
-
minLength = parameters?.minLength;
|
|
2886
|
-
}
|
|
2887
|
-
else if (typeof parameters?.minLength === "bigint") {
|
|
2888
|
-
minLength = Maybe.of(parameters?.minLength);
|
|
2889
|
-
}
|
|
2890
|
-
else if (typeof parameters?.minLength === "number") {
|
|
2891
|
-
minLength = Maybe.of(BigInt(parameters?.minLength));
|
|
2892
|
-
}
|
|
2893
|
-
else if (parameters?.minLength === undefined) {
|
|
2894
|
-
minLength = Maybe.empty();
|
|
2895
|
-
}
|
|
2896
|
-
else {
|
|
2897
|
-
minLength = parameters?.minLength;
|
|
2898
|
-
}
|
|
2899
|
-
let node;
|
|
2900
|
-
if (Maybe.isMaybe(parameters?.node)) {
|
|
2901
|
-
node = parameters?.node;
|
|
2902
|
-
}
|
|
2903
|
-
else if (typeof parameters?.node === "object") {
|
|
2904
|
-
node = Maybe.of(parameters?.node);
|
|
2905
|
-
}
|
|
2906
|
-
else if (typeof parameters?.node === "string") {
|
|
2907
|
-
node = Maybe.of(dataFactory.namedNode(parameters?.node));
|
|
2908
|
-
}
|
|
2909
|
-
else if (parameters?.node === undefined) {
|
|
2910
|
-
node = Maybe.empty();
|
|
2911
|
-
}
|
|
2912
|
-
else {
|
|
2913
|
-
node = parameters?.node;
|
|
2914
|
-
}
|
|
2915
|
-
let nodeKind;
|
|
2916
|
-
if (Maybe.isMaybe(parameters?.nodeKind)) {
|
|
2917
|
-
nodeKind = parameters?.nodeKind;
|
|
2918
|
-
}
|
|
2919
|
-
else if (typeof parameters?.nodeKind === "object") {
|
|
2920
|
-
nodeKind = Maybe.of(parameters?.nodeKind);
|
|
2921
|
-
}
|
|
2922
|
-
else if (typeof parameters?.nodeKind === "string") {
|
|
2923
|
-
nodeKind = Maybe.of(dataFactory.namedNode(parameters?.nodeKind));
|
|
2924
|
-
}
|
|
2925
|
-
else if (parameters?.nodeKind === undefined) {
|
|
2926
|
-
nodeKind = Maybe.empty();
|
|
2927
|
-
}
|
|
2928
|
-
else {
|
|
2929
|
-
nodeKind = parameters?.nodeKind;
|
|
2930
|
-
}
|
|
2931
|
-
let not;
|
|
2932
|
-
if (parameters?.not === undefined) {
|
|
2933
|
-
not = [];
|
|
2934
|
-
}
|
|
2935
|
-
else if ($isReadonlyObjectArray(parameters?.not)) {
|
|
2936
|
-
not = parameters?.not;
|
|
2937
|
-
}
|
|
2938
|
-
else if ($isReadonlyStringArray(parameters?.not)) {
|
|
2939
|
-
not = parameters?.not.map((item) => dataFactory.namedNode(item));
|
|
2940
|
-
}
|
|
2941
|
-
else {
|
|
2942
|
-
not = parameters?.not;
|
|
2943
|
-
}
|
|
2944
|
-
let or;
|
|
2945
|
-
if (Maybe.isMaybe(parameters?.or)) {
|
|
2946
|
-
or = parameters?.or;
|
|
2947
|
-
}
|
|
2948
|
-
else if ($isReadonlyObjectArray(parameters?.or)) {
|
|
2949
|
-
or = Maybe.of(parameters?.or);
|
|
2950
|
-
}
|
|
2951
|
-
else if ($isReadonlyStringArray(parameters?.or)) {
|
|
2952
|
-
or = Maybe.of(parameters?.or.map((item) => dataFactory.namedNode(item)));
|
|
2953
|
-
}
|
|
2954
|
-
else if (parameters?.or === undefined) {
|
|
2955
|
-
or = Maybe.empty();
|
|
2956
|
-
}
|
|
2957
|
-
else {
|
|
2958
|
-
or = parameters?.or;
|
|
2959
|
-
}
|
|
2960
|
-
let patterns;
|
|
2961
|
-
if (parameters?.patterns === undefined) {
|
|
2962
|
-
patterns = [];
|
|
2963
|
-
}
|
|
2964
|
-
else if (typeof parameters?.patterns === "object") {
|
|
2965
|
-
patterns = parameters?.patterns;
|
|
2966
|
-
}
|
|
2967
|
-
else {
|
|
2968
|
-
patterns = parameters?.patterns;
|
|
2969
|
-
}
|
|
2970
|
-
let properties;
|
|
2971
|
-
if (parameters?.properties === undefined) {
|
|
2972
|
-
properties = [];
|
|
2973
|
-
}
|
|
2974
|
-
else if ($isReadonlyObjectArray(parameters?.properties)) {
|
|
2975
|
-
properties = parameters?.properties;
|
|
2976
|
-
}
|
|
2977
|
-
else if ($isReadonlyStringArray(parameters?.properties)) {
|
|
2978
|
-
properties = parameters?.properties.map((item) => dataFactory.namedNode(item));
|
|
2979
|
-
}
|
|
2980
|
-
else {
|
|
2981
|
-
properties = parameters?.properties;
|
|
2982
|
-
}
|
|
2983
|
-
let subClassOf;
|
|
2984
|
-
if (parameters?.subClassOf === undefined) {
|
|
2985
|
-
subClassOf = [];
|
|
2986
|
-
}
|
|
2987
|
-
else if ($isReadonlyObjectArray(parameters?.subClassOf)) {
|
|
2988
|
-
subClassOf = parameters?.subClassOf;
|
|
2989
|
-
}
|
|
2990
|
-
else if ($isReadonlyStringArray(parameters?.subClassOf)) {
|
|
2991
|
-
subClassOf = parameters?.subClassOf.map((item) => dataFactory.namedNode(item));
|
|
2992
|
-
}
|
|
2993
|
-
else {
|
|
2994
|
-
subClassOf = parameters?.subClassOf;
|
|
2995
|
-
}
|
|
2996
|
-
let types;
|
|
2997
|
-
if (parameters?.types === undefined) {
|
|
2998
|
-
types = [];
|
|
2999
|
-
}
|
|
3000
|
-
else if ($isReadonlyObjectArray(parameters?.types)) {
|
|
3001
|
-
types = parameters?.types;
|
|
3002
|
-
}
|
|
3003
|
-
else if ($isReadonlyStringArray(parameters?.types)) {
|
|
3004
|
-
types = parameters?.types.map((item) => dataFactory.namedNode(item));
|
|
3005
|
-
}
|
|
3006
|
-
else {
|
|
3007
|
-
types = parameters?.types;
|
|
3008
|
-
}
|
|
3009
|
-
let xone;
|
|
3010
|
-
if (Maybe.isMaybe(parameters?.xone)) {
|
|
3011
|
-
xone = parameters?.xone;
|
|
3012
|
-
}
|
|
3013
|
-
else if ($isReadonlyObjectArray(parameters?.xone)) {
|
|
3014
|
-
xone = Maybe.of(parameters?.xone);
|
|
3015
|
-
}
|
|
3016
|
-
else if ($isReadonlyStringArray(parameters?.xone)) {
|
|
3017
|
-
xone = Maybe.of(parameters?.xone.map((item) => dataFactory.namedNode(item)));
|
|
3018
|
-
}
|
|
3019
|
-
else if (parameters?.xone === undefined) {
|
|
3020
|
-
xone = Maybe.empty();
|
|
3021
|
-
}
|
|
3022
|
-
else {
|
|
3023
|
-
xone = parameters?.xone;
|
|
3024
|
-
}
|
|
3025
|
-
return {
|
|
3026
|
-
$identifier,
|
|
3027
|
-
$type,
|
|
3028
|
-
and,
|
|
3029
|
-
classes,
|
|
3030
|
-
closed,
|
|
3031
|
-
comment,
|
|
3032
|
-
datatype,
|
|
3033
|
-
deactivated,
|
|
3034
|
-
flags,
|
|
3035
|
-
hasValues,
|
|
3036
|
-
ignoredProperties,
|
|
3037
|
-
in_,
|
|
3038
|
-
isDefinedBy,
|
|
3039
|
-
label,
|
|
3040
|
-
languageIn,
|
|
3041
|
-
maxCount,
|
|
3042
|
-
maxExclusive,
|
|
3043
|
-
maxInclusive,
|
|
3044
|
-
maxLength,
|
|
3045
|
-
minCount,
|
|
3046
|
-
minExclusive,
|
|
3047
|
-
minInclusive,
|
|
3048
|
-
minLength,
|
|
3049
|
-
node,
|
|
3050
|
-
nodeKind,
|
|
3051
|
-
not,
|
|
3052
|
-
or,
|
|
3053
|
-
patterns,
|
|
3054
|
-
properties,
|
|
3055
|
-
subClassOf,
|
|
3056
|
-
types,
|
|
3057
|
-
xone,
|
|
3058
|
-
};
|
|
1969
|
+
return $sequenceRecord({
|
|
1970
|
+
$identifier: $convertToIdentifierProperty(parameters?.$identifier),
|
|
1971
|
+
and: $convertToMaybe($convertToReadonlyArray($convertToIdentifier))(NodeShape.schema.properties.and.type(), parameters?.and),
|
|
1972
|
+
classes: $convertToReadonlyArray(($convertToIri))(NodeShape.schema.properties.classes.type(), parameters?.classes),
|
|
1973
|
+
closed: $convertToMaybe(($convertToBoolean))(NodeShape.schema.properties.closed.type(), parameters?.closed),
|
|
1974
|
+
comment: $convertToMaybe(($convertToString))(NodeShape.schema.properties.comment.type(), parameters?.comment),
|
|
1975
|
+
datatype: $convertToMaybe(($convertToIri))(NodeShape.schema.properties.datatype.type(), parameters?.datatype),
|
|
1976
|
+
deactivated: $convertToMaybe(($convertToBoolean))(NodeShape.schema.properties.deactivated.type(), parameters?.deactivated),
|
|
1977
|
+
flags: $convertToReadonlyArray(($convertToString))(NodeShape.schema.properties.flags.type(), parameters?.flags),
|
|
1978
|
+
hasValues: $convertToReadonlyArray(($convertToTerm))(NodeShape.schema.properties.hasValues.type(), parameters?.hasValues),
|
|
1979
|
+
ignoredProperties: $convertToMaybe($convertToReadonlyArray(($convertToIri)))(NodeShape.schema.properties.ignoredProperties.type(), parameters?.ignoredProperties),
|
|
1980
|
+
in_: $convertToMaybe($convertToReadonlyArray(($convertToTerm)))(NodeShape.schema.properties.in_.type(), parameters?.in_),
|
|
1981
|
+
isDefinedBy: $convertToMaybe($convertToIdentifier)(NodeShape.schema.properties.isDefinedBy.type(), parameters?.isDefinedBy),
|
|
1982
|
+
label: $convertToMaybe(($convertToString))(NodeShape.schema.properties.label.type(), parameters?.label),
|
|
1983
|
+
languageIn: $convertToMaybe($convertToReadonlyArray(($convertToString)))(NodeShape.schema.properties.languageIn.type(), parameters?.languageIn),
|
|
1984
|
+
maxCount: $convertToMaybe(($convertToNumeric))(NodeShape.schema.properties.maxCount.type(), parameters?.maxCount),
|
|
1985
|
+
maxExclusive: $convertToMaybe($convertToLiteral)(NodeShape.schema.properties.maxExclusive.type(), parameters?.maxExclusive),
|
|
1986
|
+
maxInclusive: $convertToMaybe($convertToLiteral)(NodeShape.schema.properties.maxInclusive.type(), parameters?.maxInclusive),
|
|
1987
|
+
maxLength: $convertToMaybe(($convertToNumeric))(NodeShape.schema.properties.maxLength.type(), parameters?.maxLength),
|
|
1988
|
+
minCount: $convertToMaybe(($convertToNumeric))(NodeShape.schema.properties.minCount.type(), parameters?.minCount),
|
|
1989
|
+
minExclusive: $convertToMaybe($convertToLiteral)(NodeShape.schema.properties.minExclusive.type(), parameters?.minExclusive),
|
|
1990
|
+
minInclusive: $convertToMaybe($convertToLiteral)(NodeShape.schema.properties.minInclusive.type(), parameters?.minInclusive),
|
|
1991
|
+
minLength: $convertToMaybe(($convertToNumeric))(NodeShape.schema.properties.minLength.type(), parameters?.minLength),
|
|
1992
|
+
node: $convertToMaybe($convertToIdentifier)(NodeShape.schema.properties.node.type(), parameters?.node),
|
|
1993
|
+
nodeKind: $convertToMaybe(($convertToIri))(NodeShape.schema.properties.nodeKind.type(), parameters?.nodeKind),
|
|
1994
|
+
not: $convertToReadonlyArray($convertToIdentifier)(NodeShape.schema.properties.not.type(), parameters?.not),
|
|
1995
|
+
or: $convertToMaybe($convertToReadonlyArray($convertToIdentifier))(NodeShape.schema.properties.or.type(), parameters?.or),
|
|
1996
|
+
patterns: $convertToReadonlyArray(($convertToString))(NodeShape.schema.properties.patterns.type(), parameters?.patterns),
|
|
1997
|
+
properties: $convertToReadonlyArray($convertToIdentifier)(NodeShape.schema.properties.properties.type(), parameters?.properties),
|
|
1998
|
+
subClassOf: $convertToReadonlyArray(($convertToIri))(NodeShape.schema.properties.subClassOf.type(), parameters?.subClassOf),
|
|
1999
|
+
types: $convertToReadonlyArray(($convertToIri))(NodeShape.schema.properties.types.type(), parameters?.types),
|
|
2000
|
+
xone: $convertToMaybe($convertToReadonlyArray($convertToIdentifier))(NodeShape.schema.properties.xone.type(), parameters?.xone),
|
|
2001
|
+
}).map((properties) => {
|
|
2002
|
+
const finalObject = { ...properties, $type: "NodeShape" };
|
|
2003
|
+
if (!globalThis.Object.prototype.hasOwnProperty.call(finalObject, "toString")) {
|
|
2004
|
+
finalObject.toString = $toString;
|
|
2005
|
+
}
|
|
2006
|
+
return finalObject;
|
|
2007
|
+
});
|
|
3059
2008
|
}
|
|
3060
2009
|
NodeShape.create = create;
|
|
2010
|
+
function createUnsafe(parameters) {
|
|
2011
|
+
return create(parameters).unsafeCoerce();
|
|
2012
|
+
}
|
|
2013
|
+
NodeShape.createUnsafe = createUnsafe;
|
|
3061
2014
|
let Identifier;
|
|
3062
2015
|
(function (Identifier) {
|
|
3063
2016
|
Identifier.parse = $parseIdentifier;
|
|
@@ -3710,7 +2663,7 @@ export var NodeShape;
|
|
|
3710
2663
|
value: Maybe.empty(),
|
|
3711
2664
|
})),
|
|
3712
2665
|
}),
|
|
3713
|
-
}).
|
|
2666
|
+
}).chain((properties) => create(properties)));
|
|
3714
2667
|
};
|
|
3715
2668
|
NodeShape.fromRdfResource = $wrap_FromRdfResourceFunction(NodeShape._fromRdfResource);
|
|
3716
2669
|
NodeShape.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|