@shaclmate/shacl-ast 4.0.33 → 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 -1272
- package/package.json +1 -1
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,599 +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
|
-
const $object = {
|
|
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
|
-
};
|
|
883
|
-
if (!globalThis.Object.prototype.hasOwnProperty.call($object, "toString")) {
|
|
884
|
-
$object.toString = $toString;
|
|
885
|
-
}
|
|
886
|
-
return $object;
|
|
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
|
+
});
|
|
887
409
|
}
|
|
888
410
|
PropertyShape.create = create;
|
|
411
|
+
function createUnsafe(parameters) {
|
|
412
|
+
return create(parameters).unsafeCoerce();
|
|
413
|
+
}
|
|
414
|
+
PropertyShape.createUnsafe = createUnsafe;
|
|
889
415
|
let Identifier;
|
|
890
416
|
(function (Identifier) {
|
|
891
417
|
Identifier.parse = $parseIdentifier;
|
|
@@ -1585,7 +1111,7 @@ export var PropertyShape;
|
|
|
1585
1111
|
value: Maybe.empty(),
|
|
1586
1112
|
})),
|
|
1587
1113
|
}),
|
|
1588
|
-
}).
|
|
1114
|
+
}).chain((properties) => create(properties)));
|
|
1589
1115
|
};
|
|
1590
1116
|
PropertyShape.fromRdfResource = $wrap_FromRdfResourceFunction(PropertyShape._fromRdfResource);
|
|
1591
1117
|
PropertyShape.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|
|
@@ -2098,58 +1624,23 @@ export var PropertyShape;
|
|
|
2098
1624
|
export var PropertyGroup;
|
|
2099
1625
|
(function (PropertyGroup) {
|
|
2100
1626
|
function create(parameters) {
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
$
|
|
2105
|
-
}
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
}
|
|
2112
|
-
else if ($identifierParameter === undefined) {
|
|
2113
|
-
const $eagerIdentifier = dataFactory.blankNode();
|
|
2114
|
-
$identifier = () => $eagerIdentifier;
|
|
2115
|
-
}
|
|
2116
|
-
else {
|
|
2117
|
-
$identifier = $identifierParameter;
|
|
2118
|
-
}
|
|
2119
|
-
const $type = "PropertyGroup";
|
|
2120
|
-
let comment;
|
|
2121
|
-
if (Maybe.isMaybe(parameters?.comment)) {
|
|
2122
|
-
comment = parameters?.comment;
|
|
2123
|
-
}
|
|
2124
|
-
else if (typeof parameters?.comment === "string") {
|
|
2125
|
-
comment = Maybe.of(parameters?.comment);
|
|
2126
|
-
}
|
|
2127
|
-
else if (parameters?.comment === undefined) {
|
|
2128
|
-
comment = Maybe.empty();
|
|
2129
|
-
}
|
|
2130
|
-
else {
|
|
2131
|
-
comment = parameters?.comment;
|
|
2132
|
-
}
|
|
2133
|
-
let label;
|
|
2134
|
-
if (Maybe.isMaybe(parameters?.label)) {
|
|
2135
|
-
label = parameters?.label;
|
|
2136
|
-
}
|
|
2137
|
-
else if (typeof parameters?.label === "string") {
|
|
2138
|
-
label = Maybe.of(parameters?.label);
|
|
2139
|
-
}
|
|
2140
|
-
else if (parameters?.label === undefined) {
|
|
2141
|
-
label = Maybe.empty();
|
|
2142
|
-
}
|
|
2143
|
-
else {
|
|
2144
|
-
label = parameters?.label;
|
|
2145
|
-
}
|
|
2146
|
-
const $object = { $identifier, $type, comment, label };
|
|
2147
|
-
if (!globalThis.Object.prototype.hasOwnProperty.call($object, "toString")) {
|
|
2148
|
-
$object.toString = $toString;
|
|
2149
|
-
}
|
|
2150
|
-
return $object;
|
|
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
|
+
});
|
|
2151
1638
|
}
|
|
2152
1639
|
PropertyGroup.create = create;
|
|
1640
|
+
function createUnsafe(parameters) {
|
|
1641
|
+
return create(parameters).unsafeCoerce();
|
|
1642
|
+
}
|
|
1643
|
+
PropertyGroup.createUnsafe = createUnsafe;
|
|
2153
1644
|
let Identifier;
|
|
2154
1645
|
(function (Identifier) {
|
|
2155
1646
|
Identifier.parse = $parseIdentifier;
|
|
@@ -2229,7 +1720,7 @@ export var PropertyGroup;
|
|
|
2229
1720
|
value: Maybe.empty(),
|
|
2230
1721
|
})),
|
|
2231
1722
|
}),
|
|
2232
|
-
}).
|
|
1723
|
+
}).chain((properties) => create(properties)));
|
|
2233
1724
|
};
|
|
2234
1725
|
PropertyGroup.fromRdfResource = $wrap_FromRdfResourceFunction(PropertyGroup._fromRdfResource);
|
|
2235
1726
|
PropertyGroup.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|
|
@@ -2304,58 +1795,23 @@ export var PropertyGroup;
|
|
|
2304
1795
|
export var Ontology;
|
|
2305
1796
|
(function (Ontology) {
|
|
2306
1797
|
function create(parameters) {
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
$
|
|
2311
|
-
}
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
}
|
|
2318
|
-
else if ($identifierParameter === undefined) {
|
|
2319
|
-
const $eagerIdentifier = dataFactory.blankNode();
|
|
2320
|
-
$identifier = () => $eagerIdentifier;
|
|
2321
|
-
}
|
|
2322
|
-
else {
|
|
2323
|
-
$identifier = $identifierParameter;
|
|
2324
|
-
}
|
|
2325
|
-
const $type = "Ontology";
|
|
2326
|
-
let comment;
|
|
2327
|
-
if (Maybe.isMaybe(parameters?.comment)) {
|
|
2328
|
-
comment = parameters?.comment;
|
|
2329
|
-
}
|
|
2330
|
-
else if (typeof parameters?.comment === "string") {
|
|
2331
|
-
comment = Maybe.of(parameters?.comment);
|
|
2332
|
-
}
|
|
2333
|
-
else if (parameters?.comment === undefined) {
|
|
2334
|
-
comment = Maybe.empty();
|
|
2335
|
-
}
|
|
2336
|
-
else {
|
|
2337
|
-
comment = parameters?.comment;
|
|
2338
|
-
}
|
|
2339
|
-
let label;
|
|
2340
|
-
if (Maybe.isMaybe(parameters?.label)) {
|
|
2341
|
-
label = parameters?.label;
|
|
2342
|
-
}
|
|
2343
|
-
else if (typeof parameters?.label === "string") {
|
|
2344
|
-
label = Maybe.of(parameters?.label);
|
|
2345
|
-
}
|
|
2346
|
-
else if (parameters?.label === undefined) {
|
|
2347
|
-
label = Maybe.empty();
|
|
2348
|
-
}
|
|
2349
|
-
else {
|
|
2350
|
-
label = parameters?.label;
|
|
2351
|
-
}
|
|
2352
|
-
const $object = { $identifier, $type, comment, label };
|
|
2353
|
-
if (!globalThis.Object.prototype.hasOwnProperty.call($object, "toString")) {
|
|
2354
|
-
$object.toString = $toString;
|
|
2355
|
-
}
|
|
2356
|
-
return $object;
|
|
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
|
+
});
|
|
2357
1809
|
}
|
|
2358
1810
|
Ontology.create = create;
|
|
1811
|
+
function createUnsafe(parameters) {
|
|
1812
|
+
return create(parameters).unsafeCoerce();
|
|
1813
|
+
}
|
|
1814
|
+
Ontology.createUnsafe = createUnsafe;
|
|
2359
1815
|
let Identifier;
|
|
2360
1816
|
(function (Identifier) {
|
|
2361
1817
|
Identifier.parse = $parseIdentifier;
|
|
@@ -2435,7 +1891,7 @@ export var Ontology;
|
|
|
2435
1891
|
value: Maybe.empty(),
|
|
2436
1892
|
})),
|
|
2437
1893
|
}),
|
|
2438
|
-
}).
|
|
1894
|
+
}).chain((properties) => create(properties)));
|
|
2439
1895
|
};
|
|
2440
1896
|
Ontology.fromRdfResource = $wrap_FromRdfResourceFunction(Ontology._fromRdfResource);
|
|
2441
1897
|
Ontology.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|
|
@@ -2510,570 +1966,51 @@ export var Ontology;
|
|
|
2510
1966
|
export var NodeShape;
|
|
2511
1967
|
(function (NodeShape) {
|
|
2512
1968
|
function create(parameters) {
|
|
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
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
}
|
|
2552
|
-
else if ($isReadonlyObjectArray(parameters?.classes)) {
|
|
2553
|
-
classes = parameters?.classes;
|
|
2554
|
-
}
|
|
2555
|
-
else if ($isReadonlyStringArray(parameters?.classes)) {
|
|
2556
|
-
classes = parameters?.classes.map((item) => dataFactory.namedNode(item));
|
|
2557
|
-
}
|
|
2558
|
-
else {
|
|
2559
|
-
classes = parameters?.classes;
|
|
2560
|
-
}
|
|
2561
|
-
let closed;
|
|
2562
|
-
if (Maybe.isMaybe(parameters?.closed)) {
|
|
2563
|
-
closed = parameters?.closed;
|
|
2564
|
-
}
|
|
2565
|
-
else if (typeof parameters?.closed === "boolean") {
|
|
2566
|
-
closed = Maybe.of(parameters?.closed);
|
|
2567
|
-
}
|
|
2568
|
-
else if (parameters?.closed === undefined) {
|
|
2569
|
-
closed = Maybe.empty();
|
|
2570
|
-
}
|
|
2571
|
-
else {
|
|
2572
|
-
closed = parameters?.closed;
|
|
2573
|
-
}
|
|
2574
|
-
let comment;
|
|
2575
|
-
if (Maybe.isMaybe(parameters?.comment)) {
|
|
2576
|
-
comment = parameters?.comment;
|
|
2577
|
-
}
|
|
2578
|
-
else if (typeof parameters?.comment === "string") {
|
|
2579
|
-
comment = Maybe.of(parameters?.comment);
|
|
2580
|
-
}
|
|
2581
|
-
else if (parameters?.comment === undefined) {
|
|
2582
|
-
comment = Maybe.empty();
|
|
2583
|
-
}
|
|
2584
|
-
else {
|
|
2585
|
-
comment = parameters?.comment;
|
|
2586
|
-
}
|
|
2587
|
-
let datatype;
|
|
2588
|
-
if (Maybe.isMaybe(parameters?.datatype)) {
|
|
2589
|
-
datatype = parameters?.datatype;
|
|
2590
|
-
}
|
|
2591
|
-
else if (typeof parameters?.datatype === "object") {
|
|
2592
|
-
datatype = Maybe.of(parameters?.datatype);
|
|
2593
|
-
}
|
|
2594
|
-
else if (typeof parameters?.datatype === "string") {
|
|
2595
|
-
datatype = Maybe.of(dataFactory.namedNode(parameters?.datatype));
|
|
2596
|
-
}
|
|
2597
|
-
else if (parameters?.datatype === undefined) {
|
|
2598
|
-
datatype = Maybe.empty();
|
|
2599
|
-
}
|
|
2600
|
-
else {
|
|
2601
|
-
datatype = parameters?.datatype;
|
|
2602
|
-
}
|
|
2603
|
-
let deactivated;
|
|
2604
|
-
if (Maybe.isMaybe(parameters?.deactivated)) {
|
|
2605
|
-
deactivated = parameters?.deactivated;
|
|
2606
|
-
}
|
|
2607
|
-
else if (typeof parameters?.deactivated === "boolean") {
|
|
2608
|
-
deactivated = Maybe.of(parameters?.deactivated);
|
|
2609
|
-
}
|
|
2610
|
-
else if (parameters?.deactivated === undefined) {
|
|
2611
|
-
deactivated = Maybe.empty();
|
|
2612
|
-
}
|
|
2613
|
-
else {
|
|
2614
|
-
deactivated = parameters?.deactivated;
|
|
2615
|
-
}
|
|
2616
|
-
let flags;
|
|
2617
|
-
if (parameters?.flags === undefined) {
|
|
2618
|
-
flags = [];
|
|
2619
|
-
}
|
|
2620
|
-
else if (typeof parameters?.flags === "object") {
|
|
2621
|
-
flags = parameters?.flags;
|
|
2622
|
-
}
|
|
2623
|
-
else {
|
|
2624
|
-
flags = parameters?.flags;
|
|
2625
|
-
}
|
|
2626
|
-
let hasValues;
|
|
2627
|
-
if (parameters?.hasValues === undefined) {
|
|
2628
|
-
hasValues = [];
|
|
2629
|
-
}
|
|
2630
|
-
else if ($isReadonlyObjectArray(parameters?.hasValues)) {
|
|
2631
|
-
hasValues = parameters?.hasValues;
|
|
2632
|
-
}
|
|
2633
|
-
else if ($isReadonlyBigIntArray(parameters?.hasValues)) {
|
|
2634
|
-
hasValues = parameters?.hasValues.map((item) => $literalFactory.bigint(item));
|
|
2635
|
-
}
|
|
2636
|
-
else if ($isReadonlyBooleanArray(parameters?.hasValues)) {
|
|
2637
|
-
hasValues = parameters?.hasValues.map((item) => $literalFactory.boolean(item));
|
|
2638
|
-
}
|
|
2639
|
-
else if ($isReadonlyNumberArray(parameters?.hasValues)) {
|
|
2640
|
-
hasValues = parameters?.hasValues.map((item) => $literalFactory.number(item));
|
|
2641
|
-
}
|
|
2642
|
-
else if ($isReadonlyStringArray(parameters?.hasValues)) {
|
|
2643
|
-
hasValues = parameters?.hasValues.map((item) => $literalFactory.string(item));
|
|
2644
|
-
}
|
|
2645
|
-
else {
|
|
2646
|
-
hasValues = parameters?.hasValues;
|
|
2647
|
-
}
|
|
2648
|
-
let ignoredProperties;
|
|
2649
|
-
if (Maybe.isMaybe(parameters?.ignoredProperties)) {
|
|
2650
|
-
ignoredProperties = parameters?.ignoredProperties;
|
|
2651
|
-
}
|
|
2652
|
-
else if ($isReadonlyObjectArray(parameters?.ignoredProperties)) {
|
|
2653
|
-
ignoredProperties = Maybe.of(parameters?.ignoredProperties);
|
|
2654
|
-
}
|
|
2655
|
-
else if ($isReadonlyStringArray(parameters?.ignoredProperties)) {
|
|
2656
|
-
ignoredProperties = Maybe.of(parameters?.ignoredProperties.map((item) => dataFactory.namedNode(item)));
|
|
2657
|
-
}
|
|
2658
|
-
else if (parameters?.ignoredProperties === undefined) {
|
|
2659
|
-
ignoredProperties = Maybe.empty();
|
|
2660
|
-
}
|
|
2661
|
-
else {
|
|
2662
|
-
ignoredProperties = parameters?.ignoredProperties;
|
|
2663
|
-
}
|
|
2664
|
-
let in_;
|
|
2665
|
-
if (Maybe.isMaybe(parameters?.in_)) {
|
|
2666
|
-
in_ = parameters?.in_;
|
|
2667
|
-
}
|
|
2668
|
-
else if ($isReadonlyObjectArray(parameters?.in_)) {
|
|
2669
|
-
in_ = Maybe.of(parameters?.in_);
|
|
2670
|
-
}
|
|
2671
|
-
else if ($isReadonlyBigIntArray(parameters?.in_)) {
|
|
2672
|
-
in_ = Maybe.of(parameters?.in_.map((item) => $literalFactory.bigint(item)));
|
|
2673
|
-
}
|
|
2674
|
-
else if ($isReadonlyBooleanArray(parameters?.in_)) {
|
|
2675
|
-
in_ = Maybe.of(parameters?.in_.map((item) => $literalFactory.boolean(item)));
|
|
2676
|
-
}
|
|
2677
|
-
else if ($isReadonlyNumberArray(parameters?.in_)) {
|
|
2678
|
-
in_ = Maybe.of(parameters?.in_.map((item) => $literalFactory.number(item)));
|
|
2679
|
-
}
|
|
2680
|
-
else if ($isReadonlyStringArray(parameters?.in_)) {
|
|
2681
|
-
in_ = Maybe.of(parameters?.in_.map((item) => $literalFactory.string(item)));
|
|
2682
|
-
}
|
|
2683
|
-
else if (parameters?.in_ === undefined) {
|
|
2684
|
-
in_ = Maybe.empty();
|
|
2685
|
-
}
|
|
2686
|
-
else {
|
|
2687
|
-
in_ = parameters?.in_;
|
|
2688
|
-
}
|
|
2689
|
-
let isDefinedBy;
|
|
2690
|
-
if (Maybe.isMaybe(parameters?.isDefinedBy)) {
|
|
2691
|
-
isDefinedBy = parameters?.isDefinedBy;
|
|
2692
|
-
}
|
|
2693
|
-
else if (typeof parameters?.isDefinedBy === "object") {
|
|
2694
|
-
isDefinedBy = Maybe.of(parameters?.isDefinedBy);
|
|
2695
|
-
}
|
|
2696
|
-
else if (typeof parameters?.isDefinedBy === "string") {
|
|
2697
|
-
isDefinedBy = Maybe.of(dataFactory.namedNode(parameters?.isDefinedBy));
|
|
2698
|
-
}
|
|
2699
|
-
else if (parameters?.isDefinedBy === undefined) {
|
|
2700
|
-
isDefinedBy = Maybe.empty();
|
|
2701
|
-
}
|
|
2702
|
-
else {
|
|
2703
|
-
isDefinedBy = parameters?.isDefinedBy;
|
|
2704
|
-
}
|
|
2705
|
-
let label;
|
|
2706
|
-
if (Maybe.isMaybe(parameters?.label)) {
|
|
2707
|
-
label = parameters?.label;
|
|
2708
|
-
}
|
|
2709
|
-
else if (typeof parameters?.label === "string") {
|
|
2710
|
-
label = Maybe.of(parameters?.label);
|
|
2711
|
-
}
|
|
2712
|
-
else if (parameters?.label === undefined) {
|
|
2713
|
-
label = Maybe.empty();
|
|
2714
|
-
}
|
|
2715
|
-
else {
|
|
2716
|
-
label = parameters?.label;
|
|
2717
|
-
}
|
|
2718
|
-
let languageIn;
|
|
2719
|
-
if (Maybe.isMaybe(parameters?.languageIn)) {
|
|
2720
|
-
languageIn = parameters?.languageIn;
|
|
2721
|
-
}
|
|
2722
|
-
else if (typeof parameters?.languageIn === "object") {
|
|
2723
|
-
languageIn = Maybe.of(parameters?.languageIn);
|
|
2724
|
-
}
|
|
2725
|
-
else if (parameters?.languageIn === undefined) {
|
|
2726
|
-
languageIn = Maybe.empty();
|
|
2727
|
-
}
|
|
2728
|
-
else {
|
|
2729
|
-
languageIn = parameters?.languageIn;
|
|
2730
|
-
}
|
|
2731
|
-
let maxCount;
|
|
2732
|
-
if (Maybe.isMaybe(parameters?.maxCount)) {
|
|
2733
|
-
maxCount = parameters?.maxCount;
|
|
2734
|
-
}
|
|
2735
|
-
else if (typeof parameters?.maxCount === "bigint") {
|
|
2736
|
-
maxCount = Maybe.of(parameters?.maxCount);
|
|
2737
|
-
}
|
|
2738
|
-
else if (typeof parameters?.maxCount === "number") {
|
|
2739
|
-
maxCount = Maybe.of(BigInt(parameters?.maxCount));
|
|
2740
|
-
}
|
|
2741
|
-
else if (parameters?.maxCount === undefined) {
|
|
2742
|
-
maxCount = Maybe.empty();
|
|
2743
|
-
}
|
|
2744
|
-
else {
|
|
2745
|
-
maxCount = parameters?.maxCount;
|
|
2746
|
-
}
|
|
2747
|
-
let maxExclusive;
|
|
2748
|
-
if (Maybe.isMaybe(parameters?.maxExclusive)) {
|
|
2749
|
-
maxExclusive = parameters?.maxExclusive;
|
|
2750
|
-
}
|
|
2751
|
-
else if (typeof parameters?.maxExclusive === "bigint") {
|
|
2752
|
-
maxExclusive = Maybe.of($literalFactory.bigint(parameters?.maxExclusive));
|
|
2753
|
-
}
|
|
2754
|
-
else if (typeof parameters?.maxExclusive === "boolean") {
|
|
2755
|
-
maxExclusive = Maybe.of($literalFactory.boolean(parameters?.maxExclusive));
|
|
2756
|
-
}
|
|
2757
|
-
else if (typeof parameters?.maxExclusive === "object" &&
|
|
2758
|
-
parameters?.maxExclusive instanceof Date) {
|
|
2759
|
-
maxExclusive = Maybe.of($literalFactory.date(parameters?.maxExclusive));
|
|
2760
|
-
}
|
|
2761
|
-
else if (typeof parameters?.maxExclusive === "number") {
|
|
2762
|
-
maxExclusive = Maybe.of($literalFactory.number(parameters?.maxExclusive));
|
|
2763
|
-
}
|
|
2764
|
-
else if (typeof parameters?.maxExclusive === "string") {
|
|
2765
|
-
maxExclusive = Maybe.of($literalFactory.string(parameters?.maxExclusive));
|
|
2766
|
-
}
|
|
2767
|
-
else if (typeof parameters?.maxExclusive === "object") {
|
|
2768
|
-
maxExclusive = Maybe.of(parameters?.maxExclusive);
|
|
2769
|
-
}
|
|
2770
|
-
else if (parameters?.maxExclusive === undefined) {
|
|
2771
|
-
maxExclusive = Maybe.empty();
|
|
2772
|
-
}
|
|
2773
|
-
else {
|
|
2774
|
-
maxExclusive = parameters?.maxExclusive;
|
|
2775
|
-
}
|
|
2776
|
-
let maxInclusive;
|
|
2777
|
-
if (Maybe.isMaybe(parameters?.maxInclusive)) {
|
|
2778
|
-
maxInclusive = parameters?.maxInclusive;
|
|
2779
|
-
}
|
|
2780
|
-
else if (typeof parameters?.maxInclusive === "bigint") {
|
|
2781
|
-
maxInclusive = Maybe.of($literalFactory.bigint(parameters?.maxInclusive));
|
|
2782
|
-
}
|
|
2783
|
-
else if (typeof parameters?.maxInclusive === "boolean") {
|
|
2784
|
-
maxInclusive = Maybe.of($literalFactory.boolean(parameters?.maxInclusive));
|
|
2785
|
-
}
|
|
2786
|
-
else if (typeof parameters?.maxInclusive === "object" &&
|
|
2787
|
-
parameters?.maxInclusive instanceof Date) {
|
|
2788
|
-
maxInclusive = Maybe.of($literalFactory.date(parameters?.maxInclusive));
|
|
2789
|
-
}
|
|
2790
|
-
else if (typeof parameters?.maxInclusive === "number") {
|
|
2791
|
-
maxInclusive = Maybe.of($literalFactory.number(parameters?.maxInclusive));
|
|
2792
|
-
}
|
|
2793
|
-
else if (typeof parameters?.maxInclusive === "string") {
|
|
2794
|
-
maxInclusive = Maybe.of($literalFactory.string(parameters?.maxInclusive));
|
|
2795
|
-
}
|
|
2796
|
-
else if (typeof parameters?.maxInclusive === "object") {
|
|
2797
|
-
maxInclusive = Maybe.of(parameters?.maxInclusive);
|
|
2798
|
-
}
|
|
2799
|
-
else if (parameters?.maxInclusive === undefined) {
|
|
2800
|
-
maxInclusive = Maybe.empty();
|
|
2801
|
-
}
|
|
2802
|
-
else {
|
|
2803
|
-
maxInclusive = parameters?.maxInclusive;
|
|
2804
|
-
}
|
|
2805
|
-
let maxLength;
|
|
2806
|
-
if (Maybe.isMaybe(parameters?.maxLength)) {
|
|
2807
|
-
maxLength = parameters?.maxLength;
|
|
2808
|
-
}
|
|
2809
|
-
else if (typeof parameters?.maxLength === "bigint") {
|
|
2810
|
-
maxLength = Maybe.of(parameters?.maxLength);
|
|
2811
|
-
}
|
|
2812
|
-
else if (typeof parameters?.maxLength === "number") {
|
|
2813
|
-
maxLength = Maybe.of(BigInt(parameters?.maxLength));
|
|
2814
|
-
}
|
|
2815
|
-
else if (parameters?.maxLength === undefined) {
|
|
2816
|
-
maxLength = Maybe.empty();
|
|
2817
|
-
}
|
|
2818
|
-
else {
|
|
2819
|
-
maxLength = parameters?.maxLength;
|
|
2820
|
-
}
|
|
2821
|
-
let minCount;
|
|
2822
|
-
if (Maybe.isMaybe(parameters?.minCount)) {
|
|
2823
|
-
minCount = parameters?.minCount;
|
|
2824
|
-
}
|
|
2825
|
-
else if (typeof parameters?.minCount === "bigint") {
|
|
2826
|
-
minCount = Maybe.of(parameters?.minCount);
|
|
2827
|
-
}
|
|
2828
|
-
else if (typeof parameters?.minCount === "number") {
|
|
2829
|
-
minCount = Maybe.of(BigInt(parameters?.minCount));
|
|
2830
|
-
}
|
|
2831
|
-
else if (parameters?.minCount === undefined) {
|
|
2832
|
-
minCount = Maybe.empty();
|
|
2833
|
-
}
|
|
2834
|
-
else {
|
|
2835
|
-
minCount = parameters?.minCount;
|
|
2836
|
-
}
|
|
2837
|
-
let minExclusive;
|
|
2838
|
-
if (Maybe.isMaybe(parameters?.minExclusive)) {
|
|
2839
|
-
minExclusive = parameters?.minExclusive;
|
|
2840
|
-
}
|
|
2841
|
-
else if (typeof parameters?.minExclusive === "bigint") {
|
|
2842
|
-
minExclusive = Maybe.of($literalFactory.bigint(parameters?.minExclusive));
|
|
2843
|
-
}
|
|
2844
|
-
else if (typeof parameters?.minExclusive === "boolean") {
|
|
2845
|
-
minExclusive = Maybe.of($literalFactory.boolean(parameters?.minExclusive));
|
|
2846
|
-
}
|
|
2847
|
-
else if (typeof parameters?.minExclusive === "object" &&
|
|
2848
|
-
parameters?.minExclusive instanceof Date) {
|
|
2849
|
-
minExclusive = Maybe.of($literalFactory.date(parameters?.minExclusive));
|
|
2850
|
-
}
|
|
2851
|
-
else if (typeof parameters?.minExclusive === "number") {
|
|
2852
|
-
minExclusive = Maybe.of($literalFactory.number(parameters?.minExclusive));
|
|
2853
|
-
}
|
|
2854
|
-
else if (typeof parameters?.minExclusive === "string") {
|
|
2855
|
-
minExclusive = Maybe.of($literalFactory.string(parameters?.minExclusive));
|
|
2856
|
-
}
|
|
2857
|
-
else if (typeof parameters?.minExclusive === "object") {
|
|
2858
|
-
minExclusive = Maybe.of(parameters?.minExclusive);
|
|
2859
|
-
}
|
|
2860
|
-
else if (parameters?.minExclusive === undefined) {
|
|
2861
|
-
minExclusive = Maybe.empty();
|
|
2862
|
-
}
|
|
2863
|
-
else {
|
|
2864
|
-
minExclusive = parameters?.minExclusive;
|
|
2865
|
-
}
|
|
2866
|
-
let minInclusive;
|
|
2867
|
-
if (Maybe.isMaybe(parameters?.minInclusive)) {
|
|
2868
|
-
minInclusive = parameters?.minInclusive;
|
|
2869
|
-
}
|
|
2870
|
-
else if (typeof parameters?.minInclusive === "bigint") {
|
|
2871
|
-
minInclusive = Maybe.of($literalFactory.bigint(parameters?.minInclusive));
|
|
2872
|
-
}
|
|
2873
|
-
else if (typeof parameters?.minInclusive === "boolean") {
|
|
2874
|
-
minInclusive = Maybe.of($literalFactory.boolean(parameters?.minInclusive));
|
|
2875
|
-
}
|
|
2876
|
-
else if (typeof parameters?.minInclusive === "object" &&
|
|
2877
|
-
parameters?.minInclusive instanceof Date) {
|
|
2878
|
-
minInclusive = Maybe.of($literalFactory.date(parameters?.minInclusive));
|
|
2879
|
-
}
|
|
2880
|
-
else if (typeof parameters?.minInclusive === "number") {
|
|
2881
|
-
minInclusive = Maybe.of($literalFactory.number(parameters?.minInclusive));
|
|
2882
|
-
}
|
|
2883
|
-
else if (typeof parameters?.minInclusive === "string") {
|
|
2884
|
-
minInclusive = Maybe.of($literalFactory.string(parameters?.minInclusive));
|
|
2885
|
-
}
|
|
2886
|
-
else if (typeof parameters?.minInclusive === "object") {
|
|
2887
|
-
minInclusive = Maybe.of(parameters?.minInclusive);
|
|
2888
|
-
}
|
|
2889
|
-
else if (parameters?.minInclusive === undefined) {
|
|
2890
|
-
minInclusive = Maybe.empty();
|
|
2891
|
-
}
|
|
2892
|
-
else {
|
|
2893
|
-
minInclusive = parameters?.minInclusive;
|
|
2894
|
-
}
|
|
2895
|
-
let minLength;
|
|
2896
|
-
if (Maybe.isMaybe(parameters?.minLength)) {
|
|
2897
|
-
minLength = parameters?.minLength;
|
|
2898
|
-
}
|
|
2899
|
-
else if (typeof parameters?.minLength === "bigint") {
|
|
2900
|
-
minLength = Maybe.of(parameters?.minLength);
|
|
2901
|
-
}
|
|
2902
|
-
else if (typeof parameters?.minLength === "number") {
|
|
2903
|
-
minLength = Maybe.of(BigInt(parameters?.minLength));
|
|
2904
|
-
}
|
|
2905
|
-
else if (parameters?.minLength === undefined) {
|
|
2906
|
-
minLength = Maybe.empty();
|
|
2907
|
-
}
|
|
2908
|
-
else {
|
|
2909
|
-
minLength = parameters?.minLength;
|
|
2910
|
-
}
|
|
2911
|
-
let node;
|
|
2912
|
-
if (Maybe.isMaybe(parameters?.node)) {
|
|
2913
|
-
node = parameters?.node;
|
|
2914
|
-
}
|
|
2915
|
-
else if (typeof parameters?.node === "object") {
|
|
2916
|
-
node = Maybe.of(parameters?.node);
|
|
2917
|
-
}
|
|
2918
|
-
else if (typeof parameters?.node === "string") {
|
|
2919
|
-
node = Maybe.of(dataFactory.namedNode(parameters?.node));
|
|
2920
|
-
}
|
|
2921
|
-
else if (parameters?.node === undefined) {
|
|
2922
|
-
node = Maybe.empty();
|
|
2923
|
-
}
|
|
2924
|
-
else {
|
|
2925
|
-
node = parameters?.node;
|
|
2926
|
-
}
|
|
2927
|
-
let nodeKind;
|
|
2928
|
-
if (Maybe.isMaybe(parameters?.nodeKind)) {
|
|
2929
|
-
nodeKind = parameters?.nodeKind;
|
|
2930
|
-
}
|
|
2931
|
-
else if (typeof parameters?.nodeKind === "object") {
|
|
2932
|
-
nodeKind = Maybe.of(parameters?.nodeKind);
|
|
2933
|
-
}
|
|
2934
|
-
else if (typeof parameters?.nodeKind === "string") {
|
|
2935
|
-
nodeKind = Maybe.of(dataFactory.namedNode(parameters?.nodeKind));
|
|
2936
|
-
}
|
|
2937
|
-
else if (parameters?.nodeKind === undefined) {
|
|
2938
|
-
nodeKind = Maybe.empty();
|
|
2939
|
-
}
|
|
2940
|
-
else {
|
|
2941
|
-
nodeKind = parameters?.nodeKind;
|
|
2942
|
-
}
|
|
2943
|
-
let not;
|
|
2944
|
-
if (parameters?.not === undefined) {
|
|
2945
|
-
not = [];
|
|
2946
|
-
}
|
|
2947
|
-
else if ($isReadonlyObjectArray(parameters?.not)) {
|
|
2948
|
-
not = parameters?.not;
|
|
2949
|
-
}
|
|
2950
|
-
else if ($isReadonlyStringArray(parameters?.not)) {
|
|
2951
|
-
not = parameters?.not.map((item) => dataFactory.namedNode(item));
|
|
2952
|
-
}
|
|
2953
|
-
else {
|
|
2954
|
-
not = parameters?.not;
|
|
2955
|
-
}
|
|
2956
|
-
let or;
|
|
2957
|
-
if (Maybe.isMaybe(parameters?.or)) {
|
|
2958
|
-
or = parameters?.or;
|
|
2959
|
-
}
|
|
2960
|
-
else if ($isReadonlyObjectArray(parameters?.or)) {
|
|
2961
|
-
or = Maybe.of(parameters?.or);
|
|
2962
|
-
}
|
|
2963
|
-
else if ($isReadonlyStringArray(parameters?.or)) {
|
|
2964
|
-
or = Maybe.of(parameters?.or.map((item) => dataFactory.namedNode(item)));
|
|
2965
|
-
}
|
|
2966
|
-
else if (parameters?.or === undefined) {
|
|
2967
|
-
or = Maybe.empty();
|
|
2968
|
-
}
|
|
2969
|
-
else {
|
|
2970
|
-
or = parameters?.or;
|
|
2971
|
-
}
|
|
2972
|
-
let patterns;
|
|
2973
|
-
if (parameters?.patterns === undefined) {
|
|
2974
|
-
patterns = [];
|
|
2975
|
-
}
|
|
2976
|
-
else if (typeof parameters?.patterns === "object") {
|
|
2977
|
-
patterns = parameters?.patterns;
|
|
2978
|
-
}
|
|
2979
|
-
else {
|
|
2980
|
-
patterns = parameters?.patterns;
|
|
2981
|
-
}
|
|
2982
|
-
let properties;
|
|
2983
|
-
if (parameters?.properties === undefined) {
|
|
2984
|
-
properties = [];
|
|
2985
|
-
}
|
|
2986
|
-
else if ($isReadonlyObjectArray(parameters?.properties)) {
|
|
2987
|
-
properties = parameters?.properties;
|
|
2988
|
-
}
|
|
2989
|
-
else if ($isReadonlyStringArray(parameters?.properties)) {
|
|
2990
|
-
properties = parameters?.properties.map((item) => dataFactory.namedNode(item));
|
|
2991
|
-
}
|
|
2992
|
-
else {
|
|
2993
|
-
properties = parameters?.properties;
|
|
2994
|
-
}
|
|
2995
|
-
let subClassOf;
|
|
2996
|
-
if (parameters?.subClassOf === undefined) {
|
|
2997
|
-
subClassOf = [];
|
|
2998
|
-
}
|
|
2999
|
-
else if ($isReadonlyObjectArray(parameters?.subClassOf)) {
|
|
3000
|
-
subClassOf = parameters?.subClassOf;
|
|
3001
|
-
}
|
|
3002
|
-
else if ($isReadonlyStringArray(parameters?.subClassOf)) {
|
|
3003
|
-
subClassOf = parameters?.subClassOf.map((item) => dataFactory.namedNode(item));
|
|
3004
|
-
}
|
|
3005
|
-
else {
|
|
3006
|
-
subClassOf = parameters?.subClassOf;
|
|
3007
|
-
}
|
|
3008
|
-
let types;
|
|
3009
|
-
if (parameters?.types === undefined) {
|
|
3010
|
-
types = [];
|
|
3011
|
-
}
|
|
3012
|
-
else if ($isReadonlyObjectArray(parameters?.types)) {
|
|
3013
|
-
types = parameters?.types;
|
|
3014
|
-
}
|
|
3015
|
-
else if ($isReadonlyStringArray(parameters?.types)) {
|
|
3016
|
-
types = parameters?.types.map((item) => dataFactory.namedNode(item));
|
|
3017
|
-
}
|
|
3018
|
-
else {
|
|
3019
|
-
types = parameters?.types;
|
|
3020
|
-
}
|
|
3021
|
-
let xone;
|
|
3022
|
-
if (Maybe.isMaybe(parameters?.xone)) {
|
|
3023
|
-
xone = parameters?.xone;
|
|
3024
|
-
}
|
|
3025
|
-
else if ($isReadonlyObjectArray(parameters?.xone)) {
|
|
3026
|
-
xone = Maybe.of(parameters?.xone);
|
|
3027
|
-
}
|
|
3028
|
-
else if ($isReadonlyStringArray(parameters?.xone)) {
|
|
3029
|
-
xone = Maybe.of(parameters?.xone.map((item) => dataFactory.namedNode(item)));
|
|
3030
|
-
}
|
|
3031
|
-
else if (parameters?.xone === undefined) {
|
|
3032
|
-
xone = Maybe.empty();
|
|
3033
|
-
}
|
|
3034
|
-
else {
|
|
3035
|
-
xone = parameters?.xone;
|
|
3036
|
-
}
|
|
3037
|
-
const $object = {
|
|
3038
|
-
$identifier,
|
|
3039
|
-
$type,
|
|
3040
|
-
and,
|
|
3041
|
-
classes,
|
|
3042
|
-
closed,
|
|
3043
|
-
comment,
|
|
3044
|
-
datatype,
|
|
3045
|
-
deactivated,
|
|
3046
|
-
flags,
|
|
3047
|
-
hasValues,
|
|
3048
|
-
ignoredProperties,
|
|
3049
|
-
in_,
|
|
3050
|
-
isDefinedBy,
|
|
3051
|
-
label,
|
|
3052
|
-
languageIn,
|
|
3053
|
-
maxCount,
|
|
3054
|
-
maxExclusive,
|
|
3055
|
-
maxInclusive,
|
|
3056
|
-
maxLength,
|
|
3057
|
-
minCount,
|
|
3058
|
-
minExclusive,
|
|
3059
|
-
minInclusive,
|
|
3060
|
-
minLength,
|
|
3061
|
-
node,
|
|
3062
|
-
nodeKind,
|
|
3063
|
-
not,
|
|
3064
|
-
or,
|
|
3065
|
-
patterns,
|
|
3066
|
-
properties,
|
|
3067
|
-
subClassOf,
|
|
3068
|
-
types,
|
|
3069
|
-
xone,
|
|
3070
|
-
};
|
|
3071
|
-
if (!globalThis.Object.prototype.hasOwnProperty.call($object, "toString")) {
|
|
3072
|
-
$object.toString = $toString;
|
|
3073
|
-
}
|
|
3074
|
-
return $object;
|
|
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
|
+
});
|
|
3075
2008
|
}
|
|
3076
2009
|
NodeShape.create = create;
|
|
2010
|
+
function createUnsafe(parameters) {
|
|
2011
|
+
return create(parameters).unsafeCoerce();
|
|
2012
|
+
}
|
|
2013
|
+
NodeShape.createUnsafe = createUnsafe;
|
|
3077
2014
|
let Identifier;
|
|
3078
2015
|
(function (Identifier) {
|
|
3079
2016
|
Identifier.parse = $parseIdentifier;
|
|
@@ -3726,7 +2663,7 @@ export var NodeShape;
|
|
|
3726
2663
|
value: Maybe.empty(),
|
|
3727
2664
|
})),
|
|
3728
2665
|
}),
|
|
3729
|
-
}).
|
|
2666
|
+
}).chain((properties) => create(properties)));
|
|
3730
2667
|
};
|
|
3731
2668
|
NodeShape.fromRdfResource = $wrap_FromRdfResourceFunction(NodeShape._fromRdfResource);
|
|
3732
2669
|
NodeShape.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
|