@shaclmate/compiler 4.0.96 → 4.0.97

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/dist/_ShapesGraphToAstTransformer/synthesizePartialAstStructType.d.ts +6 -0
  2. package/dist/_ShapesGraphToAstTransformer/synthesizePartialAstStructType.js +38 -0
  3. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstStructTypeField.js +114 -145
  4. package/dist/_ShapesGraphToAstTransformer/transformShapeNodeConstraintToAstType.d.ts +7 -0
  5. package/dist/_ShapesGraphToAstTransformer/transformShapeNodeConstraintToAstType.js +13 -0
  6. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstStructType.d.ts +1 -1
  7. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstStructType.js +0 -52
  8. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.js +2 -0
  9. package/dist/ast/StructCompoundType.d.ts +3 -2
  10. package/dist/ast/StructCompoundType.js +29 -46
  11. package/dist/ast/StructDiscriminatedUnionType.d.ts +5 -1
  12. package/dist/ast/StructIntersectionType.d.ts +4 -1
  13. package/dist/generators/ts/ObjectDiscriminatedUnionType.d.ts +7 -4
  14. package/dist/generators/ts/ObjectDiscriminatedUnionType.js +18 -2
  15. package/dist/generators/ts/ObjectIntersectionType.d.ts +7 -4
  16. package/dist/generators/ts/RdfjsDatasetObjectSetType.js +21 -10
  17. package/dist/generators/ts/TypeFactory.js +19 -33
  18. package/dist/input/input.shaclmate.d.ts +2474 -2124
  19. package/dist/input/input.shaclmate.js +558 -1292
  20. package/dist/input/input.shaclmate.ttl +9 -5
  21. package/package.json +6 -4
  22. package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_schemaExpression.d.ts +0 -4
  23. package/dist/generators/ts/_ObjectDiscriminatedUnionType/ObjectDiscriminatedUnionType_schemaExpression.js +0 -37
@@ -375,393 +375,293 @@ const $xsd_double = dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#doub
375
375
  const $xsd_int = dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#int");
376
376
  const $xsd_integer = dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#integer");
377
377
  const $xsd_string = dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#string");
378
- export var NodeShape;
379
- (function (NodeShape) {
380
- NodeShape._fromRdfResource = (resource, options) => $sequenceRecord({
378
+ export var BaseShape;
379
+ (function (BaseShape) {
380
+ BaseShape._fromRdfResource = (resource, options) => $sequenceRecord({
381
381
  $identifier: $identifierFromRdfResourceValues($rdfResourceIdentifierValues(resource), {
382
382
  ...options,
383
383
  focusResource: resource,
384
384
  propertyPath: $rdf_subject,
385
- schema: NodeShape.schema.properties.$identifier.type,
385
+ schema: BaseShape.schema.properties.$identifier.type,
386
386
  }).chain((values) => values.head()),
387
- $rdfType: !options.ignoreRdfType
388
- ? $ensureRdfResourceType(resource, [NodeShape.schema.properties.$rdfType.fromRdfType], {
389
- graph: options.graph,
390
- })
391
- : Right(true),
392
387
  and: $shaclPropertyFromRdf({
393
388
  ...options,
394
389
  focusResource: resource,
395
390
  ignoreRdfType: true,
396
- propertySchema: NodeShape.schema.properties.and,
391
+ propertySchema: BaseShape.schema.properties.and,
397
392
  typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues($identifierFromRdfResourceValues)),
398
393
  }),
399
394
  classes: $shaclPropertyFromRdf({
400
395
  ...options,
401
396
  focusResource: resource,
402
397
  ignoreRdfType: true,
403
- propertySchema: NodeShape.schema.properties.classes,
398
+ propertySchema: BaseShape.schema.properties.classes,
404
399
  typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
405
400
  }),
406
- closed: $shaclPropertyFromRdf({
407
- ...options,
408
- focusResource: resource,
409
- ignoreRdfType: true,
410
- propertySchema: NodeShape.schema.properties.closed,
411
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
412
- }),
413
401
  comment: $shaclPropertyFromRdf({
414
402
  ...options,
415
403
  focusResource: resource,
416
404
  ignoreRdfType: true,
417
- propertySchema: NodeShape.schema.properties.comment,
405
+ propertySchema: BaseShape.schema.properties.comment,
418
406
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
419
407
  }),
420
408
  datatype: $shaclPropertyFromRdf({
421
409
  ...options,
422
410
  focusResource: resource,
423
411
  ignoreRdfType: true,
424
- propertySchema: NodeShape.schema.properties.datatype,
412
+ propertySchema: BaseShape.schema.properties.datatype,
425
413
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
426
414
  }),
427
415
  deactivated: $shaclPropertyFromRdf({
428
416
  ...options,
429
417
  focusResource: resource,
430
418
  ignoreRdfType: true,
431
- propertySchema: NodeShape.schema.properties.deactivated,
432
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
433
- }),
434
- discriminantValue: $shaclPropertyFromRdf({
435
- ...options,
436
- focusResource: resource,
437
- ignoreRdfType: true,
438
- propertySchema: NodeShape.schema.properties.discriminantValue,
439
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
440
- }),
441
- extern: $shaclPropertyFromRdf({
442
- ...options,
443
- focusResource: resource,
444
- ignoreRdfType: true,
445
- propertySchema: NodeShape.schema.properties.extern,
419
+ propertySchema: BaseShape.schema.properties.deactivated,
446
420
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
447
421
  }),
448
422
  flags: $shaclPropertyFromRdf({
449
423
  ...options,
450
424
  focusResource: resource,
451
425
  ignoreRdfType: true,
452
- propertySchema: NodeShape.schema.properties.flags,
426
+ propertySchema: BaseShape.schema.properties.flags,
453
427
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
454
428
  }),
455
- fromRdfType: $shaclPropertyFromRdf({
456
- ...options,
457
- focusResource: resource,
458
- ignoreRdfType: true,
459
- propertySchema: NodeShape.schema.properties.fromRdfType,
460
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
461
- }),
462
429
  hasValues: $shaclPropertyFromRdf({
463
430
  ...options,
464
431
  focusResource: resource,
465
432
  ignoreRdfType: true,
466
- propertySchema: NodeShape.schema.properties.hasValues,
433
+ propertySchema: BaseShape.schema.properties.hasValues,
467
434
  typeFromRdfResourceValues: $setFromRdfResourceValues(($termFromRdfResourceValues)),
468
435
  }),
469
436
  ignore: $shaclPropertyFromRdf({
470
437
  ...options,
471
438
  focusResource: resource,
472
439
  ignoreRdfType: true,
473
- propertySchema: NodeShape.schema.properties.ignore,
440
+ propertySchema: BaseShape.schema.properties.ignore,
474
441
  typeFromRdfResourceValues: $defaultValueFromRdfResourceValues(($booleanFromRdfResourceValues)),
475
442
  }),
476
- ignoredProperties: $shaclPropertyFromRdf({
477
- ...options,
478
- focusResource: resource,
479
- ignoreRdfType: true,
480
- propertySchema: NodeShape.schema.properties.ignoredProperties,
481
- typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues(($iriFromRdfResourceValues))),
482
- }),
483
443
  in_: $shaclPropertyFromRdf({
484
444
  ...options,
485
445
  focusResource: resource,
486
446
  ignoreRdfType: true,
487
- propertySchema: NodeShape.schema.properties.in_,
447
+ propertySchema: BaseShape.schema.properties.in_,
488
448
  typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues(($termFromRdfResourceValues))),
489
449
  }),
490
450
  isDefinedBy: $shaclPropertyFromRdf({
491
451
  ...options,
492
452
  focusResource: resource,
493
453
  ignoreRdfType: true,
494
- propertySchema: NodeShape.schema.properties.isDefinedBy,
454
+ propertySchema: BaseShape.schema.properties.isDefinedBy,
495
455
  typeFromRdfResourceValues: $maybeFromRdfResourceValues($identifierFromRdfResourceValues),
496
456
  }),
497
457
  label: $shaclPropertyFromRdf({
498
458
  ...options,
499
459
  focusResource: resource,
500
460
  ignoreRdfType: true,
501
- propertySchema: NodeShape.schema.properties.label,
461
+ propertySchema: BaseShape.schema.properties.label,
502
462
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
503
463
  }),
504
464
  languageIn: $shaclPropertyFromRdf({
505
465
  ...options,
506
466
  focusResource: resource,
507
467
  ignoreRdfType: true,
508
- propertySchema: NodeShape.schema.properties.languageIn,
468
+ propertySchema: BaseShape.schema.properties.languageIn,
509
469
  typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues(($stringFromRdfResourceValues))),
510
470
  }),
511
471
  maxExclusive: $shaclPropertyFromRdf({
512
472
  ...options,
513
473
  focusResource: resource,
514
474
  ignoreRdfType: true,
515
- propertySchema: NodeShape.schema.properties.maxExclusive,
475
+ propertySchema: BaseShape.schema.properties.maxExclusive,
516
476
  typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
517
477
  }),
518
478
  maxInclusive: $shaclPropertyFromRdf({
519
479
  ...options,
520
480
  focusResource: resource,
521
481
  ignoreRdfType: true,
522
- propertySchema: NodeShape.schema.properties.maxInclusive,
482
+ propertySchema: BaseShape.schema.properties.maxInclusive,
523
483
  typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
524
484
  }),
525
485
  maxLength: $shaclPropertyFromRdf({
526
486
  ...options,
527
487
  focusResource: resource,
528
488
  ignoreRdfType: true,
529
- propertySchema: NodeShape.schema.properties.maxLength,
489
+ propertySchema: BaseShape.schema.properties.maxLength,
530
490
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
531
491
  }),
532
492
  message: $shaclPropertyFromRdf({
533
493
  ...options,
534
494
  focusResource: resource,
535
495
  ignoreRdfType: true,
536
- propertySchema: NodeShape.schema.properties.message,
496
+ propertySchema: BaseShape.schema.properties.message,
537
497
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
538
498
  }),
539
499
  minExclusive: $shaclPropertyFromRdf({
540
500
  ...options,
541
501
  focusResource: resource,
542
502
  ignoreRdfType: true,
543
- propertySchema: NodeShape.schema.properties.minExclusive,
503
+ propertySchema: BaseShape.schema.properties.minExclusive,
544
504
  typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
545
505
  }),
546
506
  minInclusive: $shaclPropertyFromRdf({
547
507
  ...options,
548
508
  focusResource: resource,
549
509
  ignoreRdfType: true,
550
- propertySchema: NodeShape.schema.properties.minInclusive,
510
+ propertySchema: BaseShape.schema.properties.minInclusive,
551
511
  typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
552
512
  }),
553
513
  minLength: $shaclPropertyFromRdf({
554
514
  ...options,
555
515
  focusResource: resource,
556
516
  ignoreRdfType: true,
557
- propertySchema: NodeShape.schema.properties.minLength,
517
+ propertySchema: BaseShape.schema.properties.minLength,
558
518
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
559
519
  }),
560
520
  mutable: $shaclPropertyFromRdf({
561
521
  ...options,
562
522
  focusResource: resource,
563
523
  ignoreRdfType: true,
564
- propertySchema: NodeShape.schema.properties.mutable,
524
+ propertySchema: BaseShape.schema.properties.mutable,
565
525
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
566
526
  }),
567
527
  node: $shaclPropertyFromRdf({
568
528
  ...options,
569
529
  focusResource: resource,
570
530
  ignoreRdfType: true,
571
- propertySchema: NodeShape.schema.properties.node,
531
+ propertySchema: BaseShape.schema.properties.node,
572
532
  typeFromRdfResourceValues: $maybeFromRdfResourceValues($identifierFromRdfResourceValues),
573
533
  }),
574
534
  nodeKind: $shaclPropertyFromRdf({
575
535
  ...options,
576
536
  focusResource: resource,
577
537
  ignoreRdfType: true,
578
- propertySchema: NodeShape.schema.properties.nodeKind,
538
+ propertySchema: BaseShape.schema.properties.nodeKind,
579
539
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
580
540
  }),
581
541
  not: $shaclPropertyFromRdf({
582
542
  ...options,
583
543
  focusResource: resource,
584
544
  ignoreRdfType: true,
585
- propertySchema: NodeShape.schema.properties.not,
545
+ propertySchema: BaseShape.schema.properties.not,
586
546
  typeFromRdfResourceValues: $setFromRdfResourceValues($identifierFromRdfResourceValues),
587
547
  }),
588
548
  or: $shaclPropertyFromRdf({
589
549
  ...options,
590
550
  focusResource: resource,
591
551
  ignoreRdfType: true,
592
- propertySchema: NodeShape.schema.properties.or,
552
+ propertySchema: BaseShape.schema.properties.or,
593
553
  typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues($identifierFromRdfResourceValues)),
594
554
  }),
595
555
  pattern: $shaclPropertyFromRdf({
596
556
  ...options,
597
557
  focusResource: resource,
598
558
  ignoreRdfType: true,
599
- propertySchema: NodeShape.schema.properties.pattern,
559
+ propertySchema: BaseShape.schema.properties.pattern,
600
560
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
601
561
  }),
602
- properties: $shaclPropertyFromRdf({
603
- ...options,
604
- focusResource: resource,
605
- ignoreRdfType: true,
606
- propertySchema: NodeShape.schema.properties.properties,
607
- typeFromRdfResourceValues: $setFromRdfResourceValues($identifierFromRdfResourceValues),
608
- }),
609
- rdfType: $shaclPropertyFromRdf({
610
- ...options,
611
- focusResource: resource,
612
- ignoreRdfType: true,
613
- propertySchema: NodeShape.schema.properties.rdfType,
614
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
615
- }),
616
562
  severity: $shaclPropertyFromRdf({
617
563
  ...options,
618
564
  focusResource: resource,
619
565
  ignoreRdfType: true,
620
- propertySchema: NodeShape.schema.properties.severity,
566
+ propertySchema: BaseShape.schema.properties.severity,
621
567
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
622
568
  }),
623
569
  shaclmateName: $shaclPropertyFromRdf({
624
570
  ...options,
625
571
  focusResource: resource,
626
572
  ignoreRdfType: true,
627
- propertySchema: NodeShape.schema.properties.shaclmateName,
573
+ propertySchema: BaseShape.schema.properties.shaclmateName,
628
574
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
629
575
  }),
630
- subClassOf: $shaclPropertyFromRdf({
631
- ...options,
632
- focusResource: resource,
633
- ignoreRdfType: true,
634
- propertySchema: NodeShape.schema.properties.subClassOf,
635
- typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
636
- }),
637
576
  targetClasses: $shaclPropertyFromRdf({
638
577
  ...options,
639
578
  focusResource: resource,
640
579
  ignoreRdfType: true,
641
- propertySchema: NodeShape.schema.properties.targetClasses,
580
+ propertySchema: BaseShape.schema.properties.targetClasses,
642
581
  typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
643
582
  }),
644
583
  targetNodes: $shaclPropertyFromRdf({
645
584
  ...options,
646
585
  focusResource: resource,
647
586
  ignoreRdfType: true,
648
- propertySchema: NodeShape.schema.properties.targetNodes,
587
+ propertySchema: BaseShape.schema.properties.targetNodes,
649
588
  typeFromRdfResourceValues: $setFromRdfResourceValues(($termFromRdfResourceValues)),
650
589
  }),
651
590
  targetObjectsOf: $shaclPropertyFromRdf({
652
591
  ...options,
653
592
  focusResource: resource,
654
593
  ignoreRdfType: true,
655
- propertySchema: NodeShape.schema.properties.targetObjectsOf,
594
+ propertySchema: BaseShape.schema.properties.targetObjectsOf,
656
595
  typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
657
596
  }),
658
597
  targetSubjectsOf: $shaclPropertyFromRdf({
659
598
  ...options,
660
599
  focusResource: resource,
661
600
  ignoreRdfType: true,
662
- propertySchema: NodeShape.schema.properties.targetSubjectsOf,
663
- typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
664
- }),
665
- toRdfTypes: $shaclPropertyFromRdf({
666
- ...options,
667
- focusResource: resource,
668
- ignoreRdfType: true,
669
- propertySchema: NodeShape.schema.properties.toRdfTypes,
670
- typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
671
- }),
672
- tsImports: $shaclPropertyFromRdf({
673
- ...options,
674
- focusResource: resource,
675
- ignoreRdfType: true,
676
- propertySchema: NodeShape.schema.properties.tsImports,
677
- typeFromRdfResourceValues: $setFromRdfResourceValues(($stringFromRdfResourceValues)),
678
- }),
679
- types: $shaclPropertyFromRdf({
680
- ...options,
681
- focusResource: resource,
682
- ignoreRdfType: true,
683
- propertySchema: NodeShape.schema.properties.types,
601
+ propertySchema: BaseShape.schema.properties.targetSubjectsOf,
684
602
  typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
685
603
  }),
686
604
  xone: $shaclPropertyFromRdf({
687
605
  ...options,
688
606
  focusResource: resource,
689
607
  ignoreRdfType: true,
690
- propertySchema: NodeShape.schema.properties.xone,
608
+ propertySchema: BaseShape.schema.properties.xone,
691
609
  typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues($identifierFromRdfResourceValues)),
692
610
  }),
693
- }).chain((properties) => NodeShape.create(properties));
694
- NodeShape.$toString = (_nodeShape) => `NodeShape(${JSON.stringify(NodeShape.toStringRecord(_nodeShape))})`;
695
- NodeShape.create = (parameters = {}) => $sequenceRecord({
611
+ }).chain((properties) => BaseShape.create(properties));
612
+ BaseShape.$toString = (_baseShape) => `BaseShape(${JSON.stringify(BaseShape.toStringRecord(_baseShape))})`;
613
+ BaseShape.create = (parameters = {}) => $sequenceRecord({
696
614
  $identifier: $convertToIdentifierProperty(parameters.$identifier, parameters.$defaultNamespace),
697
- $type: Right("NodeShape"),
698
- and: $convertToMaybe($convertToList($convertToIdentifier))(parameters.and, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.and.type, value)),
699
- classes: $convertToScalarSet($convertToIri)(parameters.classes, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.classes.type, value)),
700
- closed: $convertToMaybe($identityConversionFunction)(parameters.closed, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.closed.type, value)),
701
- comment: $convertToMaybe($identityConversionFunction)(parameters.comment, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.comment.type, value)),
702
- datatype: $convertToMaybe($convertToIri)(parameters.datatype, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.datatype.type, value)),
703
- deactivated: $convertToMaybe($identityConversionFunction)(parameters.deactivated, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.deactivated.type, value)),
704
- discriminantValue: $convertToMaybe($identityConversionFunction)(parameters.discriminantValue, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.discriminantValue.type, value)),
705
- extern: $convertToMaybe($identityConversionFunction)(parameters.extern, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.extern.type, value)),
706
- flags: $convertToMaybe($identityConversionFunction)(parameters.flags, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.flags.type, value)),
707
- fromRdfType: $convertToMaybe($convertToIri)(parameters.fromRdfType, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.fromRdfType.type, value)),
708
- hasValues: $convertToScalarSet($identityConversionFunction)(parameters.hasValues, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.hasValues.type, value)),
615
+ $type: Right("BaseShape"),
616
+ and: $convertToMaybe($convertToList($convertToIdentifier))(parameters.and, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(BaseShape.schema.properties.and.type, value)),
617
+ classes: $convertToScalarSet($convertToIri)(parameters.classes, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(BaseShape.schema.properties.classes.type, value)),
618
+ comment: $convertToMaybe($identityConversionFunction)(parameters.comment, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.comment.type, value)),
619
+ datatype: $convertToMaybe($convertToIri)(parameters.datatype, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.datatype.type, value)),
620
+ deactivated: $convertToMaybe($identityConversionFunction)(parameters.deactivated, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.deactivated.type, value)),
621
+ flags: $convertToMaybe($identityConversionFunction)(parameters.flags, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.flags.type, value)),
622
+ hasValues: $convertToScalarSet($identityConversionFunction)(parameters.hasValues, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(BaseShape.schema.properties.hasValues.type, value)),
709
623
  ignore: $convertWithDefaultValue($identityConversionFunction, false)(parameters.ignore, parameters.$defaultNamespace),
710
- ignoredProperties: $convertToMaybe($convertToList($convertToIri))(parameters.ignoredProperties, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.ignoredProperties.type, value)),
711
- in_: $convertToMaybe($convertToList($identityConversionFunction))(parameters.in_, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.in_.type, value)),
712
- isDefinedBy: $convertToMaybe($convertToIdentifier)(parameters.isDefinedBy, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.isDefinedBy.type, value)),
713
- label: $convertToMaybe($identityConversionFunction)(parameters.label, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.label.type, value)),
714
- languageIn: $convertToMaybe($convertToList($identityConversionFunction))(parameters.languageIn, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.languageIn.type, value)),
715
- maxExclusive: $convertToMaybe($convertToLiteral)(parameters.maxExclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.maxExclusive.type, value)),
716
- maxInclusive: $convertToMaybe($convertToLiteral)(parameters.maxInclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.maxInclusive.type, value)),
717
- maxLength: $convertToMaybe($convertToBigInt)(parameters.maxLength, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.maxLength.type, value)),
718
- message: $convertToMaybe($identityConversionFunction)(parameters.message, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.message.type, value)),
719
- minExclusive: $convertToMaybe($convertToLiteral)(parameters.minExclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.minExclusive.type, value)),
720
- minInclusive: $convertToMaybe($convertToLiteral)(parameters.minInclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.minInclusive.type, value)),
721
- minLength: $convertToMaybe($convertToBigInt)(parameters.minLength, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.minLength.type, value)),
722
- mutable: $convertToMaybe($identityConversionFunction)(parameters.mutable, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.mutable.type, value)),
723
- node: $convertToMaybe($convertToIdentifier)(parameters.node, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.node.type, value)),
724
- nodeKind: $convertToMaybe(($convertToInIri))(parameters.nodeKind, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.nodeKind.type, value)),
725
- not: $convertToScalarSet($convertToIdentifier)(parameters.not, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.not.type, value)),
726
- or: $convertToMaybe($convertToList($convertToIdentifier))(parameters.or, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.or.type, value)),
727
- pattern: $convertToMaybe($identityConversionFunction)(parameters.pattern, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.pattern.type, value)),
728
- properties: $convertToScalarSet($convertToIdentifier)(parameters.properties, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.properties.type, value)),
729
- rdfType: $convertToMaybe($convertToIri)(parameters.rdfType, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.rdfType.type, value)),
730
- severity: $convertToMaybe(($convertToInIri))(parameters.severity, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.severity.type, value)),
731
- shaclmateName: $convertToMaybe($identityConversionFunction)(parameters.shaclmateName, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.shaclmateName.type, value)),
732
- subClassOf: $convertToScalarSet($convertToIri)(parameters.subClassOf, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.subClassOf.type, value)),
733
- targetClasses: $convertToScalarSet($convertToIri)(parameters.targetClasses, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.targetClasses.type, value)),
734
- targetNodes: $convertToScalarSet($identityConversionFunction)(parameters.targetNodes, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.targetNodes.type, value)),
735
- targetObjectsOf: $convertToScalarSet($convertToIri)(parameters.targetObjectsOf, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.targetObjectsOf.type, value)),
736
- targetSubjectsOf: $convertToScalarSet($convertToIri)(parameters.targetSubjectsOf, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.targetSubjectsOf.type, value)),
737
- toRdfTypes: $convertToScalarSet($convertToIri)(parameters.toRdfTypes, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.toRdfTypes.type, value)),
738
- tsImports: $convertToScalarSet($identityConversionFunction)(parameters.tsImports, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.tsImports.type, value)),
739
- types: $convertToScalarSet($convertToIri)(parameters.types, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.types.type, value)),
740
- xone: $convertToMaybe($convertToList($convertToIdentifier))(parameters.xone, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.xone.type, value)),
741
- }).map((object) => $monkeyPatchObject(object, { $toString: NodeShape.$toString }));
742
- NodeShape.createUnsafe = (parameters) => NodeShape.create(parameters).unsafeCoerce();
743
- NodeShape.fromRdfResource = $wrap_FromRdfResourceFunction(NodeShape._fromRdfResource);
744
- NodeShape.fromRdfResourceValues = (values, options) => values.chainMap((value) => value
624
+ in_: $convertToMaybe($convertToList($identityConversionFunction))(parameters.in_, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(BaseShape.schema.properties.in_.type, value)),
625
+ isDefinedBy: $convertToMaybe($convertToIdentifier)(parameters.isDefinedBy, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.isDefinedBy.type, value)),
626
+ label: $convertToMaybe($identityConversionFunction)(parameters.label, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.label.type, value)),
627
+ languageIn: $convertToMaybe($convertToList($identityConversionFunction))(parameters.languageIn, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(BaseShape.schema.properties.languageIn.type, value)),
628
+ maxExclusive: $convertToMaybe($convertToLiteral)(parameters.maxExclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.maxExclusive.type, value)),
629
+ maxInclusive: $convertToMaybe($convertToLiteral)(parameters.maxInclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.maxInclusive.type, value)),
630
+ maxLength: $convertToMaybe($convertToBigInt)(parameters.maxLength, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.maxLength.type, value)),
631
+ message: $convertToMaybe($identityConversionFunction)(parameters.message, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.message.type, value)),
632
+ minExclusive: $convertToMaybe($convertToLiteral)(parameters.minExclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.minExclusive.type, value)),
633
+ minInclusive: $convertToMaybe($convertToLiteral)(parameters.minInclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.minInclusive.type, value)),
634
+ minLength: $convertToMaybe($convertToBigInt)(parameters.minLength, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.minLength.type, value)),
635
+ mutable: $convertToMaybe($identityConversionFunction)(parameters.mutable, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.mutable.type, value)),
636
+ node: $convertToMaybe($convertToIdentifier)(parameters.node, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.node.type, value)),
637
+ nodeKind: $convertToMaybe(($convertToInIri))(parameters.nodeKind, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.nodeKind.type, value)),
638
+ not: $convertToScalarSet($convertToIdentifier)(parameters.not, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(BaseShape.schema.properties.not.type, value)),
639
+ or: $convertToMaybe($convertToList($convertToIdentifier))(parameters.or, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(BaseShape.schema.properties.or.type, value)),
640
+ pattern: $convertToMaybe($identityConversionFunction)(parameters.pattern, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.pattern.type, value)),
641
+ severity: $convertToMaybe(($convertToInIri))(parameters.severity, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.severity.type, value)),
642
+ shaclmateName: $convertToMaybe($identityConversionFunction)(parameters.shaclmateName, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.shaclmateName.type, value)),
643
+ targetClasses: $convertToScalarSet($convertToIri)(parameters.targetClasses, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(BaseShape.schema.properties.targetClasses.type, value)),
644
+ targetNodes: $convertToScalarSet($identityConversionFunction)(parameters.targetNodes, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(BaseShape.schema.properties.targetNodes.type, value)),
645
+ targetObjectsOf: $convertToScalarSet($convertToIri)(parameters.targetObjectsOf, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(BaseShape.schema.properties.targetObjectsOf.type, value)),
646
+ targetSubjectsOf: $convertToScalarSet($convertToIri)(parameters.targetSubjectsOf, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(BaseShape.schema.properties.targetSubjectsOf.type, value)),
647
+ xone: $convertToMaybe($convertToList($convertToIdentifier))(parameters.xone, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(BaseShape.schema.properties.xone.type, value)),
648
+ }).map((object) => $monkeyPatchObject(object, { $toString: BaseShape.$toString }));
649
+ BaseShape.createUnsafe = (parameters) => BaseShape.create(parameters).unsafeCoerce();
650
+ BaseShape.fromRdfResource = $wrap_FromRdfResourceFunction(BaseShape._fromRdfResource);
651
+ BaseShape.fromRdfResourceValues = (values, options) => values.chainMap((value) => value
745
652
  .toResource()
746
- .chain((resource) => NodeShape.fromRdfResource(resource, options)));
653
+ .chain((resource) => BaseShape.fromRdfResource(resource, options)));
747
654
  let Identifier;
748
655
  (function (Identifier) {
749
656
  Identifier.parse = $parseIdentifier;
750
- })(Identifier = NodeShape.Identifier || (NodeShape.Identifier = {}));
751
- NodeShape.isNodeShape = (object) => object.$type === "NodeShape";
752
- NodeShape.schema = {
657
+ })(Identifier = BaseShape.Identifier || (BaseShape.Identifier = {}));
658
+ BaseShape.isBaseShape = (object) => object.$type === "BaseShape";
659
+ BaseShape.schema = {
753
660
  properties: {
754
661
  $identifier: {
755
662
  kind: "Identifier",
756
663
  type: { kind: "Identifier" },
757
664
  },
758
- $rdfType: {
759
- fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape"),
760
- kind: "RdfType",
761
- toRdfTypes: [
762
- dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape"),
763
- ],
764
- },
765
665
  and: {
766
666
  kind: "Shacl",
767
667
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#and"),
@@ -778,14 +678,6 @@ export var NodeShape;
778
678
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#class"),
779
679
  type: { kind: "Set", itemType: { kind: "Iri" } },
780
680
  },
781
- closed: {
782
- kind: "Shacl",
783
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#closed"),
784
- type: {
785
- kind: "Option",
786
- itemType: { kind: "Boolean", datatype: $xsd_boolean },
787
- },
788
- },
789
681
  comment: {
790
682
  kind: "Shacl",
791
683
  path: $rdfs_comment,
@@ -807,22 +699,6 @@ export var NodeShape;
807
699
  itemType: { kind: "Boolean", datatype: $xsd_boolean },
808
700
  },
809
701
  },
810
- discriminantValue: {
811
- kind: "Shacl",
812
- path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#discriminantValue"),
813
- type: {
814
- kind: "Option",
815
- itemType: { kind: "String", datatype: $xsd_string },
816
- },
817
- },
818
- extern: {
819
- kind: "Shacl",
820
- path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#extern"),
821
- type: {
822
- kind: "Option",
823
- itemType: { kind: "Boolean", datatype: $xsd_boolean },
824
- },
825
- },
826
702
  flags: {
827
703
  kind: "Shacl",
828
704
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#flags"),
@@ -831,11 +707,6 @@ export var NodeShape;
831
707
  itemType: { kind: "String", datatype: $xsd_string },
832
708
  },
833
709
  },
834
- fromRdfType: {
835
- kind: "Shacl",
836
- path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#fromRdfType"),
837
- type: { kind: "Option", itemType: { kind: "Iri" } },
838
- },
839
710
  hasValues: {
840
711
  kind: "Shacl",
841
712
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#hasValue"),
@@ -853,17 +724,6 @@ export var NodeShape;
853
724
  defaultValue: dataFactory.literal("false", $xsd_boolean),
854
725
  },
855
726
  },
856
- ignoredProperties: {
857
- kind: "Shacl",
858
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#ignoredProperties"),
859
- type: {
860
- kind: "Option",
861
- itemType: {
862
- kind: "List",
863
- itemType: { kind: "Iri" },
864
- },
865
- },
866
- },
867
727
  in_: {
868
728
  kind: "Shacl",
869
729
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#in"),
@@ -1022,19 +882,6 @@ export var NodeShape;
1022
882
  itemType: { kind: "String", datatype: $xsd_string },
1023
883
  },
1024
884
  },
1025
- properties: {
1026
- kind: "Shacl",
1027
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#property"),
1028
- type: {
1029
- kind: "Set",
1030
- itemType: { kind: "Identifier" },
1031
- },
1032
- },
1033
- rdfType: {
1034
- kind: "Shacl",
1035
- path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#rdfType"),
1036
- type: { kind: "Option", itemType: { kind: "Iri" } },
1037
- },
1038
885
  severity: {
1039
886
  kind: "Shacl",
1040
887
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#severity"),
@@ -1055,11 +902,6 @@ export var NodeShape;
1055
902
  itemType: { kind: "String", datatype: $xsd_string },
1056
903
  },
1057
904
  },
1058
- subClassOf: {
1059
- kind: "Shacl",
1060
- path: $rdfs_subClassOf,
1061
- type: { kind: "Set", itemType: { kind: "Iri" } },
1062
- },
1063
905
  targetClasses: {
1064
906
  kind: "Shacl",
1065
907
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetClass"),
@@ -1083,24 +925,6 @@ export var NodeShape;
1083
925
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetSubjectsOf"),
1084
926
  type: { kind: "Set", itemType: { kind: "Iri" } },
1085
927
  },
1086
- toRdfTypes: {
1087
- kind: "Shacl",
1088
- path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#toRdfType"),
1089
- type: { kind: "Set", itemType: { kind: "Iri" } },
1090
- },
1091
- tsImports: {
1092
- kind: "Shacl",
1093
- path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsImport"),
1094
- type: {
1095
- kind: "Set",
1096
- itemType: { kind: "String", datatype: $xsd_string },
1097
- },
1098
- },
1099
- types: {
1100
- kind: "Shacl",
1101
- path: $rdf_type,
1102
- type: { kind: "Set", itemType: { kind: "Iri" } },
1103
- },
1104
928
  xone: {
1105
929
  kind: "Shacl",
1106
930
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#xone"),
@@ -1114,82 +938,273 @@ export var NodeShape;
1114
938
  },
1115
939
  },
1116
940
  };
1117
- NodeShape.toStringRecord = (_nodeShape) => $compactRecord({
1118
- $identifier: _nodeShape.$identifier().toString(),
1119
- label: _nodeShape.label.map((item) => item.toString()).extract(),
1120
- shaclmateName: _nodeShape.shaclmateName
941
+ BaseShape.toStringRecord = (_baseShape) => $compactRecord({
942
+ $identifier: _baseShape.$identifier().toString(),
943
+ label: _baseShape.label.map((item) => item.toString()).extract(),
944
+ shaclmateName: _baseShape.shaclmateName
1121
945
  .map((item) => item.toString())
1122
946
  .extract(),
1123
947
  });
1124
- })(NodeShape || (NodeShape = {}));
1125
- export var Ontology;
1126
- (function (Ontology) {
1127
- Ontology._fromRdfResource = (resource, options) => $sequenceRecord({
948
+ })(BaseShape || (BaseShape = {}));
949
+ export var NodeShapeSpecificProperties;
950
+ (function (NodeShapeSpecificProperties) {
951
+ NodeShapeSpecificProperties._fromRdfResource = (resource, options) => $sequenceRecord({
1128
952
  $identifier: $identifierFromRdfResourceValues($rdfResourceIdentifierValues(resource), {
1129
953
  ...options,
1130
954
  focusResource: resource,
1131
955
  propertyPath: $rdf_subject,
1132
- schema: Ontology.schema.properties.$identifier.type,
956
+ schema: NodeShapeSpecificProperties.schema.properties.$identifier.type,
1133
957
  }).chain((values) => values.head()),
1134
- $rdfType: !options.ignoreRdfType
1135
- ? $ensureRdfResourceType(resource, [Ontology.schema.properties.$rdfType.fromRdfType], {
1136
- graph: options.graph,
1137
- })
1138
- : Right(true),
1139
- comment: $shaclPropertyFromRdf({
958
+ closed: $shaclPropertyFromRdf({
1140
959
  ...options,
1141
960
  focusResource: resource,
1142
961
  ignoreRdfType: true,
1143
- propertySchema: NodeShape.schema.properties.comment,
1144
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
962
+ propertySchema: NodeShapeSpecificProperties.schema.properties.closed,
963
+ typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
1145
964
  }),
1146
- label: $shaclPropertyFromRdf({
965
+ discriminantValue: $shaclPropertyFromRdf({
1147
966
  ...options,
1148
967
  focusResource: resource,
1149
968
  ignoreRdfType: true,
1150
- propertySchema: NodeShape.schema.properties.label,
969
+ propertySchema: NodeShapeSpecificProperties.schema.properties.discriminantValue,
1151
970
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
1152
971
  }),
1153
- }).chain((properties) => Ontology.create(properties));
1154
- Ontology.$toString = (_ontology) => `Ontology(${JSON.stringify(Ontology.toStringRecord(_ontology))})`;
1155
- Ontology.create = (parameters = {}) => $sequenceRecord({
972
+ extern: $shaclPropertyFromRdf({
973
+ ...options,
974
+ focusResource: resource,
975
+ ignoreRdfType: true,
976
+ propertySchema: NodeShapeSpecificProperties.schema.properties.extern,
977
+ typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
978
+ }),
979
+ fromRdfType: $shaclPropertyFromRdf({
980
+ ...options,
981
+ focusResource: resource,
982
+ ignoreRdfType: true,
983
+ propertySchema: NodeShapeSpecificProperties.schema.properties.fromRdfType,
984
+ typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
985
+ }),
986
+ ignoredProperties: $shaclPropertyFromRdf({
987
+ ...options,
988
+ focusResource: resource,
989
+ ignoreRdfType: true,
990
+ propertySchema: NodeShapeSpecificProperties.schema.properties.ignoredProperties,
991
+ typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues(($iriFromRdfResourceValues))),
992
+ }),
993
+ properties: $shaclPropertyFromRdf({
994
+ ...options,
995
+ focusResource: resource,
996
+ ignoreRdfType: true,
997
+ propertySchema: NodeShapeSpecificProperties.schema.properties.properties,
998
+ typeFromRdfResourceValues: $setFromRdfResourceValues($identifierFromRdfResourceValues),
999
+ }),
1000
+ rdfType: $shaclPropertyFromRdf({
1001
+ ...options,
1002
+ focusResource: resource,
1003
+ ignoreRdfType: true,
1004
+ propertySchema: NodeShapeSpecificProperties.schema.properties.rdfType,
1005
+ typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
1006
+ }),
1007
+ subClassOf: $shaclPropertyFromRdf({
1008
+ ...options,
1009
+ focusResource: resource,
1010
+ ignoreRdfType: true,
1011
+ propertySchema: NodeShapeSpecificProperties.schema.properties.subClassOf,
1012
+ typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
1013
+ }),
1014
+ toRdfTypes: $shaclPropertyFromRdf({
1015
+ ...options,
1016
+ focusResource: resource,
1017
+ ignoreRdfType: true,
1018
+ propertySchema: NodeShapeSpecificProperties.schema.properties.toRdfTypes,
1019
+ typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
1020
+ }),
1021
+ tsImports: $shaclPropertyFromRdf({
1022
+ ...options,
1023
+ focusResource: resource,
1024
+ ignoreRdfType: true,
1025
+ propertySchema: NodeShapeSpecificProperties.schema.properties.tsImports,
1026
+ typeFromRdfResourceValues: $setFromRdfResourceValues(($stringFromRdfResourceValues)),
1027
+ }),
1028
+ types: $shaclPropertyFromRdf({
1029
+ ...options,
1030
+ focusResource: resource,
1031
+ ignoreRdfType: true,
1032
+ propertySchema: NodeShapeSpecificProperties.schema.properties.types,
1033
+ typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
1034
+ }),
1035
+ }).chain((properties) => NodeShapeSpecificProperties.create(properties));
1036
+ NodeShapeSpecificProperties.$toString = (_nodeShapeSpecificProperties) => `NodeShapeSpecificProperties(${JSON.stringify(NodeShapeSpecificProperties.toStringRecord(_nodeShapeSpecificProperties))})`;
1037
+ NodeShapeSpecificProperties.create = (parameters = {}) => $sequenceRecord({
1156
1038
  $identifier: $convertToIdentifierProperty(parameters.$identifier, parameters.$defaultNamespace),
1157
- $type: Right("Ontology"),
1158
- comment: $convertToMaybe($identityConversionFunction)(parameters.comment, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.comment.type, value)),
1159
- label: $convertToMaybe($identityConversionFunction)(parameters.label, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.label.type, value)),
1160
- }).map((object) => $monkeyPatchObject(object, { $toString: Ontology.$toString }));
1161
- Ontology.createUnsafe = (parameters) => Ontology.create(parameters).unsafeCoerce();
1162
- Ontology.fromRdfResource = $wrap_FromRdfResourceFunction(Ontology._fromRdfResource);
1163
- Ontology.fromRdfResourceValues = (values, options) => values.chainMap((value) => value
1039
+ $type: Right("NodeShapeSpecificProperties"),
1040
+ closed: $convertToMaybe($identityConversionFunction)(parameters.closed, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShapeSpecificProperties.schema.properties.closed.type, value)),
1041
+ discriminantValue: $convertToMaybe($identityConversionFunction)(parameters.discriminantValue, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShapeSpecificProperties.schema.properties.discriminantValue.type, value)),
1042
+ extern: $convertToMaybe($identityConversionFunction)(parameters.extern, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShapeSpecificProperties.schema.properties.extern.type, value)),
1043
+ fromRdfType: $convertToMaybe($convertToIri)(parameters.fromRdfType, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShapeSpecificProperties.schema.properties.fromRdfType.type, value)),
1044
+ ignoredProperties: $convertToMaybe($convertToList($convertToIri))(parameters.ignoredProperties, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShapeSpecificProperties.schema.properties.ignoredProperties.type, value)),
1045
+ properties: $convertToScalarSet($convertToIdentifier)(parameters.properties, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShapeSpecificProperties.schema.properties.properties.type, value)),
1046
+ rdfType: $convertToMaybe($convertToIri)(parameters.rdfType, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShapeSpecificProperties.schema.properties.rdfType.type, value)),
1047
+ subClassOf: $convertToScalarSet($convertToIri)(parameters.subClassOf, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShapeSpecificProperties.schema.properties.subClassOf.type, value)),
1048
+ toRdfTypes: $convertToScalarSet($convertToIri)(parameters.toRdfTypes, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShapeSpecificProperties.schema.properties.toRdfTypes.type, value)),
1049
+ tsImports: $convertToScalarSet($identityConversionFunction)(parameters.tsImports, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShapeSpecificProperties.schema.properties.tsImports.type, value)),
1050
+ types: $convertToScalarSet($convertToIri)(parameters.types, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShapeSpecificProperties.schema.properties.types.type, value)),
1051
+ }).map((object) => $monkeyPatchObject(object, {
1052
+ $toString: NodeShapeSpecificProperties.$toString,
1053
+ }));
1054
+ NodeShapeSpecificProperties.createUnsafe = (parameters) => NodeShapeSpecificProperties.create(parameters).unsafeCoerce();
1055
+ NodeShapeSpecificProperties.fromRdfResource = $wrap_FromRdfResourceFunction(NodeShapeSpecificProperties._fromRdfResource);
1056
+ NodeShapeSpecificProperties.fromRdfResourceValues = (values, options) => values.chainMap((value) => value
1164
1057
  .toResource()
1165
- .chain((resource) => Ontology.fromRdfResource(resource, options)));
1058
+ .chain((resource) => NodeShapeSpecificProperties.fromRdfResource(resource, options)));
1166
1059
  let Identifier;
1167
1060
  (function (Identifier) {
1168
1061
  Identifier.parse = $parseIdentifier;
1169
- })(Identifier = Ontology.Identifier || (Ontology.Identifier = {}));
1170
- Ontology.isOntology = (object) => object.$type === "Ontology";
1171
- Ontology.schema = {
1062
+ })(Identifier = NodeShapeSpecificProperties.Identifier || (NodeShapeSpecificProperties.Identifier = {}));
1063
+ NodeShapeSpecificProperties.isNodeShapeSpecificProperties = (object) => object.$type === "NodeShapeSpecificProperties";
1064
+ NodeShapeSpecificProperties.schema = {
1172
1065
  properties: {
1173
1066
  $identifier: {
1174
1067
  kind: "Identifier",
1175
1068
  type: { kind: "Identifier" },
1176
1069
  },
1177
- $rdfType: {
1178
- fromRdfType: dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology"),
1179
- kind: "RdfType",
1180
- toRdfTypes: [
1181
- dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology"),
1182
- ],
1183
- },
1184
- comment: {
1070
+ closed: {
1185
1071
  kind: "Shacl",
1186
- path: $rdfs_comment,
1072
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#closed"),
1187
1073
  type: {
1188
1074
  kind: "Option",
1189
- itemType: { kind: "String", datatype: $xsd_string },
1075
+ itemType: { kind: "Boolean", datatype: $xsd_boolean },
1190
1076
  },
1191
1077
  },
1192
- label: {
1078
+ discriminantValue: {
1079
+ kind: "Shacl",
1080
+ path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#discriminantValue"),
1081
+ type: {
1082
+ kind: "Option",
1083
+ itemType: { kind: "String", datatype: $xsd_string },
1084
+ },
1085
+ },
1086
+ extern: {
1087
+ kind: "Shacl",
1088
+ path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#extern"),
1089
+ type: {
1090
+ kind: "Option",
1091
+ itemType: { kind: "Boolean", datatype: $xsd_boolean },
1092
+ },
1093
+ },
1094
+ fromRdfType: {
1095
+ kind: "Shacl",
1096
+ path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#fromRdfType"),
1097
+ type: { kind: "Option", itemType: { kind: "Iri" } },
1098
+ },
1099
+ ignoredProperties: {
1100
+ kind: "Shacl",
1101
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#ignoredProperties"),
1102
+ type: {
1103
+ kind: "Option",
1104
+ itemType: {
1105
+ kind: "List",
1106
+ itemType: { kind: "Iri" },
1107
+ },
1108
+ },
1109
+ },
1110
+ properties: {
1111
+ kind: "Shacl",
1112
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#property"),
1113
+ type: {
1114
+ kind: "Set",
1115
+ itemType: { kind: "Identifier" },
1116
+ },
1117
+ },
1118
+ rdfType: {
1119
+ kind: "Shacl",
1120
+ path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#rdfType"),
1121
+ type: { kind: "Option", itemType: { kind: "Iri" } },
1122
+ },
1123
+ subClassOf: {
1124
+ kind: "Shacl",
1125
+ path: $rdfs_subClassOf,
1126
+ type: { kind: "Set", itemType: { kind: "Iri" } },
1127
+ },
1128
+ toRdfTypes: {
1129
+ kind: "Shacl",
1130
+ path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#toRdfType"),
1131
+ type: { kind: "Set", itemType: { kind: "Iri" } },
1132
+ },
1133
+ tsImports: {
1134
+ kind: "Shacl",
1135
+ path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsImport"),
1136
+ type: {
1137
+ kind: "Set",
1138
+ itemType: { kind: "String", datatype: $xsd_string },
1139
+ },
1140
+ },
1141
+ types: {
1142
+ kind: "Shacl",
1143
+ path: $rdf_type,
1144
+ type: { kind: "Set", itemType: { kind: "Iri" } },
1145
+ },
1146
+ },
1147
+ };
1148
+ NodeShapeSpecificProperties.toStringRecord = (_nodeShapeSpecificProperties) => $compactRecord({
1149
+ $identifier: _nodeShapeSpecificProperties.$identifier().toString(),
1150
+ });
1151
+ })(NodeShapeSpecificProperties || (NodeShapeSpecificProperties = {}));
1152
+ export var Ontology;
1153
+ (function (Ontology) {
1154
+ Ontology._fromRdfResource = (resource, options) => $sequenceRecord({
1155
+ $identifier: $identifierFromRdfResourceValues($rdfResourceIdentifierValues(resource), {
1156
+ ...options,
1157
+ focusResource: resource,
1158
+ propertyPath: $rdf_subject,
1159
+ schema: Ontology.schema.properties.$identifier.type,
1160
+ }).chain((values) => values.head()),
1161
+ comment: $shaclPropertyFromRdf({
1162
+ ...options,
1163
+ focusResource: resource,
1164
+ ignoreRdfType: true,
1165
+ propertySchema: BaseShape.schema.properties.comment,
1166
+ typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
1167
+ }),
1168
+ label: $shaclPropertyFromRdf({
1169
+ ...options,
1170
+ focusResource: resource,
1171
+ ignoreRdfType: true,
1172
+ propertySchema: BaseShape.schema.properties.label,
1173
+ typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
1174
+ }),
1175
+ }).chain((properties) => Ontology.create(properties));
1176
+ Ontology.$toString = (_ontology) => `Ontology(${JSON.stringify(Ontology.toStringRecord(_ontology))})`;
1177
+ Ontology.create = (parameters = {}) => $sequenceRecord({
1178
+ $identifier: $convertToIdentifierProperty(parameters.$identifier, parameters.$defaultNamespace),
1179
+ $type: Right("Ontology"),
1180
+ comment: $convertToMaybe($identityConversionFunction)(parameters.comment, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.comment.type, value)),
1181
+ label: $convertToMaybe($identityConversionFunction)(parameters.label, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.label.type, value)),
1182
+ }).map((object) => $monkeyPatchObject(object, { $toString: Ontology.$toString }));
1183
+ Ontology.createUnsafe = (parameters) => Ontology.create(parameters).unsafeCoerce();
1184
+ Ontology.fromRdfResource = $wrap_FromRdfResourceFunction(Ontology._fromRdfResource);
1185
+ Ontology.fromRdfResourceValues = (values, options) => values.chainMap((value) => value
1186
+ .toResource()
1187
+ .chain((resource) => Ontology.fromRdfResource(resource, options)));
1188
+ let Identifier;
1189
+ (function (Identifier) {
1190
+ Identifier.parse = $parseIdentifier;
1191
+ })(Identifier = Ontology.Identifier || (Ontology.Identifier = {}));
1192
+ Ontology.isOntology = (object) => object.$type === "Ontology";
1193
+ Ontology.schema = {
1194
+ properties: {
1195
+ $identifier: {
1196
+ kind: "Identifier",
1197
+ type: { kind: "Identifier" },
1198
+ },
1199
+ comment: {
1200
+ kind: "Shacl",
1201
+ path: $rdfs_comment,
1202
+ type: {
1203
+ kind: "Option",
1204
+ itemType: { kind: "String", datatype: $xsd_string },
1205
+ },
1206
+ },
1207
+ label: {
1193
1208
  kind: "Shacl",
1194
1209
  path: $rdfs_label,
1195
1210
  type: {
@@ -1229,7 +1244,7 @@ export var Operation;
1229
1244
  ...options,
1230
1245
  focusResource: resource,
1231
1246
  ignoreRdfType: true,
1232
- propertySchema: NodeShape.schema.properties.comment,
1247
+ propertySchema: BaseShape.schema.properties.comment,
1233
1248
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
1234
1249
  }),
1235
1250
  error: $shaclPropertyFromRdf({
@@ -1243,7 +1258,7 @@ export var Operation;
1243
1258
  ...options,
1244
1259
  focusResource: resource,
1245
1260
  ignoreRdfType: true,
1246
- propertySchema: NodeShape.schema.properties.label,
1261
+ propertySchema: BaseShape.schema.properties.label,
1247
1262
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
1248
1263
  }),
1249
1264
  name: $shaclPropertyFromRdf({
@@ -1273,9 +1288,9 @@ export var Operation;
1273
1288
  $identifier: $convertToIdentifierProperty(parameters.$identifier, parameters.$defaultNamespace),
1274
1289
  $type: Right("Operation"),
1275
1290
  bindings: $convertToScalarSet($identityConversionFunction)(parameters.bindings, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(Operation.schema.properties.bindings.type, value)),
1276
- comment: $convertToMaybe($identityConversionFunction)(parameters.comment, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.comment.type, value)),
1291
+ comment: $convertToMaybe($identityConversionFunction)(parameters.comment, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.comment.type, value)),
1277
1292
  error: $convertToScalarSet($identityConversionFunction)(parameters.error, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(Operation.schema.properties.error.type, value)),
1278
- label: $convertToMaybe($identityConversionFunction)(parameters.label, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.label.type, value)),
1293
+ label: $convertToMaybe($identityConversionFunction)(parameters.label, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.label.type, value)),
1279
1294
  name: $convertToMaybe($identityConversionFunction)(parameters.name, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(Operation.schema.properties.name.type, value)),
1280
1295
  parameter: $convertToMaybe($convertToIdentifier)(parameters.parameter, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(Operation.schema.properties.parameter.type, value)),
1281
1296
  result: $convertToMaybe($convertToIdentifier)(parameters.result, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(Operation.schema.properties.result.type, value)),
@@ -1396,77 +1411,77 @@ export var OperationError;
1396
1411
  ...options,
1397
1412
  focusResource: resource,
1398
1413
  ignoreRdfType: true,
1399
- propertySchema: NodeShape.schema.properties.classes,
1414
+ propertySchema: BaseShape.schema.properties.classes,
1400
1415
  typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
1401
1416
  }),
1402
1417
  closed: $shaclPropertyFromRdf({
1403
1418
  ...options,
1404
1419
  focusResource: resource,
1405
1420
  ignoreRdfType: true,
1406
- propertySchema: NodeShape.schema.properties.closed,
1421
+ propertySchema: NodeShapeSpecificProperties.schema.properties.closed,
1407
1422
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
1408
1423
  }),
1409
1424
  comment: $shaclPropertyFromRdf({
1410
1425
  ...options,
1411
1426
  focusResource: resource,
1412
1427
  ignoreRdfType: true,
1413
- propertySchema: NodeShape.schema.properties.comment,
1428
+ propertySchema: BaseShape.schema.properties.comment,
1414
1429
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
1415
1430
  }),
1416
1431
  deactivated: $shaclPropertyFromRdf({
1417
1432
  ...options,
1418
1433
  focusResource: resource,
1419
1434
  ignoreRdfType: true,
1420
- propertySchema: NodeShape.schema.properties.deactivated,
1435
+ propertySchema: BaseShape.schema.properties.deactivated,
1421
1436
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
1422
1437
  }),
1423
1438
  extern: $shaclPropertyFromRdf({
1424
1439
  ...options,
1425
1440
  focusResource: resource,
1426
1441
  ignoreRdfType: true,
1427
- propertySchema: NodeShape.schema.properties.extern,
1442
+ propertySchema: NodeShapeSpecificProperties.schema.properties.extern,
1428
1443
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
1429
1444
  }),
1430
1445
  fromRdfType: $shaclPropertyFromRdf({
1431
1446
  ...options,
1432
1447
  focusResource: resource,
1433
1448
  ignoreRdfType: true,
1434
- propertySchema: NodeShape.schema.properties.fromRdfType,
1449
+ propertySchema: NodeShapeSpecificProperties.schema.properties.fromRdfType,
1435
1450
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
1436
1451
  }),
1437
1452
  ignoredProperties: $shaclPropertyFromRdf({
1438
1453
  ...options,
1439
1454
  focusResource: resource,
1440
1455
  ignoreRdfType: true,
1441
- propertySchema: NodeShape.schema.properties.ignoredProperties,
1456
+ propertySchema: NodeShapeSpecificProperties.schema.properties.ignoredProperties,
1442
1457
  typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues(($iriFromRdfResourceValues))),
1443
1458
  }),
1444
1459
  isDefinedBy: $shaclPropertyFromRdf({
1445
1460
  ...options,
1446
1461
  focusResource: resource,
1447
1462
  ignoreRdfType: true,
1448
- propertySchema: NodeShape.schema.properties.isDefinedBy,
1463
+ propertySchema: BaseShape.schema.properties.isDefinedBy,
1449
1464
  typeFromRdfResourceValues: $maybeFromRdfResourceValues($identifierFromRdfResourceValues),
1450
1465
  }),
1451
1466
  label: $shaclPropertyFromRdf({
1452
1467
  ...options,
1453
1468
  focusResource: resource,
1454
1469
  ignoreRdfType: true,
1455
- propertySchema: NodeShape.schema.properties.label,
1470
+ propertySchema: BaseShape.schema.properties.label,
1456
1471
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
1457
1472
  }),
1458
1473
  message: $shaclPropertyFromRdf({
1459
1474
  ...options,
1460
1475
  focusResource: resource,
1461
1476
  ignoreRdfType: true,
1462
- propertySchema: NodeShape.schema.properties.message,
1477
+ propertySchema: BaseShape.schema.properties.message,
1463
1478
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
1464
1479
  }),
1465
1480
  nodeKind: $shaclPropertyFromRdf({
1466
1481
  ...options,
1467
1482
  focusResource: resource,
1468
1483
  ignoreRdfType: true,
1469
- propertySchema: NodeShape.schema.properties.nodeKind,
1484
+ propertySchema: BaseShape.schema.properties.nodeKind,
1470
1485
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
1471
1486
  }),
1472
1487
  properties: $shaclPropertyFromRdf({
@@ -1480,49 +1495,49 @@ export var OperationError;
1480
1495
  ...options,
1481
1496
  focusResource: resource,
1482
1497
  ignoreRdfType: true,
1483
- propertySchema: NodeShape.schema.properties.rdfType,
1498
+ propertySchema: NodeShapeSpecificProperties.schema.properties.rdfType,
1484
1499
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
1485
1500
  }),
1486
1501
  severity: $shaclPropertyFromRdf({
1487
1502
  ...options,
1488
1503
  focusResource: resource,
1489
1504
  ignoreRdfType: true,
1490
- propertySchema: NodeShape.schema.properties.severity,
1505
+ propertySchema: BaseShape.schema.properties.severity,
1491
1506
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
1492
1507
  }),
1493
1508
  shaclmateName: $shaclPropertyFromRdf({
1494
1509
  ...options,
1495
1510
  focusResource: resource,
1496
1511
  ignoreRdfType: true,
1497
- propertySchema: NodeShape.schema.properties.shaclmateName,
1512
+ propertySchema: BaseShape.schema.properties.shaclmateName,
1498
1513
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
1499
1514
  }),
1500
1515
  subClassOf: $shaclPropertyFromRdf({
1501
1516
  ...options,
1502
1517
  focusResource: resource,
1503
1518
  ignoreRdfType: true,
1504
- propertySchema: NodeShape.schema.properties.subClassOf,
1519
+ propertySchema: NodeShapeSpecificProperties.schema.properties.subClassOf,
1505
1520
  typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
1506
1521
  }),
1507
1522
  toRdfTypes: $shaclPropertyFromRdf({
1508
1523
  ...options,
1509
1524
  focusResource: resource,
1510
1525
  ignoreRdfType: true,
1511
- propertySchema: NodeShape.schema.properties.toRdfTypes,
1526
+ propertySchema: NodeShapeSpecificProperties.schema.properties.toRdfTypes,
1512
1527
  typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
1513
1528
  }),
1514
1529
  tsImports: $shaclPropertyFromRdf({
1515
1530
  ...options,
1516
1531
  focusResource: resource,
1517
1532
  ignoreRdfType: true,
1518
- propertySchema: NodeShape.schema.properties.tsImports,
1533
+ propertySchema: NodeShapeSpecificProperties.schema.properties.tsImports,
1519
1534
  typeFromRdfResourceValues: $setFromRdfResourceValues(($stringFromRdfResourceValues)),
1520
1535
  }),
1521
1536
  types: $shaclPropertyFromRdf({
1522
1537
  ...options,
1523
1538
  focusResource: resource,
1524
1539
  ignoreRdfType: true,
1525
- propertySchema: NodeShape.schema.properties.types,
1540
+ propertySchema: NodeShapeSpecificProperties.schema.properties.types,
1526
1541
  typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
1527
1542
  }),
1528
1543
  }).chain((properties) => OperationError.create(properties));
@@ -1530,25 +1545,25 @@ export var OperationError;
1530
1545
  OperationError.create = (parameters = {}) => $sequenceRecord({
1531
1546
  $identifier: $convertToIdentifierProperty(parameters.$identifier, parameters.$defaultNamespace),
1532
1547
  $type: Right("OperationError"),
1533
- classes: $convertToScalarSet($convertToIri)(parameters.classes, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.classes.type, value)),
1534
- closed: $convertToMaybe($identityConversionFunction)(parameters.closed, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.closed.type, value)),
1535
- comment: $convertToMaybe($identityConversionFunction)(parameters.comment, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.comment.type, value)),
1536
- deactivated: $convertToMaybe($identityConversionFunction)(parameters.deactivated, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.deactivated.type, value)),
1537
- extern: $convertToMaybe($identityConversionFunction)(parameters.extern, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.extern.type, value)),
1538
- fromRdfType: $convertToMaybe($convertToIri)(parameters.fromRdfType, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.fromRdfType.type, value)),
1539
- ignoredProperties: $convertToMaybe($convertToList($convertToIri))(parameters.ignoredProperties, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.ignoredProperties.type, value)),
1540
- isDefinedBy: $convertToMaybe($convertToIdentifier)(parameters.isDefinedBy, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.isDefinedBy.type, value)),
1541
- label: $convertToMaybe($identityConversionFunction)(parameters.label, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.label.type, value)),
1542
- message: $convertToMaybe($identityConversionFunction)(parameters.message, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.message.type, value)),
1543
- nodeKind: $convertToMaybe(($convertToInIri))(parameters.nodeKind, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.nodeKind.type, value)),
1548
+ classes: $convertToScalarSet($convertToIri)(parameters.classes, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(BaseShape.schema.properties.classes.type, value)),
1549
+ closed: $convertToMaybe($identityConversionFunction)(parameters.closed, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShapeSpecificProperties.schema.properties.closed.type, value)),
1550
+ comment: $convertToMaybe($identityConversionFunction)(parameters.comment, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.comment.type, value)),
1551
+ deactivated: $convertToMaybe($identityConversionFunction)(parameters.deactivated, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.deactivated.type, value)),
1552
+ extern: $convertToMaybe($identityConversionFunction)(parameters.extern, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShapeSpecificProperties.schema.properties.extern.type, value)),
1553
+ fromRdfType: $convertToMaybe($convertToIri)(parameters.fromRdfType, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShapeSpecificProperties.schema.properties.fromRdfType.type, value)),
1554
+ ignoredProperties: $convertToMaybe($convertToList($convertToIri))(parameters.ignoredProperties, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShapeSpecificProperties.schema.properties.ignoredProperties.type, value)),
1555
+ isDefinedBy: $convertToMaybe($convertToIdentifier)(parameters.isDefinedBy, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.isDefinedBy.type, value)),
1556
+ label: $convertToMaybe($identityConversionFunction)(parameters.label, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.label.type, value)),
1557
+ message: $convertToMaybe($identityConversionFunction)(parameters.message, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.message.type, value)),
1558
+ nodeKind: $convertToMaybe(($convertToInIri))(parameters.nodeKind, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.nodeKind.type, value)),
1544
1559
  properties: $convertToScalarSet($convertToIdentifier)(parameters.properties, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(OperationError.schema.properties.properties.type, value)),
1545
- rdfType: $convertToMaybe($convertToIri)(parameters.rdfType, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.rdfType.type, value)),
1546
- severity: $convertToMaybe(($convertToInIri))(parameters.severity, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.severity.type, value)),
1547
- shaclmateName: $convertToMaybe($identityConversionFunction)(parameters.shaclmateName, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.shaclmateName.type, value)),
1548
- subClassOf: $convertToScalarSet($convertToIri)(parameters.subClassOf, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.subClassOf.type, value)),
1549
- toRdfTypes: $convertToScalarSet($convertToIri)(parameters.toRdfTypes, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.toRdfTypes.type, value)),
1550
- tsImports: $convertToScalarSet($identityConversionFunction)(parameters.tsImports, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.tsImports.type, value)),
1551
- types: $convertToScalarSet($convertToIri)(parameters.types, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.types.type, value)),
1560
+ rdfType: $convertToMaybe($convertToIri)(parameters.rdfType, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShapeSpecificProperties.schema.properties.rdfType.type, value)),
1561
+ severity: $convertToMaybe(($convertToInIri))(parameters.severity, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.severity.type, value)),
1562
+ shaclmateName: $convertToMaybe($identityConversionFunction)(parameters.shaclmateName, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.shaclmateName.type, value)),
1563
+ subClassOf: $convertToScalarSet($convertToIri)(parameters.subClassOf, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShapeSpecificProperties.schema.properties.subClassOf.type, value)),
1564
+ toRdfTypes: $convertToScalarSet($convertToIri)(parameters.toRdfTypes, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShapeSpecificProperties.schema.properties.toRdfTypes.type, value)),
1565
+ tsImports: $convertToScalarSet($identityConversionFunction)(parameters.tsImports, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShapeSpecificProperties.schema.properties.tsImports.type, value)),
1566
+ types: $convertToScalarSet($convertToIri)(parameters.types, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShapeSpecificProperties.schema.properties.types.type, value)),
1552
1567
  }).map((object) => $monkeyPatchObject(object, { $toString: OperationError.$toString }));
1553
1568
  OperationError.createUnsafe = (parameters) => OperationError.create(parameters).unsafeCoerce();
1554
1569
  OperationError.fromRdfResource = $wrap_FromRdfResourceFunction(OperationError._fromRdfResource);
@@ -1913,23 +1928,18 @@ export var PropertyGroup;
1913
1928
  propertyPath: $rdf_subject,
1914
1929
  schema: PropertyGroup.schema.properties.$identifier.type,
1915
1930
  }).chain((values) => values.head()),
1916
- $rdfType: !options.ignoreRdfType
1917
- ? $ensureRdfResourceType(resource, [PropertyGroup.schema.properties.$rdfType.fromRdfType], {
1918
- graph: options.graph,
1919
- })
1920
- : Right(true),
1921
1931
  comment: $shaclPropertyFromRdf({
1922
1932
  ...options,
1923
1933
  focusResource: resource,
1924
1934
  ignoreRdfType: true,
1925
- propertySchema: NodeShape.schema.properties.comment,
1935
+ propertySchema: BaseShape.schema.properties.comment,
1926
1936
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
1927
1937
  }),
1928
1938
  label: $shaclPropertyFromRdf({
1929
1939
  ...options,
1930
1940
  focusResource: resource,
1931
1941
  ignoreRdfType: true,
1932
- propertySchema: NodeShape.schema.properties.label,
1942
+ propertySchema: BaseShape.schema.properties.label,
1933
1943
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
1934
1944
  }),
1935
1945
  }).chain((properties) => PropertyGroup.create(properties));
@@ -1937,8 +1947,8 @@ export var PropertyGroup;
1937
1947
  PropertyGroup.create = (parameters = {}) => $sequenceRecord({
1938
1948
  $identifier: $convertToIdentifierProperty(parameters.$identifier, parameters.$defaultNamespace),
1939
1949
  $type: Right("PropertyGroup"),
1940
- comment: $convertToMaybe($identityConversionFunction)(parameters.comment, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.comment.type, value)),
1941
- label: $convertToMaybe($identityConversionFunction)(parameters.label, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.label.type, value)),
1950
+ comment: $convertToMaybe($identityConversionFunction)(parameters.comment, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.comment.type, value)),
1951
+ label: $convertToMaybe($identityConversionFunction)(parameters.label, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.label.type, value)),
1942
1952
  }).map((object) => $monkeyPatchObject(object, { $toString: PropertyGroup.$toString }));
1943
1953
  PropertyGroup.createUnsafe = (parameters) => PropertyGroup.create(parameters).unsafeCoerce();
1944
1954
  PropertyGroup.fromRdfResource = $wrap_FromRdfResourceFunction(PropertyGroup._fromRdfResource);
@@ -1956,13 +1966,6 @@ export var PropertyGroup;
1956
1966
  kind: "Identifier",
1957
1967
  type: { kind: "Identifier" },
1958
1968
  },
1959
- $rdfType: {
1960
- fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup"),
1961
- kind: "RdfType",
1962
- toRdfTypes: [
1963
- dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup"),
1964
- ],
1965
- },
1966
1969
  comment: {
1967
1970
  kind: "Shacl",
1968
1971
  path: $rdfs_comment,
@@ -1986,494 +1989,197 @@ export var PropertyGroup;
1986
1989
  label: _propertyGroup.label.map((item) => item.toString()).extract(),
1987
1990
  });
1988
1991
  })(PropertyGroup || (PropertyGroup = {}));
1989
- export var PropertyShape;
1990
- (function (PropertyShape) {
1991
- PropertyShape._fromRdfResource = (resource, options) => $sequenceRecord({
1992
+ export var PropertyShapeSpecificProperties;
1993
+ (function (PropertyShapeSpecificProperties) {
1994
+ PropertyShapeSpecificProperties._fromRdfResource = (resource, options) => $sequenceRecord({
1992
1995
  $identifier: $identifierFromRdfResourceValues($rdfResourceIdentifierValues(resource), {
1993
1996
  ...options,
1994
1997
  focusResource: resource,
1995
1998
  propertyPath: $rdf_subject,
1996
- schema: PropertyShape.schema.properties.$identifier.type,
1999
+ schema: PropertyShapeSpecificProperties.schema.properties.$identifier.type,
1997
2000
  }).chain((values) => values.head()),
1998
- $rdfType: !options.ignoreRdfType
1999
- ? $ensureRdfResourceType(resource, [PropertyShape.schema.properties.$rdfType.fromRdfType], {
2000
- graph: options.graph,
2001
- })
2002
- : Right(true),
2003
- and: $shaclPropertyFromRdf({
2004
- ...options,
2005
- focusResource: resource,
2006
- ignoreRdfType: true,
2007
- propertySchema: NodeShape.schema.properties.and,
2008
- typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues($identifierFromRdfResourceValues)),
2009
- }),
2010
- classes: $shaclPropertyFromRdf({
2011
- ...options,
2012
- focusResource: resource,
2013
- ignoreRdfType: true,
2014
- propertySchema: NodeShape.schema.properties.classes,
2015
- typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
2016
- }),
2017
- comment: $shaclPropertyFromRdf({
2018
- ...options,
2019
- focusResource: resource,
2020
- ignoreRdfType: true,
2021
- propertySchema: NodeShape.schema.properties.comment,
2022
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
2023
- }),
2024
- datatype: $shaclPropertyFromRdf({
2025
- ...options,
2026
- focusResource: resource,
2027
- ignoreRdfType: true,
2028
- propertySchema: NodeShape.schema.properties.datatype,
2029
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
2030
- }),
2031
- deactivated: $shaclPropertyFromRdf({
2032
- ...options,
2033
- focusResource: resource,
2034
- ignoreRdfType: true,
2035
- propertySchema: NodeShape.schema.properties.deactivated,
2036
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
2037
- }),
2038
2001
  defaultValue: $shaclPropertyFromRdf({
2039
2002
  ...options,
2040
2003
  focusResource: resource,
2041
2004
  ignoreRdfType: true,
2042
- propertySchema: PropertyShape.schema.properties.defaultValue,
2005
+ propertySchema: PropertyShapeSpecificProperties.schema.properties.defaultValue,
2043
2006
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($termFromRdfResourceValues)),
2044
2007
  }),
2045
2008
  description: $shaclPropertyFromRdf({
2046
2009
  ...options,
2047
2010
  focusResource: resource,
2048
2011
  ignoreRdfType: true,
2049
- propertySchema: PropertyShape.schema.properties.description,
2012
+ propertySchema: PropertyShapeSpecificProperties.schema.properties.description,
2050
2013
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
2051
2014
  }),
2052
2015
  disjoint: $shaclPropertyFromRdf({
2053
2016
  ...options,
2054
2017
  focusResource: resource,
2055
2018
  ignoreRdfType: true,
2056
- propertySchema: PropertyShape.schema.properties.disjoint,
2019
+ propertySchema: PropertyShapeSpecificProperties.schema.properties.disjoint,
2057
2020
  typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
2058
2021
  }),
2059
2022
  display: $shaclPropertyFromRdf({
2060
2023
  ...options,
2061
2024
  focusResource: resource,
2062
2025
  ignoreRdfType: true,
2063
- propertySchema: PropertyShape.schema.properties.display,
2026
+ propertySchema: PropertyShapeSpecificProperties.schema.properties.display,
2064
2027
  typeFromRdfResourceValues: $defaultValueFromRdfResourceValues(($booleanFromRdfResourceValues)),
2065
2028
  }),
2066
2029
  equals: $shaclPropertyFromRdf({
2067
2030
  ...options,
2068
2031
  focusResource: resource,
2069
2032
  ignoreRdfType: true,
2070
- propertySchema: PropertyShape.schema.properties.equals,
2033
+ propertySchema: PropertyShapeSpecificProperties.schema.properties.equals,
2071
2034
  typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
2072
2035
  }),
2073
- flags: $shaclPropertyFromRdf({
2074
- ...options,
2075
- focusResource: resource,
2076
- ignoreRdfType: true,
2077
- propertySchema: NodeShape.schema.properties.flags,
2078
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
2079
- }),
2080
2036
  groups: $shaclPropertyFromRdf({
2081
2037
  ...options,
2082
2038
  focusResource: resource,
2083
2039
  ignoreRdfType: true,
2084
- propertySchema: PropertyShape.schema.properties.groups,
2040
+ propertySchema: PropertyShapeSpecificProperties.schema.properties.groups,
2085
2041
  typeFromRdfResourceValues: $setFromRdfResourceValues($identifierFromRdfResourceValues),
2086
2042
  }),
2087
- hasValues: $shaclPropertyFromRdf({
2088
- ...options,
2089
- focusResource: resource,
2090
- ignoreRdfType: true,
2091
- propertySchema: NodeShape.schema.properties.hasValues,
2092
- typeFromRdfResourceValues: $setFromRdfResourceValues(($termFromRdfResourceValues)),
2093
- }),
2094
- ignore: $shaclPropertyFromRdf({
2095
- ...options,
2096
- focusResource: resource,
2097
- ignoreRdfType: true,
2098
- propertySchema: NodeShape.schema.properties.ignore,
2099
- typeFromRdfResourceValues: $defaultValueFromRdfResourceValues(($booleanFromRdfResourceValues)),
2100
- }),
2101
- in_: $shaclPropertyFromRdf({
2102
- ...options,
2103
- focusResource: resource,
2104
- ignoreRdfType: true,
2105
- propertySchema: NodeShape.schema.properties.in_,
2106
- typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues(($termFromRdfResourceValues))),
2107
- }),
2108
- isDefinedBy: $shaclPropertyFromRdf({
2109
- ...options,
2110
- focusResource: resource,
2111
- ignoreRdfType: true,
2112
- propertySchema: NodeShape.schema.properties.isDefinedBy,
2113
- typeFromRdfResourceValues: $maybeFromRdfResourceValues($identifierFromRdfResourceValues),
2114
- }),
2115
- label: $shaclPropertyFromRdf({
2116
- ...options,
2117
- focusResource: resource,
2118
- ignoreRdfType: true,
2119
- propertySchema: NodeShape.schema.properties.label,
2120
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
2121
- }),
2122
- languageIn: $shaclPropertyFromRdf({
2123
- ...options,
2124
- focusResource: resource,
2125
- ignoreRdfType: true,
2126
- propertySchema: NodeShape.schema.properties.languageIn,
2127
- typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues(($stringFromRdfResourceValues))),
2128
- }),
2129
2043
  lessThan: $shaclPropertyFromRdf({
2130
2044
  ...options,
2131
2045
  focusResource: resource,
2132
2046
  ignoreRdfType: true,
2133
- propertySchema: PropertyShape.schema.properties.lessThan,
2047
+ propertySchema: PropertyShapeSpecificProperties.schema.properties.lessThan,
2134
2048
  typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
2135
2049
  }),
2136
2050
  lessThanOrEquals: $shaclPropertyFromRdf({
2137
2051
  ...options,
2138
2052
  focusResource: resource,
2139
2053
  ignoreRdfType: true,
2140
- propertySchema: PropertyShape.schema.properties.lessThanOrEquals,
2054
+ propertySchema: PropertyShapeSpecificProperties.schema.properties.lessThanOrEquals,
2141
2055
  typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
2142
2056
  }),
2143
2057
  maxCount: $shaclPropertyFromRdf({
2144
2058
  ...options,
2145
2059
  focusResource: resource,
2146
2060
  ignoreRdfType: true,
2147
- propertySchema: PropertyShape.schema.properties.maxCount,
2061
+ propertySchema: PropertyShapeSpecificProperties.schema.properties.maxCount,
2148
2062
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
2149
2063
  }),
2150
- maxExclusive: $shaclPropertyFromRdf({
2151
- ...options,
2152
- focusResource: resource,
2153
- ignoreRdfType: true,
2154
- propertySchema: NodeShape.schema.properties.maxExclusive,
2155
- typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
2156
- }),
2157
- maxInclusive: $shaclPropertyFromRdf({
2158
- ...options,
2159
- focusResource: resource,
2160
- ignoreRdfType: true,
2161
- propertySchema: NodeShape.schema.properties.maxInclusive,
2162
- typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
2163
- }),
2164
- maxLength: $shaclPropertyFromRdf({
2064
+ minCount: $shaclPropertyFromRdf({
2165
2065
  ...options,
2166
2066
  focusResource: resource,
2167
2067
  ignoreRdfType: true,
2168
- propertySchema: NodeShape.schema.properties.maxLength,
2068
+ propertySchema: PropertyShapeSpecificProperties.schema.properties.minCount,
2169
2069
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
2170
2070
  }),
2171
- message: $shaclPropertyFromRdf({
2071
+ name: $shaclPropertyFromRdf({
2172
2072
  ...options,
2173
2073
  focusResource: resource,
2174
2074
  ignoreRdfType: true,
2175
- propertySchema: NodeShape.schema.properties.message,
2075
+ propertySchema: PropertyShapeSpecificProperties.schema.properties.name,
2176
2076
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
2177
2077
  }),
2178
- minCount: $shaclPropertyFromRdf({
2078
+ order: $shaclPropertyFromRdf({
2179
2079
  ...options,
2180
2080
  focusResource: resource,
2181
2081
  ignoreRdfType: true,
2182
- propertySchema: PropertyShape.schema.properties.minCount,
2183
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
2082
+ propertySchema: PropertyShapeSpecificProperties.schema.properties.order,
2083
+ typeFromRdfResourceValues: $maybeFromRdfResourceValues(($floatFromRdfResourceValues)),
2184
2084
  }),
2185
- minExclusive: $shaclPropertyFromRdf({
2085
+ path: $shaclPropertyFromRdf({
2186
2086
  ...options,
2187
2087
  focusResource: resource,
2188
2088
  ignoreRdfType: true,
2189
- propertySchema: NodeShape.schema.properties.minExclusive,
2190
- typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
2089
+ propertySchema: PropertyShapeSpecificProperties.schema.properties.path,
2090
+ typeFromRdfResourceValues: $PropertyPath.fromRdfResourceValues,
2191
2091
  }),
2192
- minInclusive: $shaclPropertyFromRdf({
2092
+ qualifiedMaxCount: $shaclPropertyFromRdf({
2193
2093
  ...options,
2194
2094
  focusResource: resource,
2195
2095
  ignoreRdfType: true,
2196
- propertySchema: NodeShape.schema.properties.minInclusive,
2197
- typeFromRdfResourceValues: $maybeFromRdfResourceValues($literalFromRdfResourceValues),
2096
+ propertySchema: PropertyShapeSpecificProperties.schema.properties.qualifiedMaxCount,
2097
+ typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
2198
2098
  }),
2199
- minLength: $shaclPropertyFromRdf({
2099
+ qualifiedMinCount: $shaclPropertyFromRdf({
2200
2100
  ...options,
2201
2101
  focusResource: resource,
2202
2102
  ignoreRdfType: true,
2203
- propertySchema: NodeShape.schema.properties.minLength,
2103
+ propertySchema: PropertyShapeSpecificProperties.schema.properties.qualifiedMinCount,
2204
2104
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
2205
2105
  }),
2206
- mutable: $shaclPropertyFromRdf({
2106
+ qualifiedValueShape: $shaclPropertyFromRdf({
2207
2107
  ...options,
2208
2108
  focusResource: resource,
2209
2109
  ignoreRdfType: true,
2210
- propertySchema: NodeShape.schema.properties.mutable,
2211
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
2110
+ propertySchema: PropertyShapeSpecificProperties.schema.properties.qualifiedValueShape,
2111
+ typeFromRdfResourceValues: $maybeFromRdfResourceValues($identifierFromRdfResourceValues),
2212
2112
  }),
2213
- name: $shaclPropertyFromRdf({
2113
+ qualifiedValueShapesDisjoint: $shaclPropertyFromRdf({
2214
2114
  ...options,
2215
2115
  focusResource: resource,
2216
2116
  ignoreRdfType: true,
2217
- propertySchema: PropertyShape.schema.properties.name,
2218
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
2117
+ propertySchema: PropertyShapeSpecificProperties.schema.properties
2118
+ .qualifiedValueShapesDisjoint,
2119
+ typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
2219
2120
  }),
2220
- node: $shaclPropertyFromRdf({
2121
+ resolve: $shaclPropertyFromRdf({
2221
2122
  ...options,
2222
2123
  focusResource: resource,
2223
2124
  ignoreRdfType: true,
2224
- propertySchema: NodeShape.schema.properties.node,
2125
+ propertySchema: PropertyShapeSpecificProperties.schema.properties.resolve,
2225
2126
  typeFromRdfResourceValues: $maybeFromRdfResourceValues($identifierFromRdfResourceValues),
2226
2127
  }),
2227
- nodeKind: $shaclPropertyFromRdf({
2128
+ uniqueLang: $shaclPropertyFromRdf({
2228
2129
  ...options,
2229
2130
  focusResource: resource,
2230
2131
  ignoreRdfType: true,
2231
- propertySchema: NodeShape.schema.properties.nodeKind,
2232
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
2132
+ propertySchema: PropertyShapeSpecificProperties.schema.properties.uniqueLang,
2133
+ typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
2233
2134
  }),
2234
- not: $shaclPropertyFromRdf({
2235
- ...options,
2236
- focusResource: resource,
2237
- ignoreRdfType: true,
2238
- propertySchema: NodeShape.schema.properties.not,
2239
- typeFromRdfResourceValues: $setFromRdfResourceValues($identifierFromRdfResourceValues),
2240
- }),
2241
- or: $shaclPropertyFromRdf({
2242
- ...options,
2243
- focusResource: resource,
2244
- ignoreRdfType: true,
2245
- propertySchema: NodeShape.schema.properties.or,
2246
- typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues($identifierFromRdfResourceValues)),
2247
- }),
2248
- order: $shaclPropertyFromRdf({
2249
- ...options,
2250
- focusResource: resource,
2251
- ignoreRdfType: true,
2252
- propertySchema: PropertyShape.schema.properties.order,
2253
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($floatFromRdfResourceValues)),
2254
- }),
2255
- path: $shaclPropertyFromRdf({
2256
- ...options,
2257
- focusResource: resource,
2258
- ignoreRdfType: true,
2259
- propertySchema: PropertyShape.schema.properties.path,
2260
- typeFromRdfResourceValues: $PropertyPath.fromRdfResourceValues,
2261
- }),
2262
- pattern: $shaclPropertyFromRdf({
2263
- ...options,
2264
- focusResource: resource,
2265
- ignoreRdfType: true,
2266
- propertySchema: NodeShape.schema.properties.pattern,
2267
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
2268
- }),
2269
- qualifiedMaxCount: $shaclPropertyFromRdf({
2270
- ...options,
2271
- focusResource: resource,
2272
- ignoreRdfType: true,
2273
- propertySchema: PropertyShape.schema.properties.qualifiedMaxCount,
2274
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
2275
- }),
2276
- qualifiedMinCount: $shaclPropertyFromRdf({
2277
- ...options,
2278
- focusResource: resource,
2279
- ignoreRdfType: true,
2280
- propertySchema: PropertyShape.schema.properties.qualifiedMinCount,
2281
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($bigIntFromRdfResourceValues)),
2282
- }),
2283
- qualifiedValueShape: $shaclPropertyFromRdf({
2284
- ...options,
2285
- focusResource: resource,
2286
- ignoreRdfType: true,
2287
- propertySchema: PropertyShape.schema.properties.qualifiedValueShape,
2288
- typeFromRdfResourceValues: $maybeFromRdfResourceValues($identifierFromRdfResourceValues),
2289
- }),
2290
- qualifiedValueShapesDisjoint: $shaclPropertyFromRdf({
2291
- ...options,
2292
- focusResource: resource,
2293
- ignoreRdfType: true,
2294
- propertySchema: PropertyShape.schema.properties.qualifiedValueShapesDisjoint,
2295
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
2296
- }),
2297
- resolve: $shaclPropertyFromRdf({
2298
- ...options,
2299
- focusResource: resource,
2300
- ignoreRdfType: true,
2301
- propertySchema: PropertyShape.schema.properties.resolve,
2302
- typeFromRdfResourceValues: $maybeFromRdfResourceValues($identifierFromRdfResourceValues),
2303
- }),
2304
- severity: $shaclPropertyFromRdf({
2305
- ...options,
2306
- focusResource: resource,
2307
- ignoreRdfType: true,
2308
- propertySchema: NodeShape.schema.properties.severity,
2309
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($iriFromRdfResourceValues)),
2310
- }),
2311
- shaclmateName: $shaclPropertyFromRdf({
2312
- ...options,
2313
- focusResource: resource,
2314
- ignoreRdfType: true,
2315
- propertySchema: NodeShape.schema.properties.shaclmateName,
2316
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
2317
- }),
2318
- targetClasses: $shaclPropertyFromRdf({
2319
- ...options,
2320
- focusResource: resource,
2321
- ignoreRdfType: true,
2322
- propertySchema: NodeShape.schema.properties.targetClasses,
2323
- typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
2324
- }),
2325
- targetNodes: $shaclPropertyFromRdf({
2326
- ...options,
2327
- focusResource: resource,
2328
- ignoreRdfType: true,
2329
- propertySchema: NodeShape.schema.properties.targetNodes,
2330
- typeFromRdfResourceValues: $setFromRdfResourceValues(($termFromRdfResourceValues)),
2331
- }),
2332
- targetObjectsOf: $shaclPropertyFromRdf({
2333
- ...options,
2334
- focusResource: resource,
2335
- ignoreRdfType: true,
2336
- propertySchema: NodeShape.schema.properties.targetObjectsOf,
2337
- typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
2338
- }),
2339
- targetSubjectsOf: $shaclPropertyFromRdf({
2340
- ...options,
2341
- focusResource: resource,
2342
- ignoreRdfType: true,
2343
- propertySchema: NodeShape.schema.properties.targetSubjectsOf,
2344
- typeFromRdfResourceValues: $setFromRdfResourceValues(($iriFromRdfResourceValues)),
2345
- }),
2346
- uniqueLang: $shaclPropertyFromRdf({
2347
- ...options,
2348
- focusResource: resource,
2349
- ignoreRdfType: true,
2350
- propertySchema: PropertyShape.schema.properties.uniqueLang,
2351
- typeFromRdfResourceValues: $maybeFromRdfResourceValues(($booleanFromRdfResourceValues)),
2352
- }),
2353
- xone: $shaclPropertyFromRdf({
2354
- ...options,
2355
- focusResource: resource,
2356
- ignoreRdfType: true,
2357
- propertySchema: NodeShape.schema.properties.xone,
2358
- typeFromRdfResourceValues: $maybeFromRdfResourceValues($listFromRdfResourceValues($identifierFromRdfResourceValues)),
2359
- }),
2360
- }).chain((properties) => PropertyShape.create(properties));
2361
- PropertyShape.$toString = (_propertyShape) => `PropertyShape(${JSON.stringify(PropertyShape.toStringRecord(_propertyShape))})`;
2362
- PropertyShape.create = (parameters) => $sequenceRecord({
2135
+ }).chain((properties) => PropertyShapeSpecificProperties.create(properties));
2136
+ PropertyShapeSpecificProperties.$toString = (_propertyShapeSpecificProperties) => `PropertyShapeSpecificProperties(${JSON.stringify(PropertyShapeSpecificProperties.toStringRecord(_propertyShapeSpecificProperties))})`;
2137
+ PropertyShapeSpecificProperties.create = (parameters) => $sequenceRecord({
2363
2138
  $identifier: $convertToIdentifierProperty(parameters.$identifier, parameters.$defaultNamespace),
2364
- $type: Right("PropertyShape"),
2365
- and: $convertToMaybe($convertToList($convertToIdentifier))(parameters.and, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.and.type, value)),
2366
- classes: $convertToScalarSet($convertToIri)(parameters.classes, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.classes.type, value)),
2367
- comment: $convertToMaybe($identityConversionFunction)(parameters.comment, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.comment.type, value)),
2368
- datatype: $convertToMaybe($convertToIri)(parameters.datatype, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.datatype.type, value)),
2369
- deactivated: $convertToMaybe($identityConversionFunction)(parameters.deactivated, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.deactivated.type, value)),
2370
- defaultValue: $convertToMaybe($identityConversionFunction)(parameters.defaultValue, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.defaultValue.type, value)),
2371
- description: $convertToMaybe($identityConversionFunction)(parameters.description, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.description.type, value)),
2372
- disjoint: $convertToScalarSet($convertToIri)(parameters.disjoint, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(PropertyShape.schema.properties.disjoint.type, value)),
2139
+ $type: Right("PropertyShapeSpecificProperties"),
2140
+ defaultValue: $convertToMaybe($identityConversionFunction)(parameters.defaultValue, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShapeSpecificProperties.schema.properties.defaultValue.type, value)),
2141
+ description: $convertToMaybe($identityConversionFunction)(parameters.description, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShapeSpecificProperties.schema.properties.description.type, value)),
2142
+ disjoint: $convertToScalarSet($convertToIri)(parameters.disjoint, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(PropertyShapeSpecificProperties.schema.properties.disjoint.type, value)),
2373
2143
  display: $convertWithDefaultValue($identityConversionFunction, false)(parameters.display, parameters.$defaultNamespace),
2374
- equals: $convertToScalarSet($convertToIri)(parameters.equals, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(PropertyShape.schema.properties.equals.type, value)),
2375
- flags: $convertToMaybe($identityConversionFunction)(parameters.flags, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.flags.type, value)),
2376
- groups: $convertToScalarSet($convertToIdentifier)(parameters.groups, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(PropertyShape.schema.properties.groups.type, value)),
2377
- hasValues: $convertToScalarSet($identityConversionFunction)(parameters.hasValues, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.hasValues.type, value)),
2378
- ignore: $convertWithDefaultValue($identityConversionFunction, false)(parameters.ignore, parameters.$defaultNamespace),
2379
- in_: $convertToMaybe($convertToList($identityConversionFunction))(parameters.in_, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.in_.type, value)),
2380
- isDefinedBy: $convertToMaybe($convertToIdentifier)(parameters.isDefinedBy, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.isDefinedBy.type, value)),
2381
- label: $convertToMaybe($identityConversionFunction)(parameters.label, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.label.type, value)),
2382
- languageIn: $convertToMaybe($convertToList($identityConversionFunction))(parameters.languageIn, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.languageIn.type, value)),
2383
- lessThan: $convertToScalarSet($convertToIri)(parameters.lessThan, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(PropertyShape.schema.properties.lessThan.type, value)),
2384
- lessThanOrEquals: $convertToScalarSet($convertToIri)(parameters.lessThanOrEquals, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(PropertyShape.schema.properties.lessThanOrEquals.type, value)),
2385
- maxCount: $convertToMaybe($convertToBigInt)(parameters.maxCount, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxCount.type, value)),
2386
- maxExclusive: $convertToMaybe($convertToLiteral)(parameters.maxExclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.maxExclusive.type, value)),
2387
- maxInclusive: $convertToMaybe($convertToLiteral)(parameters.maxInclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.maxInclusive.type, value)),
2388
- maxLength: $convertToMaybe($convertToBigInt)(parameters.maxLength, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.maxLength.type, value)),
2389
- message: $convertToMaybe($identityConversionFunction)(parameters.message, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.message.type, value)),
2390
- minCount: $convertToMaybe($convertToBigInt)(parameters.minCount, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minCount.type, value)),
2391
- minExclusive: $convertToMaybe($convertToLiteral)(parameters.minExclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.minExclusive.type, value)),
2392
- minInclusive: $convertToMaybe($convertToLiteral)(parameters.minInclusive, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.minInclusive.type, value)),
2393
- minLength: $convertToMaybe($convertToBigInt)(parameters.minLength, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.minLength.type, value)),
2394
- mutable: $convertToMaybe($identityConversionFunction)(parameters.mutable, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.mutable.type, value)),
2395
- name: $convertToMaybe($identityConversionFunction)(parameters.name, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.name.type, value)),
2396
- node: $convertToMaybe($convertToIdentifier)(parameters.node, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.node.type, value)),
2397
- nodeKind: $convertToMaybe(($convertToInIri))(parameters.nodeKind, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.nodeKind.type, value)),
2398
- not: $convertToScalarSet($convertToIdentifier)(parameters.not, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.not.type, value)),
2399
- or: $convertToMaybe($convertToList($convertToIdentifier))(parameters.or, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.or.type, value)),
2400
- order: $convertToMaybe($identityConversionFunction)(parameters.order, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.order.type, value)),
2144
+ equals: $convertToScalarSet($convertToIri)(parameters.equals, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(PropertyShapeSpecificProperties.schema.properties.equals.type, value)),
2145
+ groups: $convertToScalarSet($convertToIdentifier)(parameters.groups, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(PropertyShapeSpecificProperties.schema.properties.groups.type, value)),
2146
+ lessThan: $convertToScalarSet($convertToIri)(parameters.lessThan, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(PropertyShapeSpecificProperties.schema.properties.lessThan.type, value)),
2147
+ lessThanOrEquals: $convertToScalarSet($convertToIri)(parameters.lessThanOrEquals, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(PropertyShapeSpecificProperties.schema.properties.lessThanOrEquals
2148
+ .type, value)),
2149
+ maxCount: $convertToMaybe($convertToBigInt)(parameters.maxCount, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShapeSpecificProperties.schema.properties.maxCount.type, value)),
2150
+ minCount: $convertToMaybe($convertToBigInt)(parameters.minCount, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShapeSpecificProperties.schema.properties.minCount.type, value)),
2151
+ name: $convertToMaybe($identityConversionFunction)(parameters.name, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShapeSpecificProperties.schema.properties.name.type, value)),
2152
+ order: $convertToMaybe($identityConversionFunction)(parameters.order, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShapeSpecificProperties.schema.properties.order.type, value)),
2401
2153
  path: Either.of(parameters.path),
2402
- pattern: $convertToMaybe($identityConversionFunction)(parameters.pattern, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.pattern.type, value)),
2403
- qualifiedMaxCount: $convertToMaybe($convertToBigInt)(parameters.qualifiedMaxCount, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.qualifiedMaxCount.type, value)),
2404
- qualifiedMinCount: $convertToMaybe($convertToBigInt)(parameters.qualifiedMinCount, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.qualifiedMinCount.type, value)),
2405
- qualifiedValueShape: $convertToMaybe($convertToIdentifier)(parameters.qualifiedValueShape, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.qualifiedValueShape.type, value)),
2406
- qualifiedValueShapesDisjoint: $convertToMaybe($identityConversionFunction)(parameters.qualifiedValueShapesDisjoint, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.qualifiedValueShapesDisjoint.type, value)),
2407
- resolve: $convertToMaybe($convertToIdentifier)(parameters.resolve, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.resolve.type, value)),
2408
- severity: $convertToMaybe(($convertToInIri))(parameters.severity, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.severity.type, value)),
2409
- shaclmateName: $convertToMaybe($identityConversionFunction)(parameters.shaclmateName, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.shaclmateName.type, value)),
2410
- targetClasses: $convertToScalarSet($convertToIri)(parameters.targetClasses, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.targetClasses.type, value)),
2411
- targetNodes: $convertToScalarSet($identityConversionFunction)(parameters.targetNodes, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.targetNodes.type, value)),
2412
- targetObjectsOf: $convertToScalarSet($convertToIri)(parameters.targetObjectsOf, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.targetObjectsOf.type, value)),
2413
- targetSubjectsOf: $convertToScalarSet($convertToIri)(parameters.targetSubjectsOf, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(NodeShape.schema.properties.targetSubjectsOf.type, value)),
2414
- uniqueLang: $convertToMaybe($identityConversionFunction)(parameters.uniqueLang, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.uniqueLang.type, value)),
2415
- xone: $convertToMaybe($convertToList($convertToIdentifier))(parameters.xone, parameters.$defaultNamespace).chain((value) => $validateMaybe($validateArray($identityValidationFunction))(NodeShape.schema.properties.xone.type, value)),
2416
- }).map((object) => $monkeyPatchObject(object, { $toString: PropertyShape.$toString }));
2417
- PropertyShape.createUnsafe = (parameters) => PropertyShape.create(parameters).unsafeCoerce();
2418
- PropertyShape.fromRdfResource = $wrap_FromRdfResourceFunction(PropertyShape._fromRdfResource);
2419
- PropertyShape.fromRdfResourceValues = (values, options) => values.chainMap((value) => value
2154
+ qualifiedMaxCount: $convertToMaybe($convertToBigInt)(parameters.qualifiedMaxCount, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShapeSpecificProperties.schema.properties.qualifiedMaxCount
2155
+ .type, value)),
2156
+ qualifiedMinCount: $convertToMaybe($convertToBigInt)(parameters.qualifiedMinCount, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShapeSpecificProperties.schema.properties.qualifiedMinCount
2157
+ .type, value)),
2158
+ qualifiedValueShape: $convertToMaybe($convertToIdentifier)(parameters.qualifiedValueShape, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShapeSpecificProperties.schema.properties.qualifiedValueShape
2159
+ .type, value)),
2160
+ qualifiedValueShapesDisjoint: $convertToMaybe($identityConversionFunction)(parameters.qualifiedValueShapesDisjoint, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShapeSpecificProperties.schema.properties
2161
+ .qualifiedValueShapesDisjoint.type, value)),
2162
+ resolve: $convertToMaybe($convertToIdentifier)(parameters.resolve, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShapeSpecificProperties.schema.properties.resolve.type, value)),
2163
+ uniqueLang: $convertToMaybe($identityConversionFunction)(parameters.uniqueLang, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShapeSpecificProperties.schema.properties.uniqueLang.type, value)),
2164
+ }).map((object) => $monkeyPatchObject(object, {
2165
+ $toString: PropertyShapeSpecificProperties.$toString,
2166
+ }));
2167
+ PropertyShapeSpecificProperties.createUnsafe = (parameters) => PropertyShapeSpecificProperties.create(parameters).unsafeCoerce();
2168
+ PropertyShapeSpecificProperties.fromRdfResource = $wrap_FromRdfResourceFunction(PropertyShapeSpecificProperties._fromRdfResource);
2169
+ PropertyShapeSpecificProperties.fromRdfResourceValues = (values, options) => values.chainMap((value) => value
2420
2170
  .toResource()
2421
- .chain((resource) => PropertyShape.fromRdfResource(resource, options)));
2171
+ .chain((resource) => PropertyShapeSpecificProperties.fromRdfResource(resource, options)));
2422
2172
  let Identifier;
2423
2173
  (function (Identifier) {
2424
2174
  Identifier.parse = $parseIdentifier;
2425
- })(Identifier = PropertyShape.Identifier || (PropertyShape.Identifier = {}));
2426
- PropertyShape.isPropertyShape = (object) => object.$type === "PropertyShape";
2427
- PropertyShape.schema = {
2175
+ })(Identifier = PropertyShapeSpecificProperties.Identifier || (PropertyShapeSpecificProperties.Identifier = {}));
2176
+ PropertyShapeSpecificProperties.isPropertyShapeSpecificProperties = (object) => object.$type === "PropertyShapeSpecificProperties";
2177
+ PropertyShapeSpecificProperties.schema = {
2428
2178
  properties: {
2429
2179
  $identifier: {
2430
2180
  kind: "Identifier",
2431
2181
  type: { kind: "Identifier" },
2432
2182
  },
2433
- $rdfType: {
2434
- fromRdfType: dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape"),
2435
- kind: "RdfType",
2436
- toRdfTypes: [
2437
- dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape"),
2438
- ],
2439
- },
2440
- and: {
2441
- kind: "Shacl",
2442
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#and"),
2443
- type: {
2444
- kind: "Option",
2445
- itemType: {
2446
- kind: "List",
2447
- itemType: { kind: "Identifier" },
2448
- },
2449
- },
2450
- },
2451
- classes: {
2452
- kind: "Shacl",
2453
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#class"),
2454
- type: { kind: "Set", itemType: { kind: "Iri" } },
2455
- },
2456
- comment: {
2457
- kind: "Shacl",
2458
- path: $rdfs_comment,
2459
- type: {
2460
- kind: "Option",
2461
- itemType: { kind: "String", datatype: $xsd_string },
2462
- },
2463
- },
2464
- datatype: {
2465
- kind: "Shacl",
2466
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#datatype"),
2467
- type: { kind: "Option", itemType: { kind: "Iri" } },
2468
- },
2469
- deactivated: {
2470
- kind: "Shacl",
2471
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#deactivated"),
2472
- type: {
2473
- kind: "Option",
2474
- itemType: { kind: "Boolean", datatype: $xsd_boolean },
2475
- },
2476
- },
2477
2183
  defaultValue: {
2478
2184
  kind: "Shacl",
2479
2185
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#defaultValue"),
@@ -2509,14 +2215,6 @@ export var PropertyShape;
2509
2215
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#equals"),
2510
2216
  type: { kind: "Set", itemType: { kind: "Iri" } },
2511
2217
  },
2512
- flags: {
2513
- kind: "Shacl",
2514
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#flags"),
2515
- type: {
2516
- kind: "Option",
2517
- itemType: { kind: "String", datatype: $xsd_string },
2518
- },
2519
- },
2520
2218
  groups: {
2521
2219
  kind: "Shacl",
2522
2220
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#group"),
@@ -2525,313 +2223,95 @@ export var PropertyShape;
2525
2223
  itemType: { kind: "Identifier" },
2526
2224
  },
2527
2225
  },
2528
- hasValues: {
2226
+ lessThan: {
2529
2227
  kind: "Shacl",
2530
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#hasValue"),
2531
- type: {
2532
- kind: "Set",
2533
- itemType: { kind: "Term", types: ["NamedNode", "Literal"] },
2534
- },
2228
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#lessThan"),
2229
+ type: { kind: "Set", itemType: { kind: "Iri" } },
2535
2230
  },
2536
- ignore: {
2231
+ lessThanOrEquals: {
2537
2232
  kind: "Shacl",
2538
- path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#ignore"),
2539
- type: {
2540
- kind: "DefaultValue",
2541
- itemType: { kind: "Boolean", datatype: $xsd_boolean },
2542
- defaultValue: dataFactory.literal("false", $xsd_boolean),
2543
- },
2233
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#lessThanOrEquals"),
2234
+ type: { kind: "Set", itemType: { kind: "Iri" } },
2544
2235
  },
2545
- in_: {
2236
+ maxCount: {
2546
2237
  kind: "Shacl",
2547
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#in"),
2238
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"),
2548
2239
  type: {
2549
2240
  kind: "Option",
2550
- itemType: {
2551
- kind: "List",
2552
- itemType: {
2553
- kind: "Term",
2554
- types: ["NamedNode", "Literal"],
2555
- },
2556
- },
2241
+ itemType: { kind: "BigInt", datatype: $xsd_integer },
2557
2242
  },
2558
2243
  },
2559
- isDefinedBy: {
2244
+ minCount: {
2560
2245
  kind: "Shacl",
2561
- path: $rdfs_isDefinedBy,
2246
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"),
2562
2247
  type: {
2563
2248
  kind: "Option",
2564
- itemType: { kind: "Identifier" },
2249
+ itemType: { kind: "BigInt", datatype: $xsd_integer },
2565
2250
  },
2566
2251
  },
2567
- label: {
2252
+ name: {
2568
2253
  kind: "Shacl",
2569
- path: $rdfs_label,
2254
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#name"),
2570
2255
  type: {
2571
2256
  kind: "Option",
2572
2257
  itemType: { kind: "String", datatype: $xsd_string },
2573
2258
  },
2574
2259
  },
2575
- languageIn: {
2260
+ order: {
2576
2261
  kind: "Shacl",
2577
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#languageIn"),
2262
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#order"),
2578
2263
  type: {
2579
2264
  kind: "Option",
2580
- itemType: {
2581
- kind: "List",
2582
- itemType: { kind: "String", datatype: $xsd_string },
2583
- },
2265
+ itemType: { kind: "Float", datatype: $xsd_double },
2584
2266
  },
2585
2267
  },
2586
- lessThan: {
2587
- kind: "Shacl",
2588
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#lessThan"),
2589
- type: { kind: "Set", itemType: { kind: "Iri" } },
2590
- },
2591
- lessThanOrEquals: {
2268
+ path: {
2592
2269
  kind: "Shacl",
2593
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#lessThanOrEquals"),
2594
- type: { kind: "Set", itemType: { kind: "Iri" } },
2270
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#path"),
2271
+ get type() {
2272
+ return $PropertyPath.schema;
2273
+ },
2595
2274
  },
2596
- maxCount: {
2275
+ qualifiedMaxCount: {
2597
2276
  kind: "Shacl",
2598
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"),
2277
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#qualifiedMaxCount"),
2599
2278
  type: {
2600
2279
  kind: "Option",
2601
2280
  itemType: { kind: "BigInt", datatype: $xsd_integer },
2602
2281
  },
2603
2282
  },
2604
- maxExclusive: {
2283
+ qualifiedMinCount: {
2605
2284
  kind: "Shacl",
2606
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxExclusive"),
2285
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#qualifiedMinCount"),
2607
2286
  type: {
2608
2287
  kind: "Option",
2609
- itemType: { kind: "Literal" },
2288
+ itemType: { kind: "BigInt", datatype: $xsd_integer },
2610
2289
  },
2611
2290
  },
2612
- maxInclusive: {
2291
+ qualifiedValueShape: {
2613
2292
  kind: "Shacl",
2614
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxInclusive"),
2293
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#qualifiedValueShape"),
2615
2294
  type: {
2616
2295
  kind: "Option",
2617
- itemType: { kind: "Literal" },
2296
+ itemType: { kind: "Identifier" },
2618
2297
  },
2619
2298
  },
2620
- maxLength: {
2299
+ qualifiedValueShapesDisjoint: {
2621
2300
  kind: "Shacl",
2622
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxLength"),
2301
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#qualifiedValueShapesDisjoint"),
2623
2302
  type: {
2624
2303
  kind: "Option",
2625
- itemType: { kind: "BigInt", datatype: $xsd_integer },
2304
+ itemType: { kind: "Boolean", datatype: $xsd_boolean },
2626
2305
  },
2627
2306
  },
2628
- message: {
2307
+ resolve: {
2629
2308
  kind: "Shacl",
2630
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#message"),
2309
+ path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#resolve"),
2631
2310
  type: {
2632
2311
  kind: "Option",
2633
- itemType: { kind: "String", datatype: $xsd_string },
2312
+ itemType: { kind: "Identifier" },
2634
2313
  },
2635
2314
  },
2636
- minCount: {
2637
- kind: "Shacl",
2638
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"),
2639
- type: {
2640
- kind: "Option",
2641
- itemType: { kind: "BigInt", datatype: $xsd_integer },
2642
- },
2643
- },
2644
- minExclusive: {
2645
- kind: "Shacl",
2646
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minExclusive"),
2647
- type: {
2648
- kind: "Option",
2649
- itemType: { kind: "Literal" },
2650
- },
2651
- },
2652
- minInclusive: {
2653
- kind: "Shacl",
2654
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minInclusive"),
2655
- type: {
2656
- kind: "Option",
2657
- itemType: { kind: "Literal" },
2658
- },
2659
- },
2660
- minLength: {
2661
- kind: "Shacl",
2662
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minLength"),
2663
- type: {
2664
- kind: "Option",
2665
- itemType: { kind: "BigInt", datatype: $xsd_integer },
2666
- },
2667
- },
2668
- mutable: {
2669
- kind: "Shacl",
2670
- path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#mutable"),
2671
- type: {
2672
- kind: "Option",
2673
- itemType: { kind: "Boolean", datatype: $xsd_boolean },
2674
- },
2675
- },
2676
- name: {
2677
- kind: "Shacl",
2678
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#name"),
2679
- type: {
2680
- kind: "Option",
2681
- itemType: { kind: "String", datatype: $xsd_string },
2682
- },
2683
- },
2684
- node: {
2685
- kind: "Shacl",
2686
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
2687
- type: {
2688
- kind: "Option",
2689
- itemType: { kind: "Identifier" },
2690
- },
2691
- },
2692
- nodeKind: {
2693
- kind: "Shacl",
2694
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"),
2695
- type: {
2696
- kind: "Option",
2697
- itemType: {
2698
- kind: "Iri",
2699
- in: [
2700
- dataFactory.namedNode("http://www.w3.org/ns/shacl#BlankNode"),
2701
- dataFactory.namedNode("http://www.w3.org/ns/shacl#BlankNodeOrIRI"),
2702
- dataFactory.namedNode("http://www.w3.org/ns/shacl#BlankNodeOrLiteral"),
2703
- dataFactory.namedNode("http://www.w3.org/ns/shacl#IRI"),
2704
- dataFactory.namedNode("http://www.w3.org/ns/shacl#IRIOrLiteral"),
2705
- dataFactory.namedNode("http://www.w3.org/ns/shacl#Literal"),
2706
- ],
2707
- },
2708
- },
2709
- },
2710
- not: {
2711
- kind: "Shacl",
2712
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#not"),
2713
- type: {
2714
- kind: "Set",
2715
- itemType: { kind: "Identifier" },
2716
- },
2717
- },
2718
- or: {
2719
- kind: "Shacl",
2720
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#or"),
2721
- type: {
2722
- kind: "Option",
2723
- itemType: {
2724
- kind: "List",
2725
- itemType: { kind: "Identifier" },
2726
- },
2727
- },
2728
- },
2729
- order: {
2730
- kind: "Shacl",
2731
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#order"),
2732
- type: {
2733
- kind: "Option",
2734
- itemType: { kind: "Float", datatype: $xsd_double },
2735
- },
2736
- },
2737
- path: {
2738
- kind: "Shacl",
2739
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#path"),
2740
- get type() {
2741
- return $PropertyPath.schema;
2742
- },
2743
- },
2744
- pattern: {
2745
- kind: "Shacl",
2746
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#pattern"),
2747
- type: {
2748
- kind: "Option",
2749
- itemType: { kind: "String", datatype: $xsd_string },
2750
- },
2751
- },
2752
- qualifiedMaxCount: {
2753
- kind: "Shacl",
2754
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#qualifiedMaxCount"),
2755
- type: {
2756
- kind: "Option",
2757
- itemType: { kind: "BigInt", datatype: $xsd_integer },
2758
- },
2759
- },
2760
- qualifiedMinCount: {
2761
- kind: "Shacl",
2762
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#qualifiedMinCount"),
2763
- type: {
2764
- kind: "Option",
2765
- itemType: { kind: "BigInt", datatype: $xsd_integer },
2766
- },
2767
- },
2768
- qualifiedValueShape: {
2769
- kind: "Shacl",
2770
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#qualifiedValueShape"),
2771
- type: {
2772
- kind: "Option",
2773
- itemType: { kind: "Identifier" },
2774
- },
2775
- },
2776
- qualifiedValueShapesDisjoint: {
2777
- kind: "Shacl",
2778
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#qualifiedValueShapesDisjoint"),
2779
- type: {
2780
- kind: "Option",
2781
- itemType: { kind: "Boolean", datatype: $xsd_boolean },
2782
- },
2783
- },
2784
- resolve: {
2785
- kind: "Shacl",
2786
- path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#resolve"),
2787
- type: {
2788
- kind: "Option",
2789
- itemType: { kind: "Identifier" },
2790
- },
2791
- },
2792
- severity: {
2793
- kind: "Shacl",
2794
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#severity"),
2795
- get type() {
2796
- return {
2797
- kind: "Option",
2798
- get itemType() {
2799
- return Severity.schema;
2800
- },
2801
- };
2802
- },
2803
- },
2804
- shaclmateName: {
2805
- kind: "Shacl",
2806
- path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#name"),
2807
- type: {
2808
- kind: "Option",
2809
- itemType: { kind: "String", datatype: $xsd_string },
2810
- },
2811
- },
2812
- targetClasses: {
2813
- kind: "Shacl",
2814
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetClass"),
2815
- type: { kind: "Set", itemType: { kind: "Iri" } },
2816
- },
2817
- targetNodes: {
2818
- kind: "Shacl",
2819
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetNode"),
2820
- type: {
2821
- kind: "Set",
2822
- itemType: { kind: "Term", types: ["NamedNode", "Literal"] },
2823
- },
2824
- },
2825
- targetObjectsOf: {
2826
- kind: "Shacl",
2827
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetObjectsOf"),
2828
- type: { kind: "Set", itemType: { kind: "Iri" } },
2829
- },
2830
- targetSubjectsOf: {
2831
- kind: "Shacl",
2832
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetSubjectsOf"),
2833
- type: { kind: "Set", itemType: { kind: "Iri" } },
2834
- },
2835
2315
  uniqueLang: {
2836
2316
  kind: "Shacl",
2837
2317
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#uniqueLang"),
@@ -2840,29 +2320,16 @@ export var PropertyShape;
2840
2320
  itemType: { kind: "Boolean", datatype: $xsd_boolean },
2841
2321
  },
2842
2322
  },
2843
- xone: {
2844
- kind: "Shacl",
2845
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#xone"),
2846
- type: {
2847
- kind: "Option",
2848
- itemType: {
2849
- kind: "List",
2850
- itemType: { kind: "Identifier" },
2851
- },
2852
- },
2853
- },
2854
2323
  },
2855
2324
  };
2856
- PropertyShape.toStringRecord = (_propertyShape) => $compactRecord({
2857
- $identifier: _propertyShape.$identifier().toString(),
2858
- label: _propertyShape.label.map((item) => item.toString()).extract(),
2859
- name: _propertyShape.name.map((item) => item.toString()).extract(),
2860
- path: $PropertyPath.$toString(_propertyShape.path),
2861
- shaclmateName: _propertyShape.shaclmateName
2325
+ PropertyShapeSpecificProperties.toStringRecord = (_propertyShapeSpecificProperties) => $compactRecord({
2326
+ $identifier: _propertyShapeSpecificProperties.$identifier().toString(),
2327
+ name: _propertyShapeSpecificProperties.name
2862
2328
  .map((item) => item.toString())
2863
2329
  .extract(),
2330
+ path: $PropertyPath.$toString(_propertyShapeSpecificProperties.path),
2864
2331
  });
2865
- })(PropertyShape || (PropertyShape = {}));
2332
+ })(PropertyShapeSpecificProperties || (PropertyShapeSpecificProperties = {}));
2866
2333
  export var Service;
2867
2334
  (function (Service) {
2868
2335
  Service._fromRdfResource = (resource, options) => $sequenceRecord({
@@ -2879,14 +2346,14 @@ export var Service;
2879
2346
  ...options,
2880
2347
  focusResource: resource,
2881
2348
  ignoreRdfType: true,
2882
- propertySchema: NodeShape.schema.properties.comment,
2349
+ propertySchema: BaseShape.schema.properties.comment,
2883
2350
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
2884
2351
  }),
2885
2352
  label: $shaclPropertyFromRdf({
2886
2353
  ...options,
2887
2354
  focusResource: resource,
2888
2355
  ignoreRdfType: true,
2889
- propertySchema: NodeShape.schema.properties.label,
2356
+ propertySchema: BaseShape.schema.properties.label,
2890
2357
  typeFromRdfResourceValues: $maybeFromRdfResourceValues(($stringFromRdfResourceValues)),
2891
2358
  }),
2892
2359
  name: $shaclPropertyFromRdf({
@@ -2908,8 +2375,8 @@ export var Service;
2908
2375
  Service.create = (parameters = {}) => $sequenceRecord({
2909
2376
  $identifier: $convertToIdentifierProperty(parameters.$identifier, parameters.$defaultNamespace),
2910
2377
  $type: Right("Service"),
2911
- comment: $convertToMaybe($identityConversionFunction)(parameters.comment, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.comment.type, value)),
2912
- label: $convertToMaybe($identityConversionFunction)(parameters.label, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.label.type, value)),
2378
+ comment: $convertToMaybe($identityConversionFunction)(parameters.comment, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.comment.type, value)),
2379
+ label: $convertToMaybe($identityConversionFunction)(parameters.label, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(BaseShape.schema.properties.label.type, value)),
2913
2380
  name: $convertToMaybe($identityConversionFunction)(parameters.name, parameters.$defaultNamespace).chain((value) => $validateMaybe($identityValidationFunction)(Service.schema.properties.name.type, value)),
2914
2381
  operations: $convertToScalarSet($identityConversionFunction)(parameters.operations, parameters.$defaultNamespace).chain((value) => $validateArray($identityValidationFunction)(Service.schema.properties.operations.type, value)),
2915
2382
  }).map((object) => $monkeyPatchObject(object, { $toString: Service.$toString }));
@@ -3270,6 +2737,75 @@ export var ValidationResult;
3270
2737
  };
3271
2738
  ValidationResult.toStringRecord = (_validationResult) => $compactRecord({ $identifier: _validationResult.$identifier().toString() });
3272
2739
  })(ValidationResult || (ValidationResult = {}));
2740
+ export var NodeShape;
2741
+ (function (NodeShape) {
2742
+ NodeShape._fromRdfResource = (resource, options) => BaseShape.fromRdfResource(resource, options).chain((member0) => NodeShapeSpecificProperties.fromRdfResource(resource, options).map((member1) => ({
2743
+ ...member0,
2744
+ ...member1,
2745
+ $type: "NodeShape",
2746
+ })));
2747
+ NodeShape.$toString = (value) => JSON.stringify([
2748
+ BaseShape.$toString(value),
2749
+ NodeShapeSpecificProperties.$toString(value),
2750
+ ]);
2751
+ NodeShape.create = (parameters) => BaseShape.create(parameters)
2752
+ .chain((member0) => NodeShapeSpecificProperties.create(parameters).map((member1) => ({
2753
+ ...member0,
2754
+ ...member1,
2755
+ $type: "NodeShape",
2756
+ })))
2757
+ .map((object) => $monkeyPatchObject(object, { $toString: NodeShape.$toString }));
2758
+ NodeShape.createUnsafe = (parameters) => NodeShape.create(parameters).unsafeCoerce();
2759
+ NodeShape.fromRdfResource = $wrap_FromRdfResourceFunction(NodeShape._fromRdfResource);
2760
+ NodeShape.fromRdfResourceValues = (values, options) => values.chainMap((value) => value
2761
+ .toResource()
2762
+ .chain((resource) => NodeShape.fromRdfResource(resource, options)));
2763
+ let Identifier;
2764
+ (function (Identifier) {
2765
+ Identifier.parse = $parseIdentifier;
2766
+ })(Identifier = NodeShape.Identifier || (NodeShape.Identifier = {}));
2767
+ NodeShape.isNodeShape = (object) => object.$type === "NodeShape";
2768
+ NodeShape.schema = {
2769
+ kind: "ObjectIntersection",
2770
+ members: [BaseShape.schema, NodeShapeSpecificProperties.schema],
2771
+ };
2772
+ })(NodeShape || (NodeShape = {}));
2773
+ export var PropertyShape;
2774
+ (function (PropertyShape) {
2775
+ PropertyShape._fromRdfResource = (resource, options) => BaseShape.fromRdfResource(resource, options).chain((member0) => PropertyShapeSpecificProperties.fromRdfResource(resource, options).map((member1) => ({
2776
+ ...member0,
2777
+ ...member1,
2778
+ $type: "PropertyShape",
2779
+ })));
2780
+ PropertyShape.$toString = (value) => JSON.stringify([
2781
+ BaseShape.$toString(value),
2782
+ PropertyShapeSpecificProperties.$toString(value),
2783
+ ]);
2784
+ PropertyShape.create = (parameters) => BaseShape.create(parameters)
2785
+ .chain((member0) => PropertyShapeSpecificProperties.create(parameters).map((member1) => ({
2786
+ ...member0,
2787
+ ...member1,
2788
+ $type: "PropertyShape",
2789
+ })))
2790
+ .map((object) => $monkeyPatchObject(object, { $toString: PropertyShape.$toString }));
2791
+ PropertyShape.createUnsafe = (parameters) => PropertyShape.create(parameters).unsafeCoerce();
2792
+ PropertyShape.fromRdfResource = $wrap_FromRdfResourceFunction(PropertyShape._fromRdfResource);
2793
+ PropertyShape.fromRdfResourceValues = (values, options) => values.chainMap((value) => value
2794
+ .toResource()
2795
+ .chain((resource) => PropertyShape.fromRdfResource(resource, options)));
2796
+ let Identifier;
2797
+ (function (Identifier) {
2798
+ Identifier.parse = $parseIdentifier;
2799
+ })(Identifier = PropertyShape.Identifier || (PropertyShape.Identifier = {}));
2800
+ PropertyShape.isPropertyShape = (object) => object.$type === "PropertyShape";
2801
+ PropertyShape.schema = {
2802
+ kind: "ObjectIntersection",
2803
+ members: [
2804
+ BaseShape.schema,
2805
+ PropertyShapeSpecificProperties.schema,
2806
+ ],
2807
+ };
2808
+ })(PropertyShape || (PropertyShape = {}));
3273
2809
  export var Shape;
3274
2810
  (function (Shape) {
3275
2811
  Shape.$toString = (value) => {
@@ -3367,290 +2903,16 @@ export var Shape;
3367
2903
  type: PropertyShape.schema,
3368
2904
  },
3369
2905
  },
3370
- properties: {
3371
- and: {
3372
- kind: "Shacl",
3373
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#and"),
3374
- type: {
3375
- kind: "Option",
3376
- itemType: {
3377
- kind: "List",
3378
- itemType: { kind: "Identifier" },
3379
- },
3380
- },
3381
- },
3382
- classes: {
3383
- kind: "Shacl",
3384
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#class"),
3385
- type: { kind: "Set", itemType: { kind: "Iri" } },
3386
- },
3387
- comment: {
3388
- kind: "Shacl",
3389
- path: $rdfs_comment,
3390
- type: {
3391
- kind: "Option",
3392
- itemType: { kind: "String", datatype: $xsd_string },
3393
- },
3394
- },
3395
- datatype: {
3396
- kind: "Shacl",
3397
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#datatype"),
3398
- type: { kind: "Option", itemType: { kind: "Iri" } },
3399
- },
3400
- deactivated: {
3401
- kind: "Shacl",
3402
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#deactivated"),
3403
- type: {
3404
- kind: "Option",
3405
- itemType: { kind: "Boolean", datatype: $xsd_boolean },
3406
- },
3407
- },
3408
- flags: {
3409
- kind: "Shacl",
3410
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#flags"),
3411
- type: {
3412
- kind: "Option",
3413
- itemType: { kind: "String", datatype: $xsd_string },
3414
- },
3415
- },
3416
- hasValues: {
3417
- kind: "Shacl",
3418
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#hasValue"),
3419
- type: {
3420
- kind: "Set",
3421
- itemType: { kind: "Term", types: ["NamedNode", "Literal"] },
3422
- },
3423
- },
3424
- ignore: {
3425
- kind: "Shacl",
3426
- path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#ignore"),
3427
- type: {
3428
- kind: "DefaultValue",
3429
- itemType: { kind: "Boolean", datatype: $xsd_boolean },
3430
- defaultValue: dataFactory.literal("false", $xsd_boolean),
3431
- },
3432
- },
3433
- in_: {
3434
- kind: "Shacl",
3435
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#in"),
3436
- type: {
3437
- kind: "Option",
3438
- itemType: {
3439
- kind: "List",
3440
- itemType: {
3441
- kind: "Term",
3442
- types: ["NamedNode", "Literal"],
3443
- },
3444
- },
3445
- },
3446
- },
3447
- isDefinedBy: {
3448
- kind: "Shacl",
3449
- path: $rdfs_isDefinedBy,
3450
- type: {
3451
- kind: "Option",
3452
- itemType: { kind: "Identifier" },
3453
- },
3454
- },
3455
- label: {
3456
- kind: "Shacl",
3457
- path: $rdfs_label,
3458
- type: {
3459
- kind: "Option",
3460
- itemType: { kind: "String", datatype: $xsd_string },
3461
- },
3462
- },
3463
- languageIn: {
3464
- kind: "Shacl",
3465
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#languageIn"),
3466
- type: {
3467
- kind: "Option",
3468
- itemType: {
3469
- kind: "List",
3470
- itemType: { kind: "String", datatype: $xsd_string },
3471
- },
3472
- },
3473
- },
3474
- maxExclusive: {
3475
- kind: "Shacl",
3476
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxExclusive"),
3477
- type: {
3478
- kind: "Option",
3479
- itemType: { kind: "Literal" },
3480
- },
3481
- },
3482
- maxInclusive: {
3483
- kind: "Shacl",
3484
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxInclusive"),
3485
- type: {
3486
- kind: "Option",
3487
- itemType: { kind: "Literal" },
3488
- },
3489
- },
3490
- maxLength: {
3491
- kind: "Shacl",
3492
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxLength"),
3493
- type: {
3494
- kind: "Option",
3495
- itemType: { kind: "BigInt", datatype: $xsd_integer },
3496
- },
3497
- },
3498
- message: {
3499
- kind: "Shacl",
3500
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#message"),
3501
- type: {
3502
- kind: "Option",
3503
- itemType: { kind: "String", datatype: $xsd_string },
3504
- },
3505
- },
3506
- minExclusive: {
3507
- kind: "Shacl",
3508
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minExclusive"),
3509
- type: {
3510
- kind: "Option",
3511
- itemType: { kind: "Literal" },
3512
- },
3513
- },
3514
- minInclusive: {
3515
- kind: "Shacl",
3516
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minInclusive"),
3517
- type: {
3518
- kind: "Option",
3519
- itemType: { kind: "Literal" },
3520
- },
3521
- },
3522
- minLength: {
3523
- kind: "Shacl",
3524
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minLength"),
3525
- type: {
3526
- kind: "Option",
3527
- itemType: { kind: "BigInt", datatype: $xsd_integer },
3528
- },
3529
- },
3530
- mutable: {
3531
- kind: "Shacl",
3532
- path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#mutable"),
3533
- type: {
3534
- kind: "Option",
3535
- itemType: { kind: "Boolean", datatype: $xsd_boolean },
3536
- },
3537
- },
3538
- node: {
3539
- kind: "Shacl",
3540
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#node"),
3541
- type: {
3542
- kind: "Option",
3543
- itemType: { kind: "Identifier" },
3544
- },
3545
- },
3546
- nodeKind: {
3547
- kind: "Shacl",
3548
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"),
3549
- type: {
3550
- kind: "Option",
3551
- itemType: {
3552
- kind: "Iri",
3553
- in: [
3554
- dataFactory.namedNode("http://www.w3.org/ns/shacl#BlankNode"),
3555
- dataFactory.namedNode("http://www.w3.org/ns/shacl#BlankNodeOrIRI"),
3556
- dataFactory.namedNode("http://www.w3.org/ns/shacl#BlankNodeOrLiteral"),
3557
- dataFactory.namedNode("http://www.w3.org/ns/shacl#IRI"),
3558
- dataFactory.namedNode("http://www.w3.org/ns/shacl#IRIOrLiteral"),
3559
- dataFactory.namedNode("http://www.w3.org/ns/shacl#Literal"),
3560
- ],
3561
- },
3562
- },
3563
- },
3564
- not: {
3565
- kind: "Shacl",
3566
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#not"),
3567
- type: {
3568
- kind: "Set",
3569
- itemType: { kind: "Identifier" },
3570
- },
3571
- },
3572
- or: {
3573
- kind: "Shacl",
3574
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#or"),
3575
- type: {
3576
- kind: "Option",
3577
- itemType: {
3578
- kind: "List",
3579
- itemType: { kind: "Identifier" },
3580
- },
3581
- },
3582
- },
3583
- pattern: {
3584
- kind: "Shacl",
3585
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#pattern"),
3586
- type: {
3587
- kind: "Option",
3588
- itemType: { kind: "String", datatype: $xsd_string },
3589
- },
3590
- },
3591
- severity: {
3592
- kind: "Shacl",
3593
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#severity"),
3594
- get type() {
3595
- return {
3596
- kind: "Option",
3597
- get itemType() {
3598
- return Severity.schema;
3599
- },
3600
- };
3601
- },
3602
- },
3603
- shaclmateName: {
3604
- kind: "Shacl",
3605
- path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#name"),
3606
- type: {
3607
- kind: "Option",
3608
- itemType: { kind: "String", datatype: $xsd_string },
3609
- },
3610
- },
3611
- targetClasses: {
3612
- kind: "Shacl",
3613
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetClass"),
3614
- type: { kind: "Set", itemType: { kind: "Iri" } },
3615
- },
3616
- targetNodes: {
3617
- kind: "Shacl",
3618
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetNode"),
3619
- type: {
3620
- kind: "Set",
3621
- itemType: { kind: "Term", types: ["NamedNode", "Literal"] },
3622
- },
3623
- },
3624
- targetObjectsOf: {
3625
- kind: "Shacl",
3626
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetObjectsOf"),
3627
- type: { kind: "Set", itemType: { kind: "Iri" } },
3628
- },
3629
- targetSubjectsOf: {
3630
- kind: "Shacl",
3631
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetSubjectsOf"),
3632
- type: { kind: "Set", itemType: { kind: "Iri" } },
3633
- },
3634
- xone: {
3635
- kind: "Shacl",
3636
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#xone"),
3637
- type: {
3638
- kind: "Option",
3639
- itemType: {
3640
- kind: "List",
3641
- itemType: { kind: "Identifier" },
3642
- },
3643
- },
3644
- },
3645
- },
3646
2906
  };
3647
2907
  })(Shape || (Shape = {}));
3648
2908
  export var $Object;
3649
2909
  (function ($Object) {
3650
2910
  function $toString(object) {
3651
2911
  switch (object.$type) {
3652
- case "NodeShape":
3653
- return NodeShape.$toString(object);
2912
+ case "BaseShape":
2913
+ return BaseShape.$toString(object);
2914
+ case "NodeShapeSpecificProperties":
2915
+ return NodeShapeSpecificProperties.$toString(object);
3654
2916
  case "Ontology":
3655
2917
  return Ontology.$toString(object);
3656
2918
  case "Operation":
@@ -3663,14 +2925,18 @@ export var $Object;
3663
2925
  return OperationHttpBinding.$toString(object);
3664
2926
  case "PropertyGroup":
3665
2927
  return PropertyGroup.$toString(object);
3666
- case "PropertyShape":
3667
- return PropertyShape.$toString(object);
2928
+ case "PropertyShapeSpecificProperties":
2929
+ return PropertyShapeSpecificProperties.$toString(object);
3668
2930
  case "Service":
3669
2931
  return Service.$toString(object);
3670
2932
  case "ValidationReport":
3671
2933
  return ValidationReport.$toString(object);
3672
2934
  case "ValidationResult":
3673
2935
  return ValidationResult.$toString(object);
2936
+ case "NodeShape":
2937
+ return NodeShape.$toString(object);
2938
+ case "PropertyShape":
2939
+ return PropertyShape.$toString(object);
3674
2940
  default:
3675
2941
  object;
3676
2942
  throw new Error("should never reach this point");