@shaclmate/compiler 4.0.39 → 4.0.41

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 (211) hide show
  1. package/dist/ShapesGraphToAstTransformer.d.ts +0 -8
  2. package/dist/ShapesGraphToAstTransformer.js +5 -85
  3. package/dist/_ShapesGraphToAstTransformer/shapeNodeKinds.js +128 -160
  4. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstObjectType.d.ts +1 -1
  5. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstObjectType.js +0 -16
  6. package/dist/ast/AbstractCompoundType.d.ts +2 -1
  7. package/dist/ast/AbstractCompoundType.js +1 -1
  8. package/dist/ast/AbstractLazyObjectType.d.ts +0 -2
  9. package/dist/ast/Ast.d.ts +1 -3
  10. package/dist/ast/ListType.d.ts +1 -1
  11. package/dist/ast/ListType.js +1 -1
  12. package/dist/ast/ObjectType.d.ts +0 -12
  13. package/dist/ast/ObjectType.js +0 -78
  14. package/dist/generators/AstJsonGenerator.js +7 -3
  15. package/dist/generators/transformAstToLabeledPropertyGraph.js +59 -56
  16. package/dist/generators/ts/AbstractCollectionType.d.ts +5 -12
  17. package/dist/generators/ts/AbstractCollectionType.js +9 -68
  18. package/dist/generators/ts/AbstractContainerType.d.ts +4 -6
  19. package/dist/generators/ts/AbstractContainerType.js +5 -9
  20. package/dist/generators/ts/AbstractDateType.d.ts +6 -3
  21. package/dist/generators/ts/AbstractDateType.js +7 -2
  22. package/dist/generators/ts/AbstractIdentifierType.d.ts +4 -0
  23. package/dist/generators/ts/AbstractIdentifierType.js +3 -0
  24. package/dist/generators/ts/AbstractLazyObjectType.d.ts +9 -9
  25. package/dist/generators/ts/AbstractLazyObjectType.js +30 -19
  26. package/dist/generators/ts/AbstractLiteralType.d.ts +1 -0
  27. package/dist/generators/ts/AbstractNumericType.d.ts +1 -1
  28. package/dist/generators/ts/AbstractNumericType.js +9 -9
  29. package/dist/generators/ts/AbstractObjectSetType.d.ts +10 -9
  30. package/dist/generators/ts/AbstractObjectSetType.js +2 -2
  31. package/dist/generators/ts/AbstractPrimitiveType.d.ts +1 -0
  32. package/dist/generators/ts/AbstractPrimitiveType.js +2 -2
  33. package/dist/generators/ts/AbstractTermType.d.ts +1 -2
  34. package/dist/generators/ts/AbstractTermType.js +3 -5
  35. package/dist/generators/ts/AbstractType.d.ts +61 -26
  36. package/dist/generators/ts/AbstractType.js +37 -17
  37. package/dist/generators/ts/BigDecimalType.d.ts +5 -1
  38. package/dist/generators/ts/BigDecimalType.js +6 -3
  39. package/dist/generators/ts/BigIntType.d.ts +3 -1
  40. package/dist/generators/ts/BigIntType.js +3 -3
  41. package/dist/generators/ts/BlankNodeType.d.ts +3 -3
  42. package/dist/generators/ts/BlankNodeType.js +13 -13
  43. package/dist/generators/ts/BooleanType.d.ts +5 -3
  44. package/dist/generators/ts/BooleanType.js +11 -6
  45. package/dist/generators/ts/DefaultValueType.d.ts +40 -2
  46. package/dist/generators/ts/DefaultValueType.js +14 -12
  47. package/dist/generators/ts/FloatType.d.ts +3 -1
  48. package/dist/generators/ts/FloatType.js +1 -1
  49. package/dist/generators/ts/GraphqlSchema.d.ts +4 -4
  50. package/dist/generators/ts/GraphqlSchema.js +6 -6
  51. package/dist/generators/ts/IdentifierType.d.ts +3 -3
  52. package/dist/generators/ts/IdentifierType.js +19 -17
  53. package/dist/generators/ts/IntType.d.ts +3 -1
  54. package/dist/generators/ts/IntType.js +1 -1
  55. package/dist/generators/ts/IriType.d.ts +2 -2
  56. package/dist/generators/ts/IriType.js +21 -19
  57. package/dist/generators/ts/LazyObjectOptionType.d.ts +2 -0
  58. package/dist/generators/ts/LazyObjectOptionType.js +14 -10
  59. package/dist/generators/ts/LazyObjectSetType.js +14 -8
  60. package/dist/generators/ts/LazyObjectType.js +9 -6
  61. package/dist/generators/ts/ListType.d.ts +13 -5
  62. package/dist/generators/ts/ListType.js +48 -12
  63. package/dist/generators/ts/LiteralType.d.ts +5 -1
  64. package/dist/generators/ts/LiteralType.js +11 -8
  65. package/dist/generators/ts/{NamedObjectType.d.ts → ObjectType.d.ts} +19 -34
  66. package/dist/generators/ts/ObjectType.js +282 -0
  67. package/dist/generators/ts/ObjectUnionType.d.ts +20 -0
  68. package/dist/generators/ts/{NamedObjectUnionType.js → ObjectUnionType.js} +52 -60
  69. package/dist/generators/ts/OptionType.d.ts +6 -2
  70. package/dist/generators/ts/OptionType.js +20 -15
  71. package/dist/generators/ts/RdfjsDatasetObjectSetType.js +8 -11
  72. package/dist/generators/ts/SetType.d.ts +16 -1
  73. package/dist/generators/ts/SetType.js +80 -2
  74. package/dist/generators/ts/Snippets.d.ts +3 -1
  75. package/dist/generators/ts/Snippets.js +18 -4
  76. package/dist/generators/ts/SparqlObjectSetType.js +2 -2
  77. package/dist/generators/ts/StringType.d.ts +5 -3
  78. package/dist/generators/ts/StringType.js +15 -6
  79. package/dist/generators/ts/TermType.d.ts +6 -2
  80. package/dist/generators/ts/TermType.js +15 -12
  81. package/dist/generators/ts/TsGenerator.d.ts +1 -1
  82. package/dist/generators/ts/TsGenerator.js +60 -32
  83. package/dist/generators/ts/Type.d.ts +4 -5
  84. package/dist/generators/ts/TypeFactory.d.ts +7 -8
  85. package/dist/generators/ts/TypeFactory.js +62 -76
  86. package/dist/generators/ts/{AbstractUnionType.d.ts → UnionType.d.ts} +36 -11
  87. package/dist/generators/ts/{AbstractUnionType.js → UnionType.js} +296 -105
  88. package/dist/generators/ts/ZodGenerator.d.ts +1 -1
  89. package/dist/generators/ts/ZodGenerator.js +21 -16
  90. package/dist/generators/ts/{_NamedObjectType → _ObjectType}/AbstractProperty.d.ts +9 -6
  91. package/dist/generators/ts/{_NamedObjectType → _ObjectType}/AbstractProperty.js +3 -3
  92. package/dist/generators/ts/{_NamedObjectType → _ObjectType}/DiscriminantProperty.d.ts +9 -13
  93. package/dist/generators/ts/{_NamedObjectType → _ObjectType}/DiscriminantProperty.js +22 -39
  94. package/dist/generators/ts/{_NamedObjectType → _ObjectType}/IdentifierProperty.d.ts +1 -5
  95. package/dist/generators/ts/{_NamedObjectType → _ObjectType}/IdentifierProperty.js +18 -13
  96. package/dist/generators/ts/_ObjectType/ObjectType_createFunctionDeclaration.d.ts +5 -0
  97. package/dist/generators/ts/_ObjectType/ObjectType_createFunctionDeclaration.js +44 -0
  98. package/dist/generators/ts/_ObjectType/ObjectType_equalsFunctionDeclaration.d.ts +5 -0
  99. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_equalsFunctionDeclaration.js → _ObjectType/ObjectType_equalsFunctionDeclaration.js} +3 -7
  100. package/dist/generators/ts/_ObjectType/ObjectType_filterFunctionDeclaration.d.ts +5 -0
  101. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_filterFunctionDeclaration.js → _ObjectType/ObjectType_filterFunctionDeclaration.js} +3 -6
  102. package/dist/generators/ts/_ObjectType/ObjectType_filterTypeDeclaration.d.ts +5 -0
  103. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_filterTypeDeclaration.js → _ObjectType/ObjectType_filterTypeDeclaration.js} +2 -5
  104. package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlConstructTriplesFunctionDeclaration.d.ts +5 -0
  105. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_focusSparqlConstructTriplesFunctionDeclaration.js → _ObjectType/ObjectType_focusSparqlConstructTriplesFunctionDeclaration.js} +2 -6
  106. package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlWherePatternsFunctionDeclaration.d.ts +5 -0
  107. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_focusSparqlWherePatternsFunctionDeclaration.js → _ObjectType/ObjectType_focusSparqlWherePatternsFunctionDeclaration.js} +5 -24
  108. package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclaration.d.ts +5 -0
  109. package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclaration.js +18 -0
  110. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionDeclaration.d.ts +5 -0
  111. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionDeclaration.js +51 -0
  112. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunctionDeclaration.d.ts +5 -0
  113. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunctionDeclaration.js +15 -0
  114. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfTypeVariableStatement.d.ts +5 -0
  115. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_fromRdfTypeVariableStatement.js → _ObjectType/ObjectType_fromRdfTypeVariableStatement.js} +2 -2
  116. package/dist/generators/ts/_ObjectType/ObjectType_graphqlTypeVariableStatement.d.ts +5 -0
  117. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_graphqlTypeVariableStatement.js → _ObjectType/ObjectType_graphqlTypeVariableStatement.js} +4 -4
  118. package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionDeclarations.d.ts +4 -0
  119. package/dist/generators/ts/_ObjectType/ObjectType_hashFunctionDeclarations.js +41 -0
  120. package/dist/generators/ts/_ObjectType/ObjectType_interfaceDeclaration.d.ts +4 -0
  121. package/dist/generators/ts/_ObjectType/ObjectType_interfaceDeclaration.js +12 -0
  122. package/dist/generators/ts/_ObjectType/ObjectType_isTypeFunctionDeclaration.d.ts +5 -0
  123. package/dist/generators/ts/_ObjectType/ObjectType_isTypeFunctionDeclaration.js +20 -0
  124. package/dist/generators/ts/_ObjectType/ObjectType_jsonParseFunctionDeclaration.d.ts +5 -0
  125. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_jsonParseFunctionDeclaration.js → _ObjectType/ObjectType_jsonParseFunctionDeclaration.js} +2 -2
  126. package/dist/generators/ts/_ObjectType/ObjectType_jsonSchemaFunctionDeclaration.d.ts +5 -0
  127. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_jsonSchemaFunctionDeclaration.js → _ObjectType/ObjectType_jsonSchemaFunctionDeclaration.js} +5 -11
  128. package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeAliasDeclaration.d.ts +5 -0
  129. package/dist/generators/ts/_ObjectType/ObjectType_jsonTypeAliasDeclaration.js +9 -0
  130. package/dist/generators/ts/_ObjectType/ObjectType_jsonUiSchemaFunctionDeclaration.d.ts +5 -0
  131. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_jsonUiSchemaFunctionDeclaration.js → _ObjectType/ObjectType_jsonUiSchemaFunctionDeclaration.js} +4 -6
  132. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_objectSetMethodNames.d.ts → _ObjectType/ObjectType_objectSetMethodNames.d.ts} +3 -3
  133. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_objectSetMethodNames.js → _ObjectType/ObjectType_objectSetMethodNames.js} +4 -4
  134. package/dist/generators/ts/_ObjectType/ObjectType_schemaVariableStatement.d.ts +5 -0
  135. package/dist/generators/ts/_ObjectType/ObjectType_schemaVariableStatement.js +12 -0
  136. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_sparqlConstructQueryFunctionDeclaration.d.ts → _ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.d.ts} +3 -3
  137. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_sparqlConstructQueryFunctionDeclaration.js → _ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.js} +5 -5
  138. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_sparqlConstructQueryStringFunctionDeclaration.d.ts → _ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.d.ts} +3 -3
  139. package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryStringFunctionDeclaration.js +12 -0
  140. package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionDeclaration.d.ts +5 -0
  141. package/dist/generators/ts/_ObjectType/ObjectType_toJsonFunctionDeclaration.js +20 -0
  142. package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionDeclaration.d.ts +5 -0
  143. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_toRdfResourceFunctionDeclaration.js → _ObjectType/ObjectType_toRdfResourceFunctionDeclaration.js} +4 -4
  144. package/dist/generators/ts/_ObjectType/ObjectType_toStringFunctionDeclarations.d.ts +4 -0
  145. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_toStringFunctionDeclarations.js → _ObjectType/ObjectType_toStringFunctionDeclarations.js} +7 -14
  146. package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionDeclaration.d.ts +5 -0
  147. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_valueSparqlConstructTriplesFunctionDeclaration.js → _ObjectType/ObjectType_valueSparqlConstructTriplesFunctionDeclaration.js} +3 -3
  148. package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionDeclaration.d.ts +5 -0
  149. package/dist/generators/ts/{_NamedObjectType/NamedObjectType_valueSparqlWherePatternsFunctionDeclaration.js → _ObjectType/ObjectType_valueSparqlWherePatternsFunctionDeclaration.js} +3 -3
  150. package/dist/generators/ts/{_NamedObjectType → _ObjectType}/ShaclProperty.js +12 -12
  151. package/dist/generators/ts/_ObjectType/identifierTypeDeclarations.d.ts +4 -0
  152. package/dist/generators/ts/_ObjectType/identifierTypeDeclarations.js +16 -0
  153. package/dist/generators/ts/_snippets/snippets_convertToArraySet.d.ts +3 -0
  154. package/dist/generators/ts/_snippets/snippets_convertToArraySet.js +8 -0
  155. package/dist/generators/ts/_snippets/snippets_convertToList.d.ts +3 -0
  156. package/dist/generators/ts/_snippets/snippets_convertToList.js +7 -0
  157. package/dist/generators/ts/_snippets/snippets_convertToScalarSet.d.ts +3 -0
  158. package/dist/generators/ts/_snippets/snippets_convertToScalarSet.js +15 -0
  159. package/dist/input/generated.d.ts +758 -117
  160. package/dist/input/generated.js +636 -128
  161. package/package.json +4 -6
  162. package/dist/generators/ts/AbstractNamedUnionType.d.ts +0 -30
  163. package/dist/generators/ts/AbstractNamedUnionType.js +0 -190
  164. package/dist/generators/ts/AnonymousUnionType.d.ts +0 -27
  165. package/dist/generators/ts/AnonymousUnionType.js +0 -59
  166. package/dist/generators/ts/NamedObjectType.js +0 -342
  167. package/dist/generators/ts/NamedObjectUnionType.d.ts +0 -37
  168. package/dist/generators/ts/NamedUnionType.d.ts +0 -11
  169. package/dist/generators/ts/NamedUnionType.js +0 -13
  170. package/dist/generators/ts/_NamedObjectType/NamedObjectType_createFunctionDeclaration.d.ts +0 -5
  171. package/dist/generators/ts/_NamedObjectType/NamedObjectType_createFunctionDeclaration.js +0 -65
  172. package/dist/generators/ts/_NamedObjectType/NamedObjectType_equalsFunctionDeclaration.d.ts +0 -5
  173. package/dist/generators/ts/_NamedObjectType/NamedObjectType_filterFunctionDeclaration.d.ts +0 -5
  174. package/dist/generators/ts/_NamedObjectType/NamedObjectType_filterTypeDeclaration.d.ts +0 -5
  175. package/dist/generators/ts/_NamedObjectType/NamedObjectType_focusSparqlConstructTriplesFunctionDeclaration.d.ts +0 -5
  176. package/dist/generators/ts/_NamedObjectType/NamedObjectType_focusSparqlWherePatternsFunctionDeclaration.d.ts +0 -5
  177. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromJsonFunctionDeclaration.d.ts +0 -5
  178. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromJsonFunctionDeclaration.js +0 -43
  179. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceFunctionDeclaration.d.ts +0 -5
  180. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceFunctionDeclaration.js +0 -80
  181. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceValuesFunctionDeclaration.d.ts +0 -5
  182. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceValuesFunctionDeclaration.js +0 -15
  183. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfTypeVariableStatement.d.ts +0 -5
  184. package/dist/generators/ts/_NamedObjectType/NamedObjectType_graphqlTypeVariableStatement.d.ts +0 -5
  185. package/dist/generators/ts/_NamedObjectType/NamedObjectType_hashFunctionDeclarations.d.ts +0 -4
  186. package/dist/generators/ts/_NamedObjectType/NamedObjectType_hashFunctionDeclarations.js +0 -45
  187. package/dist/generators/ts/_NamedObjectType/NamedObjectType_interfaceDeclaration.d.ts +0 -4
  188. package/dist/generators/ts/_NamedObjectType/NamedObjectType_interfaceDeclaration.js +0 -16
  189. package/dist/generators/ts/_NamedObjectType/NamedObjectType_isTypeFunctionDeclaration.d.ts +0 -5
  190. package/dist/generators/ts/_NamedObjectType/NamedObjectType_isTypeFunctionDeclaration.js +0 -17
  191. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonParseFunctionDeclaration.d.ts +0 -5
  192. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonSchemaFunctionDeclaration.d.ts +0 -5
  193. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonTypeAliasDeclaration.d.ts +0 -5
  194. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonTypeAliasDeclaration.js +0 -16
  195. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonUiSchemaFunctionDeclaration.d.ts +0 -5
  196. package/dist/generators/ts/_NamedObjectType/NamedObjectType_schemaVariableStatement.d.ts +0 -5
  197. package/dist/generators/ts/_NamedObjectType/NamedObjectType_schemaVariableStatement.js +0 -12
  198. package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryStringFunctionDeclaration.js +0 -12
  199. package/dist/generators/ts/_NamedObjectType/NamedObjectType_toJsonFunctionDeclaration.d.ts +0 -5
  200. package/dist/generators/ts/_NamedObjectType/NamedObjectType_toJsonFunctionDeclaration.js +0 -41
  201. package/dist/generators/ts/_NamedObjectType/NamedObjectType_toRdfResourceFunctionDeclaration.d.ts +0 -5
  202. package/dist/generators/ts/_NamedObjectType/NamedObjectType_toStringFunctionDeclarations.d.ts +0 -4
  203. package/dist/generators/ts/_NamedObjectType/NamedObjectType_valueSparqlConstructTriplesFunctionDeclaration.d.ts +0 -5
  204. package/dist/generators/ts/_NamedObjectType/NamedObjectType_valueSparqlWherePatternsFunctionDeclaration.d.ts +0 -5
  205. package/dist/generators/ts/_NamedObjectType/identifierTypeDeclarations.d.ts +0 -4
  206. package/dist/generators/ts/_NamedObjectType/identifierTypeDeclarations.js +0 -25
  207. package/dist/generators/ts/_snippets/snippets_convertToArray.d.ts +0 -3
  208. package/dist/generators/ts/_snippets/snippets_convertToArray.js +0 -8
  209. /package/dist/generators/ts/{_NamedObjectType → _ObjectType}/Property.d.ts +0 -0
  210. /package/dist/generators/ts/{_NamedObjectType → _ObjectType}/Property.js +0 -0
  211. /package/dist/generators/ts/{_NamedObjectType → _ObjectType}/ShaclProperty.d.ts +0 -0
@@ -15,11 +15,6 @@ function $compactRecord(record) {
15
15
  return definedProperties;
16
16
  }, {});
17
17
  }
18
- function $convertToArray(convertToItem, _readonly) {
19
- return (value) => (typeof value === "undefined"
20
- ? Either.of([])
21
- : Either.sequence(value.map(convertToItem)));
22
- }
23
18
  function $convertToIdentifier(value) {
24
19
  switch (typeof value) {
25
20
  case "object":
@@ -56,6 +51,9 @@ function $convertToIri(value) {
56
51
  return Either.of(dataFactory.namedNode(value));
57
52
  }
58
53
  }
54
+ function $convertToList(convertToItem, _readonly) {
55
+ return (value) => Either.sequence(value.map(convertToItem));
56
+ }
59
57
  function $convertToLiteral(value) {
60
58
  if (typeof value === "object") {
61
59
  if (value instanceof Date) {
@@ -80,6 +78,19 @@ function $convertToMaybe(convertToItem) {
80
78
  return convertToItem(value).map(Maybe.of);
81
79
  };
82
80
  }
81
+ function $convertToScalarSet(convertToItem, _readonly) {
82
+ return (value) => {
83
+ if (typeof value === "undefined") {
84
+ return Either.of([]);
85
+ }
86
+ if (Array.isArray(value)) {
87
+ return Either.sequence(value.map(convertToItem));
88
+ }
89
+ return convertToItem(value).map((value) => [
90
+ value,
91
+ ]);
92
+ };
93
+ }
83
94
  function $convertWithDefaultValue(convertToItem, defaultValue) {
84
95
  return (value) => {
85
96
  if (typeof value === "undefined") {
@@ -282,25 +293,30 @@ export var PropertyShape;
282
293
  function create(parameters) {
283
294
  return $sequenceRecord({
284
295
  $identifier: $convertToIdentifierProperty(parameters.$identifier),
285
- and: $convertToMaybe($convertToArray($convertToIdentifier, true))(parameters.and).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.and.type, value)),
286
- classes: $convertToArray(($convertToIri), true)(parameters.classes).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.classes.type, value)),
296
+ and: $convertToMaybe($convertToList($convertToIdentifier, true))(parameters.and).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.and.type, value)),
297
+ classes: $convertToScalarSet(($convertToIri), true)(parameters.classes).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.classes.type, value)),
287
298
  comment: $convertToMaybe($identityConversionFunction)(parameters.comment).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.comment.type, value)),
288
299
  datatype: $convertToMaybe(($convertToIri))(parameters.datatype).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.datatype.type, value)),
289
300
  deactivated: $convertToMaybe($identityConversionFunction)(parameters.deactivated).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.deactivated.type, value)),
290
301
  defaultValue: $convertToMaybe($identityConversionFunction)(parameters.defaultValue).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.defaultValue.type, value)),
291
302
  description: $convertToMaybe($identityConversionFunction)(parameters.description).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.description.type, value)),
303
+ disjoint: $convertToScalarSet(($convertToIri), true)(parameters.disjoint).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.disjoint.type, value)),
292
304
  display: $convertWithDefaultValue($identityConversionFunction, false)(parameters.display),
293
- flags: $convertToArray($identityConversionFunction, true)(parameters.flags).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.flags.type, value)),
294
- groups: $convertToArray($convertToIdentifier, true)(parameters.groups).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.groups.type, value)),
295
- hasValues: $convertToArray($identityConversionFunction, true)(parameters.hasValues).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.hasValues.type, value)),
296
- in_: $convertToMaybe($convertToArray($identityConversionFunction, true))(parameters.in_).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.in_.type, value)),
305
+ equals: $convertToScalarSet(($convertToIri), true)(parameters.equals).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.equals.type, value)),
306
+ flags: $convertToMaybe($identityConversionFunction)(parameters.flags).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.flags.type, value)),
307
+ groups: $convertToScalarSet($convertToIdentifier, true)(parameters.groups).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.groups.type, value)),
308
+ hasValues: $convertToScalarSet($identityConversionFunction, true)(parameters.hasValues).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.hasValues.type, value)),
309
+ in_: $convertToMaybe($convertToList($identityConversionFunction, true))(parameters.in_).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.in_.type, value)),
297
310
  isDefinedBy: $convertToMaybe($convertToIdentifier)(parameters.isDefinedBy).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.isDefinedBy.type, value)),
298
311
  label: $convertToMaybe($identityConversionFunction)(parameters.label).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.label.type, value)),
299
- languageIn: $convertToMaybe($convertToArray($identityConversionFunction, true))(parameters.languageIn).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.languageIn.type, value)),
312
+ languageIn: $convertToMaybe($convertToList($identityConversionFunction, true))(parameters.languageIn).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.languageIn.type, value)),
313
+ lessThan: $convertToScalarSet(($convertToIri), true)(parameters.lessThan).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.lessThan.type, value)),
314
+ lessThanOrEquals: $convertToScalarSet(($convertToIri), true)(parameters.lessThanOrEquals).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.lessThanOrEquals.type, value)),
300
315
  maxCount: $convertToMaybe($identityConversionFunction)(parameters.maxCount).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxCount.type, value)),
301
316
  maxExclusive: $convertToMaybe($convertToLiteral)(parameters.maxExclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxExclusive.type, value)),
302
317
  maxInclusive: $convertToMaybe($convertToLiteral)(parameters.maxInclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxInclusive.type, value)),
303
318
  maxLength: $convertToMaybe($identityConversionFunction)(parameters.maxLength).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxLength.type, value)),
319
+ message: $convertToMaybe($identityConversionFunction)(parameters.message).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.message.type, value)),
304
320
  minCount: $convertToMaybe($identityConversionFunction)(parameters.minCount).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minCount.type, value)),
305
321
  minExclusive: $convertToMaybe($convertToLiteral)(parameters.minExclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minExclusive.type, value)),
306
322
  minInclusive: $convertToMaybe($convertToLiteral)(parameters.minInclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minInclusive.type, value)),
@@ -309,15 +325,24 @@ export var PropertyShape;
309
325
  name: $convertToMaybe($identityConversionFunction)(parameters.name).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.name.type, value)),
310
326
  node: $convertToMaybe($convertToIdentifier)(parameters.node).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.node.type, value)),
311
327
  nodeKind: $convertToMaybe(($convertToIri))(parameters.nodeKind).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.nodeKind.type, value)),
312
- not: $convertToArray($convertToIdentifier, true)(parameters.not).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.not.type, value)),
313
- or: $convertToMaybe($convertToArray($convertToIdentifier, true))(parameters.or).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.or.type, value)),
328
+ not: $convertToScalarSet($convertToIdentifier, true)(parameters.not).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.not.type, value)),
329
+ or: $convertToMaybe($convertToList($convertToIdentifier, true))(parameters.or).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.or.type, value)),
314
330
  order: $convertToMaybe($identityConversionFunction)(parameters.order).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.order.type, value)),
315
331
  path: Either.of(parameters.path),
316
- patterns: $convertToArray($identityConversionFunction, true)(parameters.patterns).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.patterns.type, value)),
332
+ pattern: $convertToMaybe($identityConversionFunction)(parameters.pattern).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.pattern.type, value)),
333
+ qualifiedMaxCount: $convertToMaybe($identityConversionFunction)(parameters.qualifiedMaxCount).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.qualifiedMaxCount.type, value)),
334
+ qualifiedMinCount: $convertToMaybe($identityConversionFunction)(parameters.qualifiedMinCount).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.qualifiedMinCount.type, value)),
335
+ qualifiedValueShape: $convertToMaybe($convertToIdentifier)(parameters.qualifiedValueShape).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.qualifiedValueShape.type, value)),
336
+ qualifiedValueShapesDisjoint: $convertToMaybe($identityConversionFunction)(parameters.qualifiedValueShapesDisjoint).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.qualifiedValueShapesDisjoint.type, value)),
317
337
  resolve: $convertToMaybe($convertToIdentifier)(parameters.resolve).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.resolve.type, value)),
338
+ severity: $convertToMaybe(($convertToIri))(parameters.severity).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.severity.type, value)),
318
339
  shaclmateName: $convertToMaybe($identityConversionFunction)(parameters.shaclmateName).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.shaclmateName.type, value)),
340
+ targetClasses: $convertToScalarSet(($convertToIri), true)(parameters.targetClasses).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.targetClasses.type, value)),
341
+ targetNodes: $convertToScalarSet($identityConversionFunction, true)(parameters.targetNodes).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.targetNodes.type, value)),
342
+ targetObjectsOf: $convertToScalarSet(($convertToIri), true)(parameters.targetObjectsOf).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.targetObjectsOf.type, value)),
343
+ targetSubjectsOf: $convertToScalarSet(($convertToIri), true)(parameters.targetSubjectsOf).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.targetSubjectsOf.type, value)),
319
344
  uniqueLang: $convertToMaybe($identityConversionFunction)(parameters.uniqueLang).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.uniqueLang.type, value)),
320
- xone: $convertToMaybe($convertToArray($convertToIdentifier, true))(parameters.xone).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.xone.type, value)),
345
+ xone: $convertToMaybe($convertToList($convertToIdentifier, true))(parameters.xone).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.xone.type, value)),
321
346
  }).map((properties) => $monkeyPatchObject({ ...properties, $type: "PropertyShape" }, { $toString }));
322
347
  }
323
348
  PropertyShape.create = create;
@@ -462,6 +487,19 @@ export var PropertyShape;
462
487
  value: Maybe.empty(),
463
488
  })),
464
489
  }),
490
+ disjoint: $shaclPropertyFromRdf({
491
+ graph: _$options.graph,
492
+ resource: $resource,
493
+ propertySchema: PropertyShape.schema.properties.disjoint,
494
+ typeFromRdf: (resourceValues) => resourceValues
495
+ .chain((values) => values.chainMap((value) => value.toIri()))
496
+ .map((values) => values.toArray())
497
+ .map((valuesArray) => Resource.Values.fromValue({
498
+ focusResource: $resource,
499
+ propertyPath: PropertyShape.schema.properties.disjoint.path,
500
+ value: valuesArray,
501
+ })),
502
+ }),
465
503
  display: $shaclPropertyFromRdf({
466
504
  graph: _$options.graph,
467
505
  resource: $resource,
@@ -477,20 +515,34 @@ export var PropertyShape;
477
515
  }).toValues())
478
516
  .chain((values) => values.chainMap((value) => value.toBoolean())),
479
517
  }),
480
- flags: $shaclPropertyFromRdf({
518
+ equals: $shaclPropertyFromRdf({
481
519
  graph: _$options.graph,
482
520
  resource: $resource,
483
- propertySchema: PropertyShape.schema.properties.flags,
521
+ propertySchema: PropertyShape.schema.properties.equals,
484
522
  typeFromRdf: (resourceValues) => resourceValues
485
- .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
486
- .chain((values) => values.chainMap((value) => value.toString()))
523
+ .chain((values) => values.chainMap((value) => value.toIri()))
487
524
  .map((values) => values.toArray())
488
525
  .map((valuesArray) => Resource.Values.fromValue({
489
526
  focusResource: $resource,
490
- propertyPath: PropertyShape.schema.properties.flags.path,
527
+ propertyPath: PropertyShape.schema.properties.equals.path,
491
528
  value: valuesArray,
492
529
  })),
493
530
  }),
531
+ flags: $shaclPropertyFromRdf({
532
+ graph: _$options.graph,
533
+ resource: $resource,
534
+ propertySchema: PropertyShape.schema.properties.flags,
535
+ typeFromRdf: (resourceValues) => resourceValues
536
+ .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
537
+ .chain((values) => values.chainMap((value) => value.toString()))
538
+ .map((values) => values.length > 0
539
+ ? values.map((value) => Maybe.of(value))
540
+ : Resource.Values.fromValue({
541
+ focusResource: $resource,
542
+ propertyPath: PropertyShape.schema.properties.flags.path,
543
+ value: Maybe.empty(),
544
+ })),
545
+ }),
494
546
  groups: $shaclPropertyFromRdf({
495
547
  graph: _$options.graph,
496
548
  resource: $resource,
@@ -614,6 +666,32 @@ export var PropertyShape;
614
666
  value: Maybe.empty(),
615
667
  })),
616
668
  }),
669
+ lessThan: $shaclPropertyFromRdf({
670
+ graph: _$options.graph,
671
+ resource: $resource,
672
+ propertySchema: PropertyShape.schema.properties.lessThan,
673
+ typeFromRdf: (resourceValues) => resourceValues
674
+ .chain((values) => values.chainMap((value) => value.toIri()))
675
+ .map((values) => values.toArray())
676
+ .map((valuesArray) => Resource.Values.fromValue({
677
+ focusResource: $resource,
678
+ propertyPath: PropertyShape.schema.properties.lessThan.path,
679
+ value: valuesArray,
680
+ })),
681
+ }),
682
+ lessThanOrEquals: $shaclPropertyFromRdf({
683
+ graph: _$options.graph,
684
+ resource: $resource,
685
+ propertySchema: PropertyShape.schema.properties.lessThanOrEquals,
686
+ typeFromRdf: (resourceValues) => resourceValues
687
+ .chain((values) => values.chainMap((value) => value.toIri()))
688
+ .map((values) => values.toArray())
689
+ .map((valuesArray) => Resource.Values.fromValue({
690
+ focusResource: $resource,
691
+ propertyPath: PropertyShape.schema.properties.lessThanOrEquals.path,
692
+ value: valuesArray,
693
+ })),
694
+ }),
617
695
  maxCount: $shaclPropertyFromRdf({
618
696
  graph: _$options.graph,
619
697
  resource: $resource,
@@ -672,6 +750,21 @@ export var PropertyShape;
672
750
  value: Maybe.empty(),
673
751
  })),
674
752
  }),
753
+ message: $shaclPropertyFromRdf({
754
+ graph: _$options.graph,
755
+ resource: $resource,
756
+ propertySchema: PropertyShape.schema.properties.message,
757
+ typeFromRdf: (resourceValues) => resourceValues
758
+ .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
759
+ .chain((values) => values.chainMap((value) => value.toString()))
760
+ .map((values) => values.length > 0
761
+ ? values.map((value) => Maybe.of(value))
762
+ : Resource.Values.fromValue({
763
+ focusResource: $resource,
764
+ propertyPath: PropertyShape.schema.properties.message.path,
765
+ value: Maybe.empty(),
766
+ })),
767
+ }),
675
768
  minCount: $shaclPropertyFromRdf({
676
769
  graph: _$options.graph,
677
770
  resource: $resource,
@@ -854,19 +947,78 @@ export var PropertyShape;
854
947
  propertyPath: PropertyShape.schema.properties.path.path,
855
948
  }),
856
949
  }),
857
- patterns: $shaclPropertyFromRdf({
950
+ pattern: $shaclPropertyFromRdf({
858
951
  graph: _$options.graph,
859
952
  resource: $resource,
860
- propertySchema: PropertyShape.schema.properties.patterns,
953
+ propertySchema: PropertyShape.schema.properties.pattern,
861
954
  typeFromRdf: (resourceValues) => resourceValues
862
955
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
863
956
  .chain((values) => values.chainMap((value) => value.toString()))
864
- .map((values) => values.toArray())
865
- .map((valuesArray) => Resource.Values.fromValue({
866
- focusResource: $resource,
867
- propertyPath: PropertyShape.schema.properties.patterns.path,
868
- value: valuesArray,
869
- })),
957
+ .map((values) => values.length > 0
958
+ ? values.map((value) => Maybe.of(value))
959
+ : Resource.Values.fromValue({
960
+ focusResource: $resource,
961
+ propertyPath: PropertyShape.schema.properties.pattern.path,
962
+ value: Maybe.empty(),
963
+ })),
964
+ }),
965
+ qualifiedMaxCount: $shaclPropertyFromRdf({
966
+ graph: _$options.graph,
967
+ resource: $resource,
968
+ propertySchema: PropertyShape.schema.properties.qualifiedMaxCount,
969
+ typeFromRdf: (resourceValues) => resourceValues
970
+ .chain((values) => values.chainMap((value) => value.toBigInt()))
971
+ .map((values) => values.length > 0
972
+ ? values.map((value) => Maybe.of(value))
973
+ : Resource.Values.fromValue({
974
+ focusResource: $resource,
975
+ propertyPath: PropertyShape.schema.properties.qualifiedMaxCount.path,
976
+ value: Maybe.empty(),
977
+ })),
978
+ }),
979
+ qualifiedMinCount: $shaclPropertyFromRdf({
980
+ graph: _$options.graph,
981
+ resource: $resource,
982
+ propertySchema: PropertyShape.schema.properties.qualifiedMinCount,
983
+ typeFromRdf: (resourceValues) => resourceValues
984
+ .chain((values) => values.chainMap((value) => value.toBigInt()))
985
+ .map((values) => values.length > 0
986
+ ? values.map((value) => Maybe.of(value))
987
+ : Resource.Values.fromValue({
988
+ focusResource: $resource,
989
+ propertyPath: PropertyShape.schema.properties.qualifiedMinCount.path,
990
+ value: Maybe.empty(),
991
+ })),
992
+ }),
993
+ qualifiedValueShape: $shaclPropertyFromRdf({
994
+ graph: _$options.graph,
995
+ resource: $resource,
996
+ propertySchema: PropertyShape.schema.properties.qualifiedValueShape,
997
+ typeFromRdf: (resourceValues) => resourceValues
998
+ .chain((values) => values.chainMap((value) => value.toIdentifier()))
999
+ .map((values) => values.length > 0
1000
+ ? values.map((value) => Maybe.of(value))
1001
+ : Resource.Values.fromValue({
1002
+ focusResource: $resource,
1003
+ propertyPath: PropertyShape.schema.properties.qualifiedValueShape
1004
+ .path,
1005
+ value: Maybe.empty(),
1006
+ })),
1007
+ }),
1008
+ qualifiedValueShapesDisjoint: $shaclPropertyFromRdf({
1009
+ graph: _$options.graph,
1010
+ resource: $resource,
1011
+ propertySchema: PropertyShape.schema.properties.qualifiedValueShapesDisjoint,
1012
+ typeFromRdf: (resourceValues) => resourceValues
1013
+ .chain((values) => values.chainMap((value) => value.toBoolean()))
1014
+ .map((values) => values.length > 0
1015
+ ? values.map((value) => Maybe.of(value))
1016
+ : Resource.Values.fromValue({
1017
+ focusResource: $resource,
1018
+ propertyPath: PropertyShape.schema.properties
1019
+ .qualifiedValueShapesDisjoint.path,
1020
+ value: Maybe.empty(),
1021
+ })),
870
1022
  }),
871
1023
  resolve: $shaclPropertyFromRdf({
872
1024
  graph: _$options.graph,
@@ -882,6 +1034,24 @@ export var PropertyShape;
882
1034
  value: Maybe.empty(),
883
1035
  })),
884
1036
  }),
1037
+ severity: $shaclPropertyFromRdf({
1038
+ graph: _$options.graph,
1039
+ resource: $resource,
1040
+ propertySchema: PropertyShape.schema.properties.severity,
1041
+ typeFromRdf: (resourceValues) => resourceValues
1042
+ .chain((values) => values.chainMap((value) => value.toIri([
1043
+ dataFactory.namedNode("http://www.w3.org/ns/shacl#Info"),
1044
+ dataFactory.namedNode("http://www.w3.org/ns/shacl#Warning"),
1045
+ dataFactory.namedNode("http://www.w3.org/ns/shacl#Violation"),
1046
+ ])))
1047
+ .map((values) => values.length > 0
1048
+ ? values.map((value) => Maybe.of(value))
1049
+ : Resource.Values.fromValue({
1050
+ focusResource: $resource,
1051
+ propertyPath: PropertyShape.schema.properties.severity.path,
1052
+ value: Maybe.empty(),
1053
+ })),
1054
+ }),
885
1055
  shaclmateName: $shaclPropertyFromRdf({
886
1056
  graph: _$options.graph,
887
1057
  resource: $resource,
@@ -897,6 +1067,71 @@ export var PropertyShape;
897
1067
  value: Maybe.empty(),
898
1068
  })),
899
1069
  }),
1070
+ targetClasses: $shaclPropertyFromRdf({
1071
+ graph: _$options.graph,
1072
+ resource: $resource,
1073
+ propertySchema: PropertyShape.schema.properties.targetClasses,
1074
+ typeFromRdf: (resourceValues) => resourceValues
1075
+ .chain((values) => values.chainMap((value) => value.toIri()))
1076
+ .map((values) => values.toArray())
1077
+ .map((valuesArray) => Resource.Values.fromValue({
1078
+ focusResource: $resource,
1079
+ propertyPath: PropertyShape.schema.properties.targetClasses.path,
1080
+ value: valuesArray,
1081
+ })),
1082
+ }),
1083
+ targetNodes: $shaclPropertyFromRdf({
1084
+ graph: _$options.graph,
1085
+ resource: $resource,
1086
+ propertySchema: PropertyShape.schema.properties.targetNodes,
1087
+ typeFromRdf: (resourceValues) => resourceValues
1088
+ .chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
1089
+ switch (term.termType) {
1090
+ case "NamedNode":
1091
+ case "Literal":
1092
+ return Either.of(term);
1093
+ default:
1094
+ return Left(new Resource.MistypedTermValueError({
1095
+ actualValue: term,
1096
+ expectedValueType: "(NamedNode | Literal)",
1097
+ focusResource: $resource,
1098
+ propertyPath: PropertyShape.schema.properties.targetNodes.path,
1099
+ }));
1100
+ }
1101
+ })))
1102
+ .map((values) => values.toArray())
1103
+ .map((valuesArray) => Resource.Values.fromValue({
1104
+ focusResource: $resource,
1105
+ propertyPath: PropertyShape.schema.properties.targetNodes.path,
1106
+ value: valuesArray,
1107
+ })),
1108
+ }),
1109
+ targetObjectsOf: $shaclPropertyFromRdf({
1110
+ graph: _$options.graph,
1111
+ resource: $resource,
1112
+ propertySchema: PropertyShape.schema.properties.targetObjectsOf,
1113
+ typeFromRdf: (resourceValues) => resourceValues
1114
+ .chain((values) => values.chainMap((value) => value.toIri()))
1115
+ .map((values) => values.toArray())
1116
+ .map((valuesArray) => Resource.Values.fromValue({
1117
+ focusResource: $resource,
1118
+ propertyPath: PropertyShape.schema.properties.targetObjectsOf.path,
1119
+ value: valuesArray,
1120
+ })),
1121
+ }),
1122
+ targetSubjectsOf: $shaclPropertyFromRdf({
1123
+ graph: _$options.graph,
1124
+ resource: $resource,
1125
+ propertySchema: PropertyShape.schema.properties.targetSubjectsOf,
1126
+ typeFromRdf: (resourceValues) => resourceValues
1127
+ .chain((values) => values.chainMap((value) => value.toIri()))
1128
+ .map((values) => values.toArray())
1129
+ .map((valuesArray) => Resource.Values.fromValue({
1130
+ focusResource: $resource,
1131
+ propertyPath: PropertyShape.schema.properties.targetSubjectsOf.path,
1132
+ value: valuesArray,
1133
+ })),
1134
+ }),
900
1135
  uniqueLang: $shaclPropertyFromRdf({
901
1136
  graph: _$options.graph,
902
1137
  resource: $resource,
@@ -1003,6 +1238,11 @@ export var PropertyShape;
1003
1238
  itemType: { kind: "String" },
1004
1239
  },
1005
1240
  },
1241
+ disjoint: {
1242
+ kind: "Shacl",
1243
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#disjoint"),
1244
+ type: { kind: "Set", itemType: { kind: "Iri" } },
1245
+ },
1006
1246
  display: {
1007
1247
  kind: "Shacl",
1008
1248
  path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#display"),
@@ -1012,10 +1252,18 @@ export var PropertyShape;
1012
1252
  defaultValue: false,
1013
1253
  },
1014
1254
  },
1255
+ equals: {
1256
+ kind: "Shacl",
1257
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#equals"),
1258
+ type: { kind: "Set", itemType: { kind: "Iri" } },
1259
+ },
1015
1260
  flags: {
1016
1261
  kind: "Shacl",
1017
1262
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#flags"),
1018
- type: { kind: "Set", itemType: { kind: "String" } },
1263
+ type: {
1264
+ kind: "Option",
1265
+ itemType: { kind: "String" },
1266
+ },
1019
1267
  },
1020
1268
  groups: {
1021
1269
  kind: "Shacl",
@@ -1068,6 +1316,16 @@ export var PropertyShape;
1068
1316
  },
1069
1317
  },
1070
1318
  },
1319
+ lessThan: {
1320
+ kind: "Shacl",
1321
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#lessThan"),
1322
+ type: { kind: "Set", itemType: { kind: "Iri" } },
1323
+ },
1324
+ lessThanOrEquals: {
1325
+ kind: "Shacl",
1326
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#lessThanOrEquals"),
1327
+ type: { kind: "Set", itemType: { kind: "Iri" } },
1328
+ },
1071
1329
  maxCount: {
1072
1330
  kind: "Shacl",
1073
1331
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"),
@@ -1100,6 +1358,14 @@ export var PropertyShape;
1100
1358
  itemType: { kind: "BigInt" },
1101
1359
  },
1102
1360
  },
1361
+ message: {
1362
+ kind: "Shacl",
1363
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#message"),
1364
+ type: {
1365
+ kind: "Option",
1366
+ itemType: { kind: "String" },
1367
+ },
1368
+ },
1103
1369
  minCount: {
1104
1370
  kind: "Shacl",
1105
1371
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"),
@@ -1205,10 +1471,45 @@ export var PropertyShape;
1205
1471
  return $PropertyPath.schema;
1206
1472
  },
1207
1473
  },
1208
- patterns: {
1474
+ pattern: {
1209
1475
  kind: "Shacl",
1210
1476
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#pattern"),
1211
- type: { kind: "Set", itemType: { kind: "String" } },
1477
+ type: {
1478
+ kind: "Option",
1479
+ itemType: { kind: "String" },
1480
+ },
1481
+ },
1482
+ qualifiedMaxCount: {
1483
+ kind: "Shacl",
1484
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#qualifiedMaxCount"),
1485
+ type: {
1486
+ kind: "Option",
1487
+ itemType: { kind: "BigInt" },
1488
+ },
1489
+ },
1490
+ qualifiedMinCount: {
1491
+ kind: "Shacl",
1492
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#qualifiedMinCount"),
1493
+ type: {
1494
+ kind: "Option",
1495
+ itemType: { kind: "BigInt" },
1496
+ },
1497
+ },
1498
+ qualifiedValueShape: {
1499
+ kind: "Shacl",
1500
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#qualifiedValueShape"),
1501
+ type: {
1502
+ kind: "Option",
1503
+ itemType: { kind: "Identifier" },
1504
+ },
1505
+ },
1506
+ qualifiedValueShapesDisjoint: {
1507
+ kind: "Shacl",
1508
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#qualifiedValueShapesDisjoint"),
1509
+ type: {
1510
+ kind: "Option",
1511
+ itemType: { kind: "Boolean" },
1512
+ },
1212
1513
  },
1213
1514
  resolve: {
1214
1515
  kind: "Shacl",
@@ -1218,6 +1519,21 @@ export var PropertyShape;
1218
1519
  itemType: { kind: "Identifier" },
1219
1520
  },
1220
1521
  },
1522
+ severity: {
1523
+ kind: "Shacl",
1524
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#severity"),
1525
+ type: {
1526
+ kind: "Option",
1527
+ itemType: {
1528
+ kind: "Iri",
1529
+ in: [
1530
+ dataFactory.namedNode("http://www.w3.org/ns/shacl#Info"),
1531
+ dataFactory.namedNode("http://www.w3.org/ns/shacl#Warning"),
1532
+ dataFactory.namedNode("http://www.w3.org/ns/shacl#Violation"),
1533
+ ],
1534
+ },
1535
+ },
1536
+ },
1221
1537
  shaclmateName: {
1222
1538
  kind: "Shacl",
1223
1539
  path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#name"),
@@ -1226,6 +1542,26 @@ export var PropertyShape;
1226
1542
  itemType: { kind: "String" },
1227
1543
  },
1228
1544
  },
1545
+ targetClasses: {
1546
+ kind: "Shacl",
1547
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetClass"),
1548
+ type: { kind: "Set", itemType: { kind: "Iri" } },
1549
+ },
1550
+ targetNodes: {
1551
+ kind: "Shacl",
1552
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetNode"),
1553
+ type: { kind: "Set", itemType: { kind: "Term" } },
1554
+ },
1555
+ targetObjectsOf: {
1556
+ kind: "Shacl",
1557
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetObjectsOf"),
1558
+ type: { kind: "Set", itemType: { kind: "Iri" } },
1559
+ },
1560
+ targetSubjectsOf: {
1561
+ kind: "Shacl",
1562
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetSubjectsOf"),
1563
+ type: { kind: "Set", itemType: { kind: "Iri" } },
1564
+ },
1229
1565
  uniqueLang: {
1230
1566
  kind: "Shacl",
1231
1567
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#uniqueLang"),
@@ -1287,12 +1623,16 @@ export var PropertyShape;
1287
1623
  parameters.resource.add(PropertyShape.schema.properties.description.path, parameters.object.description
1288
1624
  .toList()
1289
1625
  .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
1626
+ parameters.resource.add(PropertyShape.schema.properties.disjoint.path, parameters.object.disjoint.flatMap((item) => [item]), parameters.graph);
1290
1627
  parameters.resource.add(PropertyShape.schema.properties.display.path, $strictEquals(parameters.object.display, false).isLeft()
1291
1628
  ? [
1292
1629
  $literalFactory.boolean(parameters.object.display, $RdfVocabularies.xsd.boolean),
1293
1630
  ]
1294
1631
  : [], parameters.graph);
1295
- parameters.resource.add(PropertyShape.schema.properties.flags.path, parameters.object.flags.flatMap((item) => [$literalFactory.string(item)]), parameters.graph);
1632
+ parameters.resource.add(PropertyShape.schema.properties.equals.path, parameters.object.equals.flatMap((item) => [item]), parameters.graph);
1633
+ parameters.resource.add(PropertyShape.schema.properties.flags.path, parameters.object.flags
1634
+ .toList()
1635
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
1296
1636
  parameters.resource.add(PropertyShape.schema.properties.groups.path, parameters.object.groups.flatMap((item) => [item]), parameters.graph);
1297
1637
  parameters.resource.add(PropertyShape.schema.properties.hasValues.path, parameters.object.hasValues.flatMap((item) => [item]), parameters.graph);
1298
1638
  parameters.resource.add(PropertyShape.schema.properties.in_.path, parameters.object.in_.toList().flatMap((value) => [
@@ -1343,6 +1683,8 @@ export var PropertyShape;
1343
1683
  }).listResource.identifier
1344
1684
  : $RdfVocabularies.rdf.nil,
1345
1685
  ]), parameters.graph);
1686
+ parameters.resource.add(PropertyShape.schema.properties.lessThan.path, parameters.object.lessThan.flatMap((item) => [item]), parameters.graph);
1687
+ parameters.resource.add(PropertyShape.schema.properties.lessThanOrEquals.path, parameters.object.lessThanOrEquals.flatMap((item) => [item]), parameters.graph);
1346
1688
  parameters.resource.add(PropertyShape.schema.properties.maxCount.path, parameters.object.maxCount
1347
1689
  .toList()
1348
1690
  .flatMap((value) => [
@@ -1355,6 +1697,9 @@ export var PropertyShape;
1355
1697
  .flatMap((value) => [
1356
1698
  $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
1357
1699
  ]), parameters.graph);
1700
+ parameters.resource.add(PropertyShape.schema.properties.message.path, parameters.object.message
1701
+ .toList()
1702
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
1358
1703
  parameters.resource.add(PropertyShape.schema.properties.minCount.path, parameters.object.minCount
1359
1704
  .toList()
1360
1705
  .flatMap((value) => [
@@ -1411,13 +1756,34 @@ export var PropertyShape;
1411
1756
  resourceSet: parameters.resourceSet,
1412
1757
  }).identifier,
1413
1758
  ], parameters.graph);
1414
- parameters.resource.add(PropertyShape.schema.properties.patterns.path, parameters.object.patterns.flatMap((item) => [
1415
- $literalFactory.string(item),
1759
+ parameters.resource.add(PropertyShape.schema.properties.pattern.path, parameters.object.pattern
1760
+ .toList()
1761
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
1762
+ parameters.resource.add(PropertyShape.schema.properties.qualifiedMaxCount.path, parameters.object.qualifiedMaxCount
1763
+ .toList()
1764
+ .flatMap((value) => [
1765
+ $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
1766
+ ]), parameters.graph);
1767
+ parameters.resource.add(PropertyShape.schema.properties.qualifiedMinCount.path, parameters.object.qualifiedMinCount
1768
+ .toList()
1769
+ .flatMap((value) => [
1770
+ $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
1771
+ ]), parameters.graph);
1772
+ parameters.resource.add(PropertyShape.schema.properties.qualifiedValueShape.path, parameters.object.qualifiedValueShape.toList(), parameters.graph);
1773
+ parameters.resource.add(PropertyShape.schema.properties.qualifiedValueShapesDisjoint.path, parameters.object.qualifiedValueShapesDisjoint
1774
+ .toList()
1775
+ .flatMap((value) => [
1776
+ $literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
1416
1777
  ]), parameters.graph);
1417
1778
  parameters.resource.add(PropertyShape.schema.properties.resolve.path, parameters.object.resolve.toList(), parameters.graph);
1779
+ parameters.resource.add(PropertyShape.schema.properties.severity.path, parameters.object.severity.toList(), parameters.graph);
1418
1780
  parameters.resource.add(PropertyShape.schema.properties.shaclmateName.path, parameters.object.shaclmateName
1419
1781
  .toList()
1420
1782
  .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
1783
+ parameters.resource.add(PropertyShape.schema.properties.targetClasses.path, parameters.object.targetClasses.flatMap((item) => [item]), parameters.graph);
1784
+ parameters.resource.add(PropertyShape.schema.properties.targetNodes.path, parameters.object.targetNodes.flatMap((item) => [item]), parameters.graph);
1785
+ parameters.resource.add(PropertyShape.schema.properties.targetObjectsOf.path, parameters.object.targetObjectsOf.flatMap((item) => [item]), parameters.graph);
1786
+ parameters.resource.add(PropertyShape.schema.properties.targetSubjectsOf.path, parameters.object.targetSubjectsOf.flatMap((item) => [item]), parameters.graph);
1421
1787
  parameters.resource.add(PropertyShape.schema.properties.uniqueLang.path, parameters.object.uniqueLang
1422
1788
  .toList()
1423
1789
  .flatMap((value) => [
@@ -1726,44 +2092,48 @@ export var NodeShape;
1726
2092
  function create(parameters) {
1727
2093
  return $sequenceRecord({
1728
2094
  $identifier: $convertToIdentifierProperty(parameters?.$identifier),
1729
- and: $convertToMaybe($convertToArray($convertToIdentifier, true))(parameters?.and).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.and.type, value)),
1730
- classes: $convertToArray(($convertToIri), true)(parameters?.classes).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.classes.type, value)),
2095
+ and: $convertToMaybe($convertToList($convertToIdentifier, true))(parameters?.and).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.and.type, value)),
2096
+ classes: $convertToScalarSet(($convertToIri), true)(parameters?.classes).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.classes.type, value)),
1731
2097
  closed: $convertToMaybe($identityConversionFunction)(parameters?.closed).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.closed.type, value)),
1732
2098
  comment: $convertToMaybe($identityConversionFunction)(parameters?.comment).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.comment.type, value)),
1733
2099
  datatype: $convertToMaybe(($convertToIri))(parameters?.datatype).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.datatype.type, value)),
1734
2100
  deactivated: $convertToMaybe($identityConversionFunction)(parameters?.deactivated).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.deactivated.type, value)),
1735
2101
  discriminantValue: $convertToMaybe($identityConversionFunction)(parameters?.discriminantValue).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.discriminantValue.type, value)),
1736
2102
  extern: $convertToMaybe($identityConversionFunction)(parameters?.extern).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.extern.type, value)),
1737
- flags: $convertToArray($identityConversionFunction, true)(parameters?.flags).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.flags.type, value)),
2103
+ flags: $convertToMaybe($identityConversionFunction)(parameters?.flags).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.flags.type, value)),
1738
2104
  fromRdfType: $convertToMaybe(($convertToIri))(parameters?.fromRdfType).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.fromRdfType.type, value)),
1739
- hasValues: $convertToArray($identityConversionFunction, true)(parameters?.hasValues).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.hasValues.type, value)),
1740
- ignoredProperties: $convertToMaybe($convertToArray(($convertToIri), true))(parameters?.ignoredProperties).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(NodeShape.schema.properties.ignoredProperties.type, value)),
1741
- in_: $convertToMaybe($convertToArray($identityConversionFunction, true))(parameters?.in_).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.in_.type, value)),
2105
+ hasValues: $convertToScalarSet($identityConversionFunction, true)(parameters?.hasValues).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.hasValues.type, value)),
2106
+ ignoredProperties: $convertToMaybe($convertToList(($convertToIri), true))(parameters?.ignoredProperties).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(NodeShape.schema.properties.ignoredProperties.type, value)),
2107
+ in_: $convertToMaybe($convertToList($identityConversionFunction, true))(parameters?.in_).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.in_.type, value)),
1742
2108
  isDefinedBy: $convertToMaybe($convertToIdentifier)(parameters?.isDefinedBy).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.isDefinedBy.type, value)),
1743
2109
  label: $convertToMaybe($identityConversionFunction)(parameters?.label).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.label.type, value)),
1744
- languageIn: $convertToMaybe($convertToArray($identityConversionFunction, true))(parameters?.languageIn).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.languageIn.type, value)),
1745
- maxCount: $convertToMaybe($identityConversionFunction)(parameters?.maxCount).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxCount.type, value)),
2110
+ languageIn: $convertToMaybe($convertToList($identityConversionFunction, true))(parameters?.languageIn).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.languageIn.type, value)),
1746
2111
  maxExclusive: $convertToMaybe($convertToLiteral)(parameters?.maxExclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxExclusive.type, value)),
1747
2112
  maxInclusive: $convertToMaybe($convertToLiteral)(parameters?.maxInclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxInclusive.type, value)),
1748
2113
  maxLength: $convertToMaybe($identityConversionFunction)(parameters?.maxLength).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.maxLength.type, value)),
1749
- minCount: $convertToMaybe($identityConversionFunction)(parameters?.minCount).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minCount.type, value)),
2114
+ message: $convertToMaybe($identityConversionFunction)(parameters?.message).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.message.type, value)),
1750
2115
  minExclusive: $convertToMaybe($convertToLiteral)(parameters?.minExclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minExclusive.type, value)),
1751
2116
  minInclusive: $convertToMaybe($convertToLiteral)(parameters?.minInclusive).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minInclusive.type, value)),
1752
2117
  minLength: $convertToMaybe($identityConversionFunction)(parameters?.minLength).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.minLength.type, value)),
1753
2118
  mutable: $convertToMaybe($identityConversionFunction)(parameters?.mutable).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.mutable.type, value)),
1754
2119
  node: $convertToMaybe($convertToIdentifier)(parameters?.node).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.node.type, value)),
1755
2120
  nodeKind: $convertToMaybe(($convertToIri))(parameters?.nodeKind).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.nodeKind.type, value)),
1756
- not: $convertToArray($convertToIdentifier, true)(parameters?.not).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.not.type, value)),
1757
- or: $convertToMaybe($convertToArray($convertToIdentifier, true))(parameters?.or).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.or.type, value)),
1758
- patterns: $convertToArray($identityConversionFunction, true)(parameters?.patterns).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.patterns.type, value)),
1759
- properties: $convertToArray($convertToIdentifier, true)(parameters?.properties).chain((value) => $validateArray($identityValidationFunction, true)(NodeShape.schema.properties.properties.type, value)),
2121
+ not: $convertToScalarSet($convertToIdentifier, true)(parameters?.not).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.not.type, value)),
2122
+ or: $convertToMaybe($convertToList($convertToIdentifier, true))(parameters?.or).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.or.type, value)),
2123
+ pattern: $convertToMaybe($identityConversionFunction)(parameters?.pattern).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.pattern.type, value)),
2124
+ properties: $convertToScalarSet($convertToIdentifier, true)(parameters?.properties).chain((value) => $validateArray($identityValidationFunction, true)(NodeShape.schema.properties.properties.type, value)),
1760
2125
  rdfType: $convertToMaybe(($convertToIri))(parameters?.rdfType).chain((value) => $validateMaybe($identityValidationFunction)(NodeShape.schema.properties.rdfType.type, value)),
2126
+ severity: $convertToMaybe(($convertToIri))(parameters?.severity).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.severity.type, value)),
1761
2127
  shaclmateName: $convertToMaybe($identityConversionFunction)(parameters?.shaclmateName).chain((value) => $validateMaybe($identityValidationFunction)(PropertyShape.schema.properties.shaclmateName.type, value)),
1762
- subClassOf: $convertToArray(($convertToIri), true)(parameters?.subClassOf).chain((value) => $validateArray($identityValidationFunction, true)(NodeShape.schema.properties.subClassOf.type, value)),
1763
- toRdfTypes: $convertToArray(($convertToIri), true)(parameters?.toRdfTypes).chain((value) => $validateArray($identityValidationFunction, true)(NodeShape.schema.properties.toRdfTypes.type, value)),
1764
- tsImports: $convertToArray($identityConversionFunction, true)(parameters?.tsImports).chain((value) => $validateArray($identityValidationFunction, true)(NodeShape.schema.properties.tsImports.type, value)),
1765
- types: $convertToArray(($convertToIri), true)(parameters?.types).chain((value) => $validateArray($identityValidationFunction, true)(NodeShape.schema.properties.types.type, value)),
1766
- xone: $convertToMaybe($convertToArray($convertToIdentifier, true))(parameters?.xone).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.xone.type, value)),
2128
+ subClassOf: $convertToScalarSet(($convertToIri), true)(parameters?.subClassOf).chain((value) => $validateArray($identityValidationFunction, true)(NodeShape.schema.properties.subClassOf.type, value)),
2129
+ targetClasses: $convertToScalarSet(($convertToIri), true)(parameters?.targetClasses).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.targetClasses.type, value)),
2130
+ targetNodes: $convertToScalarSet($identityConversionFunction, true)(parameters?.targetNodes).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.targetNodes.type, value)),
2131
+ targetObjectsOf: $convertToScalarSet(($convertToIri), true)(parameters?.targetObjectsOf).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.targetObjectsOf.type, value)),
2132
+ targetSubjectsOf: $convertToScalarSet(($convertToIri), true)(parameters?.targetSubjectsOf).chain((value) => $validateArray($identityValidationFunction, true)(PropertyShape.schema.properties.targetSubjectsOf.type, value)),
2133
+ toRdfTypes: $convertToScalarSet(($convertToIri), true)(parameters?.toRdfTypes).chain((value) => $validateArray($identityValidationFunction, true)(NodeShape.schema.properties.toRdfTypes.type, value)),
2134
+ tsImports: $convertToScalarSet($identityConversionFunction, true)(parameters?.tsImports).chain((value) => $validateArray($identityValidationFunction, true)(NodeShape.schema.properties.tsImports.type, value)),
2135
+ types: $convertToScalarSet(($convertToIri), true)(parameters?.types).chain((value) => $validateArray($identityValidationFunction, true)(NodeShape.schema.properties.types.type, value)),
2136
+ xone: $convertToMaybe($convertToList($convertToIdentifier, true))(parameters?.xone).chain((value) => $validateMaybe($validateArray($identityValidationFunction, true))(PropertyShape.schema.properties.xone.type, value)),
1767
2137
  }).map((properties) => $monkeyPatchObject({ ...properties, $type: "NodeShape" }, { $toString }));
1768
2138
  }
1769
2139
  NodeShape.create = create;
@@ -1916,12 +2286,13 @@ export var NodeShape;
1916
2286
  typeFromRdf: (resourceValues) => resourceValues
1917
2287
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
1918
2288
  .chain((values) => values.chainMap((value) => value.toString()))
1919
- .map((values) => values.toArray())
1920
- .map((valuesArray) => Resource.Values.fromValue({
1921
- focusResource: $resource,
1922
- propertyPath: PropertyShape.schema.properties.flags.path,
1923
- value: valuesArray,
1924
- })),
2289
+ .map((values) => values.length > 0
2290
+ ? values.map((value) => Maybe.of(value))
2291
+ : Resource.Values.fromValue({
2292
+ focusResource: $resource,
2293
+ propertyPath: PropertyShape.schema.properties.flags.path,
2294
+ value: Maybe.empty(),
2295
+ })),
1925
2296
  }),
1926
2297
  fromRdfType: $shaclPropertyFromRdf({
1927
2298
  graph: _$options.graph,
@@ -2067,20 +2438,6 @@ export var NodeShape;
2067
2438
  value: Maybe.empty(),
2068
2439
  })),
2069
2440
  }),
2070
- maxCount: $shaclPropertyFromRdf({
2071
- graph: _$options.graph,
2072
- resource: $resource,
2073
- propertySchema: NodeShape.schema.properties.maxCount,
2074
- typeFromRdf: (resourceValues) => resourceValues
2075
- .chain((values) => values.chainMap((value) => value.toBigInt()))
2076
- .map((values) => values.length > 0
2077
- ? values.map((value) => Maybe.of(value))
2078
- : Resource.Values.fromValue({
2079
- focusResource: $resource,
2080
- propertyPath: PropertyShape.schema.properties.maxCount.path,
2081
- value: Maybe.empty(),
2082
- })),
2083
- }),
2084
2441
  maxExclusive: $shaclPropertyFromRdf({
2085
2442
  graph: _$options.graph,
2086
2443
  resource: $resource,
@@ -2125,17 +2482,18 @@ export var NodeShape;
2125
2482
  value: Maybe.empty(),
2126
2483
  })),
2127
2484
  }),
2128
- minCount: $shaclPropertyFromRdf({
2485
+ message: $shaclPropertyFromRdf({
2129
2486
  graph: _$options.graph,
2130
2487
  resource: $resource,
2131
- propertySchema: NodeShape.schema.properties.minCount,
2488
+ propertySchema: NodeShape.schema.properties.message,
2132
2489
  typeFromRdf: (resourceValues) => resourceValues
2133
- .chain((values) => values.chainMap((value) => value.toBigInt()))
2490
+ .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
2491
+ .chain((values) => values.chainMap((value) => value.toString()))
2134
2492
  .map((values) => values.length > 0
2135
2493
  ? values.map((value) => Maybe.of(value))
2136
2494
  : Resource.Values.fromValue({
2137
2495
  focusResource: $resource,
2138
- propertyPath: PropertyShape.schema.properties.minCount.path,
2496
+ propertyPath: PropertyShape.schema.properties.message.path,
2139
2497
  value: Maybe.empty(),
2140
2498
  })),
2141
2499
  }),
@@ -2265,19 +2623,20 @@ export var NodeShape;
2265
2623
  value: Maybe.empty(),
2266
2624
  })),
2267
2625
  }),
2268
- patterns: $shaclPropertyFromRdf({
2626
+ pattern: $shaclPropertyFromRdf({
2269
2627
  graph: _$options.graph,
2270
2628
  resource: $resource,
2271
- propertySchema: NodeShape.schema.properties.patterns,
2629
+ propertySchema: NodeShape.schema.properties.pattern,
2272
2630
  typeFromRdf: (resourceValues) => resourceValues
2273
2631
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
2274
2632
  .chain((values) => values.chainMap((value) => value.toString()))
2275
- .map((values) => values.toArray())
2276
- .map((valuesArray) => Resource.Values.fromValue({
2277
- focusResource: $resource,
2278
- propertyPath: PropertyShape.schema.properties.patterns.path,
2279
- value: valuesArray,
2280
- })),
2633
+ .map((values) => values.length > 0
2634
+ ? values.map((value) => Maybe.of(value))
2635
+ : Resource.Values.fromValue({
2636
+ focusResource: $resource,
2637
+ propertyPath: PropertyShape.schema.properties.pattern.path,
2638
+ value: Maybe.empty(),
2639
+ })),
2281
2640
  }),
2282
2641
  properties: $shaclPropertyFromRdf({
2283
2642
  graph: _$options.graph,
@@ -2306,6 +2665,24 @@ export var NodeShape;
2306
2665
  value: Maybe.empty(),
2307
2666
  })),
2308
2667
  }),
2668
+ severity: $shaclPropertyFromRdf({
2669
+ graph: _$options.graph,
2670
+ resource: $resource,
2671
+ propertySchema: NodeShape.schema.properties.severity,
2672
+ typeFromRdf: (resourceValues) => resourceValues
2673
+ .chain((values) => values.chainMap((value) => value.toIri([
2674
+ dataFactory.namedNode("http://www.w3.org/ns/shacl#Info"),
2675
+ dataFactory.namedNode("http://www.w3.org/ns/shacl#Warning"),
2676
+ dataFactory.namedNode("http://www.w3.org/ns/shacl#Violation"),
2677
+ ])))
2678
+ .map((values) => values.length > 0
2679
+ ? values.map((value) => Maybe.of(value))
2680
+ : Resource.Values.fromValue({
2681
+ focusResource: $resource,
2682
+ propertyPath: PropertyShape.schema.properties.severity.path,
2683
+ value: Maybe.empty(),
2684
+ })),
2685
+ }),
2309
2686
  shaclmateName: $shaclPropertyFromRdf({
2310
2687
  graph: _$options.graph,
2311
2688
  resource: $resource,
@@ -2334,6 +2711,71 @@ export var NodeShape;
2334
2711
  value: valuesArray,
2335
2712
  })),
2336
2713
  }),
2714
+ targetClasses: $shaclPropertyFromRdf({
2715
+ graph: _$options.graph,
2716
+ resource: $resource,
2717
+ propertySchema: NodeShape.schema.properties.targetClasses,
2718
+ typeFromRdf: (resourceValues) => resourceValues
2719
+ .chain((values) => values.chainMap((value) => value.toIri()))
2720
+ .map((values) => values.toArray())
2721
+ .map((valuesArray) => Resource.Values.fromValue({
2722
+ focusResource: $resource,
2723
+ propertyPath: PropertyShape.schema.properties.targetClasses.path,
2724
+ value: valuesArray,
2725
+ })),
2726
+ }),
2727
+ targetNodes: $shaclPropertyFromRdf({
2728
+ graph: _$options.graph,
2729
+ resource: $resource,
2730
+ propertySchema: NodeShape.schema.properties.targetNodes,
2731
+ typeFromRdf: (resourceValues) => resourceValues
2732
+ .chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
2733
+ switch (term.termType) {
2734
+ case "NamedNode":
2735
+ case "Literal":
2736
+ return Either.of(term);
2737
+ default:
2738
+ return Left(new Resource.MistypedTermValueError({
2739
+ actualValue: term,
2740
+ expectedValueType: "(NamedNode | Literal)",
2741
+ focusResource: $resource,
2742
+ propertyPath: PropertyShape.schema.properties.targetNodes.path,
2743
+ }));
2744
+ }
2745
+ })))
2746
+ .map((values) => values.toArray())
2747
+ .map((valuesArray) => Resource.Values.fromValue({
2748
+ focusResource: $resource,
2749
+ propertyPath: PropertyShape.schema.properties.targetNodes.path,
2750
+ value: valuesArray,
2751
+ })),
2752
+ }),
2753
+ targetObjectsOf: $shaclPropertyFromRdf({
2754
+ graph: _$options.graph,
2755
+ resource: $resource,
2756
+ propertySchema: NodeShape.schema.properties.targetObjectsOf,
2757
+ typeFromRdf: (resourceValues) => resourceValues
2758
+ .chain((values) => values.chainMap((value) => value.toIri()))
2759
+ .map((values) => values.toArray())
2760
+ .map((valuesArray) => Resource.Values.fromValue({
2761
+ focusResource: $resource,
2762
+ propertyPath: PropertyShape.schema.properties.targetObjectsOf.path,
2763
+ value: valuesArray,
2764
+ })),
2765
+ }),
2766
+ targetSubjectsOf: $shaclPropertyFromRdf({
2767
+ graph: _$options.graph,
2768
+ resource: $resource,
2769
+ propertySchema: NodeShape.schema.properties.targetSubjectsOf,
2770
+ typeFromRdf: (resourceValues) => resourceValues
2771
+ .chain((values) => values.chainMap((value) => value.toIri()))
2772
+ .map((values) => values.toArray())
2773
+ .map((valuesArray) => Resource.Values.fromValue({
2774
+ focusResource: $resource,
2775
+ propertyPath: PropertyShape.schema.properties.targetSubjectsOf.path,
2776
+ value: valuesArray,
2777
+ })),
2778
+ }),
2337
2779
  toRdfTypes: $shaclPropertyFromRdf({
2338
2780
  graph: _$options.graph,
2339
2781
  resource: $resource,
@@ -2480,7 +2922,10 @@ export var NodeShape;
2480
2922
  flags: {
2481
2923
  kind: "Shacl",
2482
2924
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#flags"),
2483
- type: { kind: "Set", itemType: { kind: "String" } },
2925
+ type: {
2926
+ kind: "Option",
2927
+ itemType: { kind: "String" },
2928
+ },
2484
2929
  },
2485
2930
  fromRdfType: {
2486
2931
  kind: "Shacl",
@@ -2541,14 +2986,6 @@ export var NodeShape;
2541
2986
  },
2542
2987
  },
2543
2988
  },
2544
- maxCount: {
2545
- kind: "Shacl",
2546
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"),
2547
- type: {
2548
- kind: "Option",
2549
- itemType: { kind: "BigInt" },
2550
- },
2551
- },
2552
2989
  maxExclusive: {
2553
2990
  kind: "Shacl",
2554
2991
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxExclusive"),
@@ -2573,12 +3010,12 @@ export var NodeShape;
2573
3010
  itemType: { kind: "BigInt" },
2574
3011
  },
2575
3012
  },
2576
- minCount: {
3013
+ message: {
2577
3014
  kind: "Shacl",
2578
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"),
3015
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#message"),
2579
3016
  type: {
2580
3017
  kind: "Option",
2581
- itemType: { kind: "BigInt" },
3018
+ itemType: { kind: "String" },
2582
3019
  },
2583
3020
  },
2584
3021
  minExclusive: {
@@ -2658,10 +3095,13 @@ export var NodeShape;
2658
3095
  },
2659
3096
  },
2660
3097
  },
2661
- patterns: {
3098
+ pattern: {
2662
3099
  kind: "Shacl",
2663
3100
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#pattern"),
2664
- type: { kind: "Set", itemType: { kind: "String" } },
3101
+ type: {
3102
+ kind: "Option",
3103
+ itemType: { kind: "String" },
3104
+ },
2665
3105
  },
2666
3106
  properties: {
2667
3107
  kind: "Shacl",
@@ -2676,6 +3116,21 @@ export var NodeShape;
2676
3116
  path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#rdfType"),
2677
3117
  type: { kind: "Option", itemType: { kind: "Iri" } },
2678
3118
  },
3119
+ severity: {
3120
+ kind: "Shacl",
3121
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#severity"),
3122
+ type: {
3123
+ kind: "Option",
3124
+ itemType: {
3125
+ kind: "Iri",
3126
+ in: [
3127
+ dataFactory.namedNode("http://www.w3.org/ns/shacl#Info"),
3128
+ dataFactory.namedNode("http://www.w3.org/ns/shacl#Warning"),
3129
+ dataFactory.namedNode("http://www.w3.org/ns/shacl#Violation"),
3130
+ ],
3131
+ },
3132
+ },
3133
+ },
2679
3134
  shaclmateName: {
2680
3135
  kind: "Shacl",
2681
3136
  path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#name"),
@@ -2689,6 +3144,26 @@ export var NodeShape;
2689
3144
  path: $RdfVocabularies.rdfs.subClassOf,
2690
3145
  type: { kind: "Set", itemType: { kind: "Iri" } },
2691
3146
  },
3147
+ targetClasses: {
3148
+ kind: "Shacl",
3149
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetClass"),
3150
+ type: { kind: "Set", itemType: { kind: "Iri" } },
3151
+ },
3152
+ targetNodes: {
3153
+ kind: "Shacl",
3154
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetNode"),
3155
+ type: { kind: "Set", itemType: { kind: "Term" } },
3156
+ },
3157
+ targetObjectsOf: {
3158
+ kind: "Shacl",
3159
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetObjectsOf"),
3160
+ type: { kind: "Set", itemType: { kind: "Iri" } },
3161
+ },
3162
+ targetSubjectsOf: {
3163
+ kind: "Shacl",
3164
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetSubjectsOf"),
3165
+ type: { kind: "Set", itemType: { kind: "Iri" } },
3166
+ },
2692
3167
  toRdfTypes: {
2693
3168
  kind: "Shacl",
2694
3169
  path: dataFactory.namedNode("http://purl.org/shaclmate/ontology#toRdfType"),
@@ -2766,7 +3241,9 @@ export var NodeShape;
2766
3241
  .flatMap((value) => [
2767
3242
  $literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
2768
3243
  ]), parameters.graph);
2769
- parameters.resource.add(PropertyShape.schema.properties.flags.path, parameters.object.flags.flatMap((item) => [$literalFactory.string(item)]), parameters.graph);
3244
+ parameters.resource.add(PropertyShape.schema.properties.flags.path, parameters.object.flags
3245
+ .toList()
3246
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
2770
3247
  parameters.resource.add(NodeShape.schema.properties.fromRdfType.path, parameters.object.fromRdfType.toList(), parameters.graph);
2771
3248
  parameters.resource.add(PropertyShape.schema.properties.hasValues.path, parameters.object.hasValues.flatMap((item) => [item]), parameters.graph);
2772
3249
  parameters.resource.add(NodeShape.schema.properties.ignoredProperties.path, parameters.object.ignoredProperties.toList().flatMap((value) => [
@@ -2839,11 +3316,6 @@ export var NodeShape;
2839
3316
  }).listResource.identifier
2840
3317
  : $RdfVocabularies.rdf.nil,
2841
3318
  ]), parameters.graph);
2842
- parameters.resource.add(PropertyShape.schema.properties.maxCount.path, parameters.object.maxCount
2843
- .toList()
2844
- .flatMap((value) => [
2845
- $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
2846
- ]), parameters.graph);
2847
3319
  parameters.resource.add(PropertyShape.schema.properties.maxExclusive.path, parameters.object.maxExclusive.toList(), parameters.graph);
2848
3320
  parameters.resource.add(PropertyShape.schema.properties.maxInclusive.path, parameters.object.maxInclusive.toList(), parameters.graph);
2849
3321
  parameters.resource.add(PropertyShape.schema.properties.maxLength.path, parameters.object.maxLength
@@ -2851,11 +3323,9 @@ export var NodeShape;
2851
3323
  .flatMap((value) => [
2852
3324
  $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
2853
3325
  ]), parameters.graph);
2854
- parameters.resource.add(PropertyShape.schema.properties.minCount.path, parameters.object.minCount
3326
+ parameters.resource.add(PropertyShape.schema.properties.message.path, parameters.object.message
2855
3327
  .toList()
2856
- .flatMap((value) => [
2857
- $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
2858
- ]), parameters.graph);
3328
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
2859
3329
  parameters.resource.add(PropertyShape.schema.properties.minExclusive.path, parameters.object.minExclusive.toList(), parameters.graph);
2860
3330
  parameters.resource.add(PropertyShape.schema.properties.minInclusive.path, parameters.object.minInclusive.toList(), parameters.graph);
2861
3331
  parameters.resource.add(PropertyShape.schema.properties.minLength.path, parameters.object.minLength
@@ -2893,15 +3363,20 @@ export var NodeShape;
2893
3363
  }).listResource.identifier
2894
3364
  : $RdfVocabularies.rdf.nil,
2895
3365
  ]), parameters.graph);
2896
- parameters.resource.add(PropertyShape.schema.properties.patterns.path, parameters.object.patterns.flatMap((item) => [
2897
- $literalFactory.string(item),
2898
- ]), parameters.graph);
3366
+ parameters.resource.add(PropertyShape.schema.properties.pattern.path, parameters.object.pattern
3367
+ .toList()
3368
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
2899
3369
  parameters.resource.add(NodeShape.schema.properties.properties.path, parameters.object.properties.flatMap((item) => [item]), parameters.graph);
2900
3370
  parameters.resource.add(NodeShape.schema.properties.rdfType.path, parameters.object.rdfType.toList(), parameters.graph);
3371
+ parameters.resource.add(PropertyShape.schema.properties.severity.path, parameters.object.severity.toList(), parameters.graph);
2901
3372
  parameters.resource.add(PropertyShape.schema.properties.shaclmateName.path, parameters.object.shaclmateName
2902
3373
  .toList()
2903
3374
  .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
2904
3375
  parameters.resource.add(NodeShape.schema.properties.subClassOf.path, parameters.object.subClassOf.flatMap((item) => [item]), parameters.graph);
3376
+ parameters.resource.add(PropertyShape.schema.properties.targetClasses.path, parameters.object.targetClasses.flatMap((item) => [item]), parameters.graph);
3377
+ parameters.resource.add(PropertyShape.schema.properties.targetNodes.path, parameters.object.targetNodes.flatMap((item) => [item]), parameters.graph);
3378
+ parameters.resource.add(PropertyShape.schema.properties.targetObjectsOf.path, parameters.object.targetObjectsOf.flatMap((item) => [item]), parameters.graph);
3379
+ parameters.resource.add(PropertyShape.schema.properties.targetSubjectsOf.path, parameters.object.targetSubjectsOf.flatMap((item) => [item]), parameters.graph);
2905
3380
  parameters.resource.add(NodeShape.schema.properties.toRdfTypes.path, parameters.object.toRdfTypes.flatMap((item) => [item]), parameters.graph);
2906
3381
  parameters.resource.add(NodeShape.schema.properties.tsImports.path, parameters.object.tsImports.flatMap((item) => [
2907
3382
  $literalFactory.string(item),
@@ -2995,7 +3470,7 @@ export var Shape;
2995
3470
  }
2996
3471
  Shape.isShape = isShape;
2997
3472
  Shape.schema = {
2998
- kind: "NamedObjectUnion",
3473
+ kind: "ObjectUnion",
2999
3474
  members: {
3000
3475
  NodeShape: { discriminantValues: ["NodeShape"], type: NodeShape.schema },
3001
3476
  PropertyShape: {
@@ -3044,7 +3519,10 @@ export var Shape;
3044
3519
  flags: {
3045
3520
  kind: "Shacl",
3046
3521
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#flags"),
3047
- type: { kind: "Set", itemType: { kind: "String" } },
3522
+ type: {
3523
+ kind: "Option",
3524
+ itemType: { kind: "String" },
3525
+ },
3048
3526
  },
3049
3527
  hasValues: {
3050
3528
  kind: "Shacl",
@@ -3089,14 +3567,6 @@ export var Shape;
3089
3567
  },
3090
3568
  },
3091
3569
  },
3092
- maxCount: {
3093
- kind: "Shacl",
3094
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"),
3095
- type: {
3096
- kind: "Option",
3097
- itemType: { kind: "BigInt" },
3098
- },
3099
- },
3100
3570
  maxExclusive: {
3101
3571
  kind: "Shacl",
3102
3572
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#maxExclusive"),
@@ -3121,12 +3591,12 @@ export var Shape;
3121
3591
  itemType: { kind: "BigInt" },
3122
3592
  },
3123
3593
  },
3124
- minCount: {
3594
+ message: {
3125
3595
  kind: "Shacl",
3126
- path: dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"),
3596
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#message"),
3127
3597
  type: {
3128
3598
  kind: "Option",
3129
- itemType: { kind: "BigInt" },
3599
+ itemType: { kind: "String" },
3130
3600
  },
3131
3601
  },
3132
3602
  minExclusive: {
@@ -3206,10 +3676,28 @@ export var Shape;
3206
3676
  },
3207
3677
  },
3208
3678
  },
3209
- patterns: {
3679
+ pattern: {
3210
3680
  kind: "Shacl",
3211
3681
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#pattern"),
3212
- type: { kind: "Set", itemType: { kind: "String" } },
3682
+ type: {
3683
+ kind: "Option",
3684
+ itemType: { kind: "String" },
3685
+ },
3686
+ },
3687
+ severity: {
3688
+ kind: "Shacl",
3689
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#severity"),
3690
+ type: {
3691
+ kind: "Option",
3692
+ itemType: {
3693
+ kind: "Iri",
3694
+ in: [
3695
+ dataFactory.namedNode("http://www.w3.org/ns/shacl#Info"),
3696
+ dataFactory.namedNode("http://www.w3.org/ns/shacl#Warning"),
3697
+ dataFactory.namedNode("http://www.w3.org/ns/shacl#Violation"),
3698
+ ],
3699
+ },
3700
+ },
3213
3701
  },
3214
3702
  shaclmateName: {
3215
3703
  kind: "Shacl",
@@ -3219,6 +3707,26 @@ export var Shape;
3219
3707
  itemType: { kind: "String" },
3220
3708
  },
3221
3709
  },
3710
+ targetClasses: {
3711
+ kind: "Shacl",
3712
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetClass"),
3713
+ type: { kind: "Set", itemType: { kind: "Iri" } },
3714
+ },
3715
+ targetNodes: {
3716
+ kind: "Shacl",
3717
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetNode"),
3718
+ type: { kind: "Set", itemType: { kind: "Term" } },
3719
+ },
3720
+ targetObjectsOf: {
3721
+ kind: "Shacl",
3722
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetObjectsOf"),
3723
+ type: { kind: "Set", itemType: { kind: "Iri" } },
3724
+ },
3725
+ targetSubjectsOf: {
3726
+ kind: "Shacl",
3727
+ path: dataFactory.namedNode("http://www.w3.org/ns/shacl#targetSubjectsOf"),
3728
+ type: { kind: "Set", itemType: { kind: "Iri" } },
3729
+ },
3222
3730
  xone: {
3223
3731
  kind: "Shacl",
3224
3732
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#xone"),
@@ -3336,7 +3844,7 @@ export var $Object;
3336
3844
  Identifier.stringify = NTriplesTerm.stringify;
3337
3845
  })(Identifier = $Object.Identifier || ($Object.Identifier = {}));
3338
3846
  $Object.schema = {
3339
- kind: "NamedObjectUnion",
3847
+ kind: "ObjectUnion",
3340
3848
  members: {
3341
3849
  NodeShape: { discriminantValues: ["NodeShape"], type: NodeShape.schema },
3342
3850
  Ontology: { discriminantValues: ["Ontology"], type: Ontology.schema },