@shaclmate/compiler 4.0.29 → 4.0.31

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 (353) hide show
  1. package/dist/_ShapesGraphToAstTransformer/shapeAstTypeName.js +0 -4
  2. package/dist/generators/ts/AbstractCollectionType.js +13 -15
  3. package/dist/generators/ts/AbstractDateType.js +6 -8
  4. package/dist/generators/ts/AbstractIdentifierType.d.ts +1 -1
  5. package/dist/generators/ts/AbstractIdentifierType.js +9 -5
  6. package/dist/generators/ts/AbstractLazyObjectType.d.ts +2 -3
  7. package/dist/generators/ts/AbstractLazyObjectType.js +2 -5
  8. package/dist/generators/ts/AbstractLiteralType.js +2 -3
  9. package/dist/generators/ts/AbstractNamedUnionType.js +39 -41
  10. package/dist/generators/ts/AbstractNumericType.js +8 -11
  11. package/dist/generators/ts/AbstractPrimitiveType.js +1 -2
  12. package/dist/generators/ts/AbstractTermType.js +12 -14
  13. package/dist/generators/ts/AbstractType.d.ts +9 -2
  14. package/dist/generators/ts/AbstractType.js +15 -5
  15. package/dist/generators/ts/AbstractUnionType.d.ts +3 -0
  16. package/dist/generators/ts/AbstractUnionType.js +37 -28
  17. package/dist/generators/ts/BigDecimalType.d.ts +3 -3
  18. package/dist/generators/ts/BigDecimalType.js +24 -21
  19. package/dist/generators/ts/BigIntType.d.ts +1 -1
  20. package/dist/generators/ts/BigIntType.js +9 -5
  21. package/dist/generators/ts/BlankNodeType.js +9 -11
  22. package/dist/generators/ts/BooleanType.d.ts +1 -1
  23. package/dist/generators/ts/BooleanType.js +13 -11
  24. package/dist/generators/ts/DateTimeType.d.ts +1 -1
  25. package/dist/generators/ts/DateTimeType.js +14 -3
  26. package/dist/generators/ts/DateType.d.ts +1 -1
  27. package/dist/generators/ts/DateType.js +14 -3
  28. package/dist/generators/ts/DefaultValueType.js +5 -8
  29. package/dist/generators/ts/FloatType.d.ts +1 -1
  30. package/dist/generators/ts/FloatType.js +13 -2
  31. package/dist/generators/ts/IdentifierType.js +9 -11
  32. package/dist/generators/ts/{imports.d.ts → Imports.d.ts} +3 -3
  33. package/dist/generators/ts/Imports.js +41 -0
  34. package/dist/generators/ts/IntType.d.ts +1 -1
  35. package/dist/generators/ts/IntType.js +13 -2
  36. package/dist/generators/ts/IriType.js +15 -20
  37. package/dist/generators/ts/LazyObjectOptionType.d.ts +8 -8
  38. package/dist/generators/ts/LazyObjectOptionType.js +21 -26
  39. package/dist/generators/ts/LazyObjectSetType.d.ts +5 -1
  40. package/dist/generators/ts/LazyObjectSetType.js +12 -20
  41. package/dist/generators/ts/LazyObjectType.d.ts +5 -1
  42. package/dist/generators/ts/LazyObjectType.js +20 -18
  43. package/dist/generators/ts/ListType.js +12 -15
  44. package/dist/generators/ts/LiteralType.js +8 -10
  45. package/dist/generators/ts/NamedObjectType.d.ts +1 -3
  46. package/dist/generators/ts/NamedObjectType.js +33 -32
  47. package/dist/generators/ts/NamedObjectUnionType.js +37 -29
  48. package/dist/generators/ts/OptionType.js +13 -15
  49. package/dist/generators/ts/Reusables.d.ts +11 -0
  50. package/dist/generators/ts/Reusables.js +14 -0
  51. package/dist/generators/ts/SetType.js +4 -6
  52. package/dist/generators/ts/Snippet.d.ts +3 -0
  53. package/dist/generators/ts/Snippet.js +2 -0
  54. package/dist/generators/ts/SnippetFactory.d.ts +14 -0
  55. package/dist/generators/ts/SnippetFactory.js +2 -0
  56. package/dist/generators/ts/Snippets.d.ts +126 -0
  57. package/dist/generators/ts/Snippets.js +825 -0
  58. package/dist/generators/ts/StringType.d.ts +2 -2
  59. package/dist/generators/ts/StringType.js +14 -12
  60. package/dist/generators/ts/TermType.js +14 -17
  61. package/dist/generators/ts/TsGenerator.d.ts +7 -1
  62. package/dist/generators/ts/TsGenerator.js +90 -14
  63. package/dist/generators/ts/TypeFactory.d.ts +4 -1
  64. package/dist/generators/ts/TypeFactory.js +29 -3
  65. package/dist/generators/ts/ZodGenerator.d.ts +1 -0
  66. package/dist/generators/ts/ZodGenerator.js +10 -8
  67. package/dist/generators/ts/_NamedObjectType/AbstractProperty.d.ts +9 -4
  68. package/dist/generators/ts/_NamedObjectType/AbstractProperty.js +10 -1
  69. package/dist/generators/ts/_NamedObjectType/DiscriminantProperty.d.ts +2 -2
  70. package/dist/generators/ts/_NamedObjectType/DiscriminantProperty.js +17 -24
  71. package/dist/generators/ts/_NamedObjectType/IdentifierProperty.d.ts +1 -1
  72. package/dist/generators/ts/_NamedObjectType/IdentifierProperty.js +10 -14
  73. package/dist/generators/ts/_NamedObjectType/NamedObjectType_createFunctionDeclaration.js +3 -4
  74. package/dist/generators/ts/_NamedObjectType/NamedObjectType_equalsFunctionDeclaration.js +2 -4
  75. package/dist/generators/ts/_NamedObjectType/NamedObjectType_filterFunctionDeclaration.js +1 -2
  76. package/dist/generators/ts/_NamedObjectType/NamedObjectType_filterTypeDeclaration.js +2 -3
  77. package/dist/generators/ts/_NamedObjectType/NamedObjectType_focusSparqlConstructTriplesFunctionDeclaration.js +7 -11
  78. package/dist/generators/ts/_NamedObjectType/NamedObjectType_focusSparqlWherePatternsFunctionDeclaration.js +11 -15
  79. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromJsonFunctionDeclaration.js +21 -3
  80. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceFunctionDeclaration.js +83 -8
  81. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfResourceValuesFunctionDeclaration.js +2 -4
  82. package/dist/generators/ts/_NamedObjectType/NamedObjectType_fromRdfTypeVariableStatement.js +1 -4
  83. package/dist/generators/ts/_NamedObjectType/NamedObjectType_graphqlTypeVariableStatement.js +1 -2
  84. package/dist/generators/ts/_NamedObjectType/NamedObjectType_hashFunctionDeclarations.js +4 -6
  85. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonParseFunctionDeclaration.js +3 -5
  86. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonSchemaFunctionDeclaration.js +1 -3
  87. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonTypeAliasDeclaration.js +1 -2
  88. package/dist/generators/ts/_NamedObjectType/NamedObjectType_jsonUiSchemaFunctionDeclaration.js +1 -2
  89. package/dist/generators/ts/_NamedObjectType/NamedObjectType_schemaVariableStatement.js +2 -3
  90. package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryFunctionDeclaration.d.ts +2 -0
  91. package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryFunctionDeclaration.js +4 -7
  92. package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryStringFunctionDeclaration.d.ts +2 -0
  93. package/dist/generators/ts/_NamedObjectType/NamedObjectType_sparqlConstructQueryStringFunctionDeclaration.js +2 -4
  94. package/dist/generators/ts/_NamedObjectType/NamedObjectType_toJsonFunctionDeclaration.js +2 -3
  95. package/dist/generators/ts/_NamedObjectType/NamedObjectType_toRdfResourceFunctionDeclaration.js +14 -23
  96. package/dist/generators/ts/_NamedObjectType/NamedObjectType_toStringFunctionDeclarations.js +4 -5
  97. package/dist/generators/ts/_NamedObjectType/NamedObjectType_valueSparqlConstructTriplesFunctionDeclaration.js +2 -4
  98. package/dist/generators/ts/_NamedObjectType/NamedObjectType_valueSparqlWherePatternsFunctionDeclaration.js +3 -5
  99. package/dist/generators/ts/_NamedObjectType/ShaclProperty.d.ts +1 -1
  100. package/dist/generators/ts/_NamedObjectType/ShaclProperty.js +12 -15
  101. package/dist/generators/ts/_NamedObjectType/identifierTypeDeclarations.js +4 -5
  102. package/dist/generators/ts/_snippets/snippets_BlankNodeFilter.d.ts +2 -1
  103. package/dist/generators/ts/_snippets/snippets_BlankNodeFilter.js +1 -2
  104. package/dist/generators/ts/_snippets/snippets_BlankNodeSchema.d.ts +2 -1
  105. package/dist/generators/ts/_snippets/snippets_BlankNodeSchema.js +1 -2
  106. package/dist/generators/ts/_snippets/snippets_BooleanFilter.d.ts +2 -1
  107. package/dist/generators/ts/_snippets/snippets_BooleanFilter.js +1 -2
  108. package/dist/generators/ts/_snippets/snippets_BooleanSchema.d.ts +2 -1
  109. package/dist/generators/ts/_snippets/snippets_BooleanSchema.js +1 -2
  110. package/dist/generators/ts/_snippets/snippets_CollectionFilter.d.ts +2 -1
  111. package/dist/generators/ts/_snippets/snippets_CollectionFilter.js +1 -2
  112. package/dist/generators/ts/_snippets/snippets_CollectionSchema.d.ts +2 -1
  113. package/dist/generators/ts/_snippets/snippets_CollectionSchema.js +1 -2
  114. package/dist/generators/ts/_snippets/snippets_DateFilter.d.ts +2 -1
  115. package/dist/generators/ts/_snippets/snippets_DateFilter.js +1 -2
  116. package/dist/generators/ts/_snippets/snippets_DateSchema.d.ts +2 -1
  117. package/dist/generators/ts/_snippets/snippets_DateSchema.js +1 -2
  118. package/dist/generators/ts/_snippets/snippets_DefaultValueSchema.d.ts +2 -1
  119. package/dist/generators/ts/_snippets/snippets_DefaultValueSchema.js +1 -3
  120. package/dist/generators/ts/_snippets/snippets_EqualsResult.d.ts +2 -1
  121. package/dist/generators/ts/_snippets/snippets_EqualsResult.js +1 -3
  122. package/dist/generators/ts/_snippets/snippets_FocusSparqlConstructTriplesFunction.d.ts +2 -1
  123. package/dist/generators/ts/_snippets/snippets_FocusSparqlConstructTriplesFunction.js +1 -3
  124. package/dist/generators/ts/_snippets/snippets_FocusSparqlWherePatternsFunction.d.ts +2 -1
  125. package/dist/generators/ts/_snippets/snippets_FocusSparqlWherePatternsFunction.js +2 -5
  126. package/dist/generators/ts/_snippets/snippets_FromRdfResourceFunction.d.ts +2 -1
  127. package/dist/generators/ts/_snippets/snippets_FromRdfResourceFunction.js +1 -3
  128. package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.d.ts +2 -1
  129. package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.js +1 -3
  130. package/dist/generators/ts/_snippets/snippets_Hasher.d.ts +2 -1
  131. package/dist/generators/ts/_snippets/snippets_Hasher.js +1 -2
  132. package/dist/generators/ts/_snippets/snippets_IdentifierFilter.d.ts +2 -1
  133. package/dist/generators/ts/_snippets/snippets_IdentifierFilter.js +1 -3
  134. package/dist/generators/ts/_snippets/snippets_IdentifierSchema.d.ts +2 -1
  135. package/dist/generators/ts/_snippets/snippets_IdentifierSchema.js +1 -2
  136. package/dist/generators/ts/_snippets/snippets_IdentifierSet.d.ts +2 -1
  137. package/dist/generators/ts/_snippets/snippets_IdentifierSet.js +1 -3
  138. package/dist/generators/ts/_snippets/snippets_IriFilter.d.ts +2 -1
  139. package/dist/generators/ts/_snippets/snippets_IriFilter.js +1 -3
  140. package/dist/generators/ts/_snippets/snippets_IriSchema.d.ts +2 -1
  141. package/dist/generators/ts/_snippets/snippets_IriSchema.js +1 -3
  142. package/dist/generators/ts/_snippets/snippets_LazyObject.d.ts +2 -1
  143. package/dist/generators/ts/_snippets/snippets_LazyObject.js +1 -3
  144. package/dist/generators/ts/_snippets/snippets_LazyObjectOption.d.ts +2 -1
  145. package/dist/generators/ts/_snippets/snippets_LazyObjectOption.js +1 -3
  146. package/dist/generators/ts/_snippets/snippets_LazyObjectSet.d.ts +2 -1
  147. package/dist/generators/ts/_snippets/snippets_LazyObjectSet.js +1 -3
  148. package/dist/generators/ts/_snippets/snippets_LiteralFilter.d.ts +2 -1
  149. package/dist/generators/ts/_snippets/snippets_LiteralFilter.js +2 -5
  150. package/dist/generators/ts/_snippets/snippets_LiteralSchema.d.ts +2 -1
  151. package/dist/generators/ts/_snippets/snippets_LiteralSchema.js +1 -3
  152. package/dist/generators/ts/_snippets/snippets_MaybeFilter.d.ts +2 -1
  153. package/dist/generators/ts/_snippets/snippets_MaybeFilter.js +1 -2
  154. package/dist/generators/ts/_snippets/snippets_MaybeSchema.d.ts +2 -1
  155. package/dist/generators/ts/_snippets/snippets_MaybeSchema.js +1 -2
  156. package/dist/generators/ts/_snippets/snippets_NumericFilter.d.ts +2 -1
  157. package/dist/generators/ts/_snippets/snippets_NumericFilter.js +1 -2
  158. package/dist/generators/ts/_snippets/snippets_NumericSchema.d.ts +2 -1
  159. package/dist/generators/ts/_snippets/snippets_NumericSchema.js +1 -2
  160. package/dist/generators/ts/_snippets/snippets_PropertyPath.d.ts +2 -1
  161. package/dist/generators/ts/_snippets/snippets_PropertyPath.js +8 -13
  162. package/dist/generators/ts/_snippets/snippets_RdfVocabularies.d.ts +2 -1
  163. package/dist/generators/ts/_snippets/snippets_RdfVocabularies.js +1 -3
  164. package/dist/generators/ts/_snippets/snippets_ShaclPropertySchema.d.ts +2 -1
  165. package/dist/generators/ts/_snippets/snippets_ShaclPropertySchema.js +2 -4
  166. package/dist/generators/ts/_snippets/snippets_SparqlFilterPattern.d.ts +2 -1
  167. package/dist/generators/ts/_snippets/snippets_SparqlFilterPattern.js +1 -3
  168. package/dist/generators/ts/_snippets/snippets_SparqlPattern.d.ts +2 -1
  169. package/dist/generators/ts/_snippets/snippets_SparqlPattern.js +1 -4
  170. package/dist/generators/ts/_snippets/snippets_SparqlPattern_isSolutionGenerating.d.ts +2 -1
  171. package/dist/generators/ts/_snippets/snippets_SparqlPattern_isSolutionGenerating.js +2 -4
  172. package/dist/generators/ts/_snippets/snippets_StringFilter.d.ts +2 -1
  173. package/dist/generators/ts/_snippets/snippets_StringFilter.js +1 -2
  174. package/dist/generators/ts/_snippets/snippets_StringSchema.d.ts +2 -1
  175. package/dist/generators/ts/_snippets/snippets_StringSchema.js +1 -2
  176. package/dist/generators/ts/_snippets/snippets_TermFilter.d.ts +2 -1
  177. package/dist/generators/ts/_snippets/snippets_TermFilter.js +1 -3
  178. package/dist/generators/ts/_snippets/snippets_TermSchema.d.ts +2 -1
  179. package/dist/generators/ts/_snippets/snippets_TermSchema.js +1 -3
  180. package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.d.ts +2 -1
  181. package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.js +9 -5
  182. package/dist/generators/ts/_snippets/snippets_ToRdfResourceValuesFunction.d.ts +2 -1
  183. package/dist/generators/ts/_snippets/snippets_ToRdfResourceValuesFunction.js +5 -6
  184. package/dist/generators/ts/_snippets/snippets_UnwrapR.d.ts +2 -1
  185. package/dist/generators/ts/_snippets/snippets_UnwrapR.js +1 -3
  186. package/dist/generators/ts/_snippets/snippets_ValueSparqlConstructTriplesFunction.d.ts +2 -1
  187. package/dist/generators/ts/_snippets/snippets_ValueSparqlConstructTriplesFunction.js +1 -3
  188. package/dist/generators/ts/_snippets/snippets_ValueSparqlWherePatternsFunction.d.ts +2 -1
  189. package/dist/generators/ts/_snippets/snippets_ValueSparqlWherePatternsFunction.js +3 -6
  190. package/dist/generators/ts/_snippets/snippets__FromRdfResourceFunction.d.ts +3 -0
  191. package/dist/generators/ts/_snippets/snippets__FromRdfResourceFunction.js +13 -0
  192. package/dist/generators/ts/_snippets/snippets__ToRdfResourceFunction.d.ts +3 -0
  193. package/dist/generators/ts/_snippets/snippets__ToRdfResourceFunction.js +12 -0
  194. package/dist/generators/ts/_snippets/snippets_arrayEquals.d.ts +2 -1
  195. package/dist/generators/ts/_snippets/snippets_arrayEquals.js +7 -10
  196. package/dist/generators/ts/_snippets/snippets_arrayIntersection.d.ts +2 -1
  197. package/dist/generators/ts/_snippets/snippets_arrayIntersection.js +1 -2
  198. package/dist/generators/ts/_snippets/snippets_bigDecimalLiteral.d.ts +2 -1
  199. package/dist/generators/ts/_snippets/snippets_bigDecimalLiteral.js +2 -5
  200. package/dist/generators/ts/_snippets/snippets_bigDecimalSparqlWherePatterns.d.ts +2 -1
  201. package/dist/generators/ts/_snippets/snippets_bigDecimalSparqlWherePatterns.js +11 -19
  202. package/dist/generators/ts/_snippets/snippets_blankNodeSparqlWherePatterns.d.ts +2 -1
  203. package/dist/generators/ts/_snippets/snippets_blankNodeSparqlWherePatterns.js +2 -6
  204. package/dist/generators/ts/_snippets/snippets_booleanEquals.d.ts +2 -1
  205. package/dist/generators/ts/_snippets/snippets_booleanEquals.js +4 -6
  206. package/dist/generators/ts/_snippets/snippets_booleanSparqlWherePatterns.d.ts +2 -1
  207. package/dist/generators/ts/_snippets/snippets_booleanSparqlWherePatterns.js +5 -12
  208. package/dist/generators/ts/_snippets/snippets_compactRecord.d.ts +2 -1
  209. package/dist/generators/ts/_snippets/snippets_compactRecord.js +1 -2
  210. package/dist/generators/ts/_snippets/snippets_dateEquals.d.ts +2 -1
  211. package/dist/generators/ts/_snippets/snippets_dateEquals.js +4 -6
  212. package/dist/generators/ts/_snippets/snippets_dateSparqlWherePatterns.d.ts +2 -1
  213. package/dist/generators/ts/_snippets/snippets_dateSparqlWherePatterns.js +9 -17
  214. package/dist/generators/ts/_snippets/snippets_decodeBigDecimalLiteral.d.ts +2 -1
  215. package/dist/generators/ts/_snippets/snippets_decodeBigDecimalLiteral.js +1 -3
  216. package/dist/generators/ts/_snippets/snippets_deduplicateSparqlPatterns.d.ts +2 -1
  217. package/dist/generators/ts/_snippets/snippets_deduplicateSparqlPatterns.js +3 -5
  218. package/dist/generators/ts/_snippets/snippets_defaultValueSparqlWherePatterns.d.ts +2 -1
  219. package/dist/generators/ts/_snippets/snippets_defaultValueSparqlWherePatterns.js +3 -7
  220. package/dist/generators/ts/_snippets/snippets_filterArray.d.ts +2 -1
  221. package/dist/generators/ts/_snippets/snippets_filterArray.js +2 -4
  222. package/dist/generators/ts/_snippets/snippets_filterBigDecimal.d.ts +2 -1
  223. package/dist/generators/ts/_snippets/snippets_filterBigDecimal.js +2 -5
  224. package/dist/generators/ts/_snippets/snippets_filterBlankNode.d.ts +2 -1
  225. package/dist/generators/ts/_snippets/snippets_filterBlankNode.js +2 -5
  226. package/dist/generators/ts/_snippets/snippets_filterBoolean.d.ts +2 -1
  227. package/dist/generators/ts/_snippets/snippets_filterBoolean.js +2 -4
  228. package/dist/generators/ts/_snippets/snippets_filterDate.d.ts +2 -1
  229. package/dist/generators/ts/_snippets/snippets_filterDate.js +2 -4
  230. package/dist/generators/ts/_snippets/snippets_filterIdentifier.d.ts +2 -1
  231. package/dist/generators/ts/_snippets/snippets_filterIdentifier.js +2 -5
  232. package/dist/generators/ts/_snippets/snippets_filterIri.d.ts +2 -1
  233. package/dist/generators/ts/_snippets/snippets_filterIri.js +2 -5
  234. package/dist/generators/ts/_snippets/snippets_filterLiteral.d.ts +2 -1
  235. package/dist/generators/ts/_snippets/snippets_filterLiteral.js +3 -7
  236. package/dist/generators/ts/_snippets/snippets_filterMaybe.d.ts +2 -1
  237. package/dist/generators/ts/_snippets/snippets_filterMaybe.js +2 -5
  238. package/dist/generators/ts/_snippets/snippets_filterNumeric.d.ts +2 -1
  239. package/dist/generators/ts/_snippets/snippets_filterNumeric.js +2 -4
  240. package/dist/generators/ts/_snippets/snippets_filterString.d.ts +2 -1
  241. package/dist/generators/ts/_snippets/snippets_filterString.js +2 -4
  242. package/dist/generators/ts/_snippets/snippets_filterTerm.d.ts +2 -1
  243. package/dist/generators/ts/_snippets/snippets_filterTerm.js +2 -5
  244. package/dist/generators/ts/_snippets/snippets_fromRdfLanguageIn.d.ts +2 -1
  245. package/dist/generators/ts/_snippets/snippets_fromRdfLanguageIn.js +1 -3
  246. package/dist/generators/ts/_snippets/snippets_fromRdfPreferredLanguages.d.ts +2 -1
  247. package/dist/generators/ts/_snippets/snippets_fromRdfPreferredLanguages.js +1 -3
  248. package/dist/generators/ts/_snippets/snippets_identifierSparqlWherePatterns.d.ts +2 -1
  249. package/dist/generators/ts/_snippets/snippets_identifierSparqlWherePatterns.js +4 -10
  250. package/dist/generators/ts/_snippets/snippets_iriSparqlWherePatterns.d.ts +2 -1
  251. package/dist/generators/ts/_snippets/snippets_iriSparqlWherePatterns.js +5 -12
  252. package/dist/generators/ts/_snippets/snippets_isReadonlyBigIntArray.d.ts +2 -1
  253. package/dist/generators/ts/_snippets/snippets_isReadonlyBigIntArray.js +1 -2
  254. package/dist/generators/ts/_snippets/snippets_isReadonlyBooleanArray.d.ts +2 -1
  255. package/dist/generators/ts/_snippets/snippets_isReadonlyBooleanArray.js +1 -2
  256. package/dist/generators/ts/_snippets/snippets_isReadonlyNumberArray.d.ts +2 -1
  257. package/dist/generators/ts/_snippets/snippets_isReadonlyNumberArray.js +1 -2
  258. package/dist/generators/ts/_snippets/snippets_isReadonlyObjectArray.d.ts +2 -1
  259. package/dist/generators/ts/_snippets/snippets_isReadonlyObjectArray.js +1 -2
  260. package/dist/generators/ts/_snippets/snippets_isReadonlyStringArray.d.ts +2 -1
  261. package/dist/generators/ts/_snippets/snippets_isReadonlyStringArray.js +1 -2
  262. package/dist/generators/ts/_snippets/snippets_liftSparqlPatterns.d.ts +2 -1
  263. package/dist/generators/ts/_snippets/snippets_liftSparqlPatterns.js +4 -7
  264. package/dist/generators/ts/_snippets/snippets_listSparqlConstructTriples.d.ts +2 -1
  265. package/dist/generators/ts/_snippets/snippets_listSparqlConstructTriples.js +6 -12
  266. package/dist/generators/ts/_snippets/snippets_listSparqlWherePatterns.d.ts +2 -1
  267. package/dist/generators/ts/_snippets/snippets_listSparqlWherePatterns.js +9 -18
  268. package/dist/generators/ts/_snippets/snippets_literalFactory.d.ts +2 -1
  269. package/dist/generators/ts/_snippets/snippets_literalFactory.js +1 -3
  270. package/dist/generators/ts/_snippets/snippets_literalSchemaSparqlPatterns.d.ts +2 -1
  271. package/dist/generators/ts/_snippets/snippets_literalSchemaSparqlPatterns.js +7 -13
  272. package/dist/generators/ts/_snippets/snippets_literalSparqlWherePatterns.d.ts +2 -1
  273. package/dist/generators/ts/_snippets/snippets_literalSparqlWherePatterns.js +3 -8
  274. package/dist/generators/ts/_snippets/snippets_maybeEquals.d.ts +2 -1
  275. package/dist/generators/ts/_snippets/snippets_maybeEquals.js +5 -8
  276. package/dist/generators/ts/_snippets/snippets_maybeSparqlConstructTriples.d.ts +2 -1
  277. package/dist/generators/ts/_snippets/snippets_maybeSparqlConstructTriples.js +2 -6
  278. package/dist/generators/ts/_snippets/snippets_maybeSparqlWherePatterns.d.ts +2 -1
  279. package/dist/generators/ts/_snippets/snippets_maybeSparqlWherePatterns.js +4 -9
  280. package/dist/generators/ts/_snippets/snippets_normalizeSparqlWherePatterns.d.ts +2 -1
  281. package/dist/generators/ts/_snippets/snippets_normalizeSparqlWherePatterns.js +9 -14
  282. package/dist/generators/ts/_snippets/snippets_numericSparqlWherePatterns.d.ts +2 -1
  283. package/dist/generators/ts/_snippets/snippets_numericSparqlWherePatterns.js +9 -17
  284. package/dist/generators/ts/_snippets/snippets_parseBlankNode.d.ts +2 -1
  285. package/dist/generators/ts/_snippets/snippets_parseBlankNode.js +2 -5
  286. package/dist/generators/ts/_snippets/snippets_parseIdentifier.d.ts +2 -1
  287. package/dist/generators/ts/_snippets/snippets_parseIdentifier.js +1 -3
  288. package/dist/generators/ts/_snippets/snippets_parseIri.d.ts +2 -1
  289. package/dist/generators/ts/_snippets/snippets_parseIri.js +2 -5
  290. package/dist/generators/ts/_snippets/snippets_setSparqlConstructTriples.d.ts +2 -1
  291. package/dist/generators/ts/_snippets/snippets_setSparqlConstructTriples.js +2 -6
  292. package/dist/generators/ts/_snippets/snippets_setSparqlWherePatterns.d.ts +2 -1
  293. package/dist/generators/ts/_snippets/snippets_setSparqlWherePatterns.js +3 -8
  294. package/dist/generators/ts/_snippets/snippets_shaclPropertyFromRdf.d.ts +2 -1
  295. package/dist/generators/ts/_snippets/snippets_shaclPropertyFromRdf.js +2 -5
  296. package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlConstructTriples.d.ts +2 -1
  297. package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlConstructTriples.js +4 -9
  298. package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlWherePatterns.d.ts +2 -1
  299. package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlWherePatterns.js +8 -15
  300. package/dist/generators/ts/_snippets/snippets_sortSparqlPatterns.d.ts +2 -1
  301. package/dist/generators/ts/_snippets/snippets_sortSparqlPatterns.js +5 -7
  302. package/dist/generators/ts/_snippets/snippets_sparqlInstancesOfPattern.d.ts +2 -1
  303. package/dist/generators/ts/_snippets/snippets_sparqlInstancesOfPattern.js +3 -6
  304. package/dist/generators/ts/_snippets/snippets_sparqlPropertyPath.d.ts +2 -1
  305. package/dist/generators/ts/_snippets/snippets_sparqlPropertyPath.js +3 -6
  306. package/dist/generators/ts/_snippets/snippets_sparqlValueInPattern.d.ts +2 -1
  307. package/dist/generators/ts/_snippets/snippets_sparqlValueInPattern.js +3 -7
  308. package/dist/generators/ts/_snippets/snippets_strictEquals.d.ts +2 -1
  309. package/dist/generators/ts/_snippets/snippets_strictEquals.js +4 -6
  310. package/dist/generators/ts/_snippets/snippets_stringSparqlWherePatterns.d.ts +2 -1
  311. package/dist/generators/ts/_snippets/snippets_stringSparqlWherePatterns.js +7 -15
  312. package/dist/generators/ts/_snippets/snippets_termFilterSparqlPatterns.d.ts +2 -1
  313. package/dist/generators/ts/_snippets/snippets_termFilterSparqlPatterns.js +4 -9
  314. package/dist/generators/ts/_snippets/snippets_termSchemaSparqlPatterns.d.ts +2 -1
  315. package/dist/generators/ts/_snippets/snippets_termSchemaSparqlPatterns.js +6 -11
  316. package/dist/generators/ts/_snippets/snippets_termSparqlWherePatterns.d.ts +2 -1
  317. package/dist/generators/ts/_snippets/snippets_termSparqlWherePatterns.js +3 -9
  318. package/dist/generators/ts/_snippets/snippets_wrap_FromRdfResourceFunction.d.ts +3 -0
  319. package/dist/generators/ts/_snippets/snippets_wrap_FromRdfResourceFunction.js +10 -0
  320. package/dist/generators/ts/_snippets/snippets_wrap_ToRdfResourceFunction.d.ts +3 -0
  321. package/dist/generators/ts/_snippets/snippets_wrap_ToRdfResourceFunction.js +14 -0
  322. package/dist/generators/ts/graphqlSchemaVariableStatement.d.ts +2 -1
  323. package/dist/generators/ts/graphqlSchemaVariableStatement.js +13 -14
  324. package/dist/generators/ts/objectSetDeclarations.d.ts +2 -1
  325. package/dist/generators/ts/objectSetDeclarations.js +3 -3
  326. package/dist/generators/ts/objectSetInterfaceDeclaration.d.ts +2 -1
  327. package/dist/generators/ts/objectSetInterfaceDeclaration.js +4 -5
  328. package/dist/generators/ts/objectSetMethodSignatures.d.ts +2 -1
  329. package/dist/generators/ts/objectSetMethodSignatures.js +4 -5
  330. package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.d.ts +2 -1
  331. package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.js +49 -51
  332. package/dist/generators/ts/rdfjsTermExpression.d.ts +6 -2
  333. package/dist/generators/ts/rdfjsTermExpression.js +13 -15
  334. package/dist/generators/ts/sparqlObjectSetClassDeclaration.d.ts +2 -1
  335. package/dist/generators/ts/sparqlObjectSetClassDeclaration.js +43 -45
  336. package/dist/generators/ts/unsupportedObjectSetMethodDeclarations.d.ts +2 -1
  337. package/dist/generators/ts/unsupportedObjectSetMethodDeclarations.js +6 -7
  338. package/dist/input/ShapesGraph.d.ts +4 -4
  339. package/dist/input/ShapesGraph.js +4 -4
  340. package/dist/input/generated.d.ts +184 -267
  341. package/dist/input/generated.js +721 -779
  342. package/package.json +2 -2
  343. package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromJsonFunctionDeclaration.d.ts +0 -5
  344. package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromJsonFunctionDeclaration.js +0 -38
  345. package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromRdfResourceFunctionDeclaration.d.ts +0 -5
  346. package/dist/generators/ts/_NamedObjectType/NamedObjectType_propertiesFromRdfResourceFunctionDeclaration.js +0 -101
  347. package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfResourceFunction.d.ts +0 -2
  348. package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfResourceFunction.js +0 -15
  349. package/dist/generators/ts/imports.js +0 -41
  350. package/dist/generators/ts/snippets.d.ts +0 -110
  351. package/dist/generators/ts/snippets.js +0 -217
  352. package/dist/generators/ts/synthesizeUberObjectUnionType.d.ts +0 -11
  353. package/dist/generators/ts/synthesizeUberObjectUnionType.js +0 -68
@@ -205,16 +205,16 @@ const $literalFactory = new LiteralFactory({ dataFactory: dataFactory });
205
205
  const $parseIdentifier = NTriplesIdentifier.parser(dataFactory);
206
206
  export var $PropertyPath;
207
207
  (function ($PropertyPath) {
208
- function $filter(_filter, _value) {
208
+ function filter(_filter, _value) {
209
209
  return true;
210
210
  }
211
- $PropertyPath.$filter = $filter;
212
- $PropertyPath.$fromRdfResource = RdfxResourcePropertyPath.fromResource;
213
- $PropertyPath.$fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
211
+ $PropertyPath.filter = filter;
212
+ $PropertyPath.fromRdfResource = RdfxResourcePropertyPath.fromResource;
213
+ $PropertyPath.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
214
214
  .toResource()
215
- .chain((resource) => $PropertyPath.$fromRdfResource(resource, options))));
216
- $PropertyPath.$schema = {};
217
- $PropertyPath.$toRdfResource = RdfxResourcePropertyPath.toResource;
215
+ .chain((resource) => $PropertyPath.fromRdfResource(resource, options))));
216
+ $PropertyPath.schema = {};
217
+ $PropertyPath.toRdfResource = RdfxResourcePropertyPath.toResource;
218
218
  $PropertyPath.$toString = RdfxResourcePropertyPath.toString;
219
219
  })($PropertyPath || ($PropertyPath = {}));
220
220
  var $RdfVocabularies;
@@ -264,9 +264,44 @@ function $shaclPropertyFromRdf({ graph, propertySchema, resource, typeFromRdf, }
264
264
  function $strictEquals(left, right) {
265
265
  return $EqualsResult.fromBooleanEqualsResult(left, right, left === right);
266
266
  }
267
+ function $wrap_FromRdfResourceFunction(_fromRdfResourceFunction) {
268
+ return (resource, options) => {
269
+ let { context, graph, ignoreRdfType = false, objectSet, preferredLanguages, } = options ?? {};
270
+ if (!objectSet) {
271
+ objectSet = new $RdfjsDatasetObjectSet(resource.dataset);
272
+ }
273
+ return _fromRdfResourceFunction(resource, {
274
+ context,
275
+ graph,
276
+ ignoreRdfType,
277
+ objectSet,
278
+ preferredLanguages,
279
+ });
280
+ };
281
+ }
282
+ function $wrap_ToRdfResourceFunction(_toRdfResourceFunction) {
283
+ return (object, options) => {
284
+ let { graph, ignoreRdfType = false, resourceSet } = options ?? {};
285
+ if (!resourceSet) {
286
+ resourceSet = new ResourceSet({
287
+ dataFactory: dataFactory,
288
+ dataset: datasetFactory.dataset(),
289
+ });
290
+ }
291
+ const resource = resourceSet.resource(object.$identifier());
292
+ _toRdfResourceFunction({
293
+ graph,
294
+ ignoreRdfType,
295
+ object,
296
+ resource,
297
+ resourceSet,
298
+ });
299
+ return resource;
300
+ };
301
+ }
267
302
  export var PropertyShape;
268
303
  (function (PropertyShape) {
269
- function $create(parameters) {
304
+ function create(parameters) {
270
305
  const $identifierParameter = parameters.$identifier;
271
306
  let $identifier;
272
307
  if (typeof $identifierParameter === "function") {
@@ -911,13 +946,13 @@ export var PropertyShape;
911
946
  xone,
912
947
  };
913
948
  }
914
- PropertyShape.$create = $create;
915
- let $Identifier;
916
- (function ($Identifier) {
917
- $Identifier.parse = $parseIdentifier;
918
- $Identifier.stringify = NTriplesTerm.stringify;
919
- })($Identifier = PropertyShape.$Identifier || (PropertyShape.$Identifier = {}));
920
- function $filter(filter, value) {
949
+ PropertyShape.create = create;
950
+ let Identifier;
951
+ (function (Identifier) {
952
+ Identifier.parse = $parseIdentifier;
953
+ Identifier.stringify = NTriplesTerm.stringify;
954
+ })(Identifier = PropertyShape.Identifier || (PropertyShape.Identifier = {}));
955
+ function filter(filter, value) {
921
956
  if (filter.$identifier !== undefined &&
922
957
  !$filterIdentifier(filter.$identifier, value.$identifier())) {
923
958
  return false;
@@ -1043,7 +1078,7 @@ export var PropertyShape;
1043
1078
  return false;
1044
1079
  }
1045
1080
  if (filter.path !== undefined &&
1046
- !$PropertyPath.$filter(filter.path, value.path)) {
1081
+ !$PropertyPath.filter(filter.path, value.path)) {
1047
1082
  return false;
1048
1083
  }
1049
1084
  if (filter.patterns !== undefined &&
@@ -1068,34 +1103,8 @@ export var PropertyShape;
1068
1103
  }
1069
1104
  return true;
1070
1105
  }
1071
- PropertyShape.$filter = $filter;
1072
- PropertyShape.$fromRdfResource = (resource, options) => {
1073
- let { context, graph, ignoreRdfType = false, objectSet, preferredLanguages, } = options ?? {};
1074
- if (!objectSet) {
1075
- objectSet = new $RdfjsDatasetObjectSet(resource.dataset);
1076
- }
1077
- return PropertyShape.$propertiesFromRdfResource(resource, {
1078
- context,
1079
- graph,
1080
- ignoreRdfType,
1081
- objectSet,
1082
- preferredLanguages,
1083
- }).map($create);
1084
- };
1085
- PropertyShape.$fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
1086
- .toResource()
1087
- .chain((resource) => PropertyShape.$fromRdfResource(resource, options))));
1088
- PropertyShape.$fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape");
1089
- function isPropertyShape(object) {
1090
- switch (object.$type) {
1091
- case "PropertyShape":
1092
- return true;
1093
- default:
1094
- return false;
1095
- }
1096
- }
1097
- PropertyShape.isPropertyShape = isPropertyShape;
1098
- PropertyShape.$propertiesFromRdfResource = ($resource, _$options) => {
1106
+ PropertyShape.filter = filter;
1107
+ PropertyShape._fromRdfResource = ($resource, _$options) => {
1099
1108
  return (!_$options.ignoreRdfType
1100
1109
  ? $resource
1101
1110
  .value($RdfVocabularies.rdf.type, { graph: _$options.graph })
@@ -1107,7 +1116,7 @@ export var PropertyShape;
1107
1116
  return Right(true);
1108
1117
  }
1109
1118
  // Check arbitrary rdfs:subClassOf's of the expected type
1110
- if ($resource.isInstanceOf(PropertyShape.$fromRdfType, {
1119
+ if ($resource.isInstanceOf(PropertyShape.fromRdfType, {
1111
1120
  graph: _$options.graph,
1112
1121
  })) {
1113
1122
  return Right(true);
@@ -1122,15 +1131,15 @@ export var PropertyShape;
1122
1131
  }).toValues())
1123
1132
  .chain((values) => values.chainMap((value) => value.toIdentifier()))
1124
1133
  .chain((values) => values.head())
1125
- .chain(($identifier) => Right("PropertyShape").chain(($type) => $shaclPropertyFromRdf({
1134
+ .chain(($identifier) => $shaclPropertyFromRdf({
1126
1135
  graph: _$options.graph,
1127
1136
  resource: $resource,
1128
- propertySchema: PropertyShape.$schema.properties.and,
1137
+ propertySchema: PropertyShape.schema.properties.and,
1129
1138
  typeFromRdf: (resourceValues) => resourceValues
1130
1139
  .chain((values) => values.chainMap((value) => value.toList({ graph: _$options.graph })))
1131
1140
  .chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
1132
1141
  focusResource: $resource,
1133
- propertyPath: PropertyShape.$schema.properties.and.path,
1142
+ propertyPath: PropertyShape.schema.properties.and.path,
1134
1143
  values: valueList.toArray(),
1135
1144
  })).chain((values) => values.chainMap((value) => value.toIdentifier()))))
1136
1145
  .map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
@@ -1138,25 +1147,25 @@ export var PropertyShape;
1138
1147
  ? values.map((value) => Maybe.of(value))
1139
1148
  : Resource.Values.fromValue({
1140
1149
  focusResource: $resource,
1141
- propertyPath: PropertyShape.$schema.properties.and.path,
1150
+ propertyPath: PropertyShape.schema.properties.and.path,
1142
1151
  value: Maybe.empty(),
1143
1152
  })),
1144
1153
  }).chain((and) => $shaclPropertyFromRdf({
1145
1154
  graph: _$options.graph,
1146
1155
  resource: $resource,
1147
- propertySchema: PropertyShape.$schema.properties.classes,
1156
+ propertySchema: PropertyShape.schema.properties.classes,
1148
1157
  typeFromRdf: (resourceValues) => resourceValues
1149
1158
  .chain((values) => values.chainMap((value) => value.toIri()))
1150
1159
  .map((values) => values.toArray())
1151
1160
  .map((valuesArray) => Resource.Values.fromValue({
1152
1161
  focusResource: $resource,
1153
- propertyPath: PropertyShape.$schema.properties.classes.path,
1162
+ propertyPath: PropertyShape.schema.properties.classes.path,
1154
1163
  value: valuesArray,
1155
1164
  })),
1156
1165
  }).chain((classes) => $shaclPropertyFromRdf({
1157
1166
  graph: _$options.graph,
1158
1167
  resource: $resource,
1159
- propertySchema: PropertyShape.$schema.properties.comment,
1168
+ propertySchema: PropertyShape.schema.properties.comment,
1160
1169
  typeFromRdf: (resourceValues) => resourceValues
1161
1170
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
1162
1171
  .chain((values) => values.chainMap((value) => value.toString()))
@@ -1164,41 +1173,40 @@ export var PropertyShape;
1164
1173
  ? values.map((value) => Maybe.of(value))
1165
1174
  : Resource.Values.fromValue({
1166
1175
  focusResource: $resource,
1167
- propertyPath: PropertyShape.$schema.properties.comment.path,
1176
+ propertyPath: PropertyShape.schema.properties.comment.path,
1168
1177
  value: Maybe.empty(),
1169
1178
  })),
1170
1179
  }).chain((comment) => $shaclPropertyFromRdf({
1171
1180
  graph: _$options.graph,
1172
1181
  resource: $resource,
1173
- propertySchema: PropertyShape.$schema.properties.datatype,
1182
+ propertySchema: PropertyShape.schema.properties.datatype,
1174
1183
  typeFromRdf: (resourceValues) => resourceValues
1175
1184
  .chain((values) => values.chainMap((value) => value.toIri()))
1176
1185
  .map((values) => values.length > 0
1177
1186
  ? values.map((value) => Maybe.of(value))
1178
1187
  : Resource.Values.fromValue({
1179
1188
  focusResource: $resource,
1180
- propertyPath: PropertyShape.$schema.properties.datatype
1181
- .path,
1189
+ propertyPath: PropertyShape.schema.properties.datatype.path,
1182
1190
  value: Maybe.empty(),
1183
1191
  })),
1184
1192
  }).chain((datatype) => $shaclPropertyFromRdf({
1185
1193
  graph: _$options.graph,
1186
1194
  resource: $resource,
1187
- propertySchema: PropertyShape.$schema.properties.deactivated,
1195
+ propertySchema: PropertyShape.schema.properties.deactivated,
1188
1196
  typeFromRdf: (resourceValues) => resourceValues
1189
1197
  .chain((values) => values.chainMap((value) => value.toBoolean()))
1190
1198
  .map((values) => values.length > 0
1191
1199
  ? values.map((value) => Maybe.of(value))
1192
1200
  : Resource.Values.fromValue({
1193
1201
  focusResource: $resource,
1194
- propertyPath: PropertyShape.$schema.properties.deactivated
1202
+ propertyPath: PropertyShape.schema.properties.deactivated
1195
1203
  .path,
1196
1204
  value: Maybe.empty(),
1197
1205
  })),
1198
1206
  }).chain((deactivated) => $shaclPropertyFromRdf({
1199
1207
  graph: _$options.graph,
1200
1208
  resource: $resource,
1201
- propertySchema: PropertyShape.$schema.properties.defaultValue,
1209
+ propertySchema: PropertyShape.schema.properties.defaultValue,
1202
1210
  typeFromRdf: (resourceValues) => resourceValues
1203
1211
  .chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
1204
1212
  switch (term.termType) {
@@ -1210,7 +1218,7 @@ export var PropertyShape;
1210
1218
  actualValue: term,
1211
1219
  expectedValueType: "(NamedNode | Literal)",
1212
1220
  focusResource: $resource,
1213
- propertyPath: PropertyShape.$schema.properties
1221
+ propertyPath: PropertyShape.schema.properties
1214
1222
  .defaultValue.path,
1215
1223
  }));
1216
1224
  }
@@ -1219,14 +1227,14 @@ export var PropertyShape;
1219
1227
  ? values.map((value) => Maybe.of(value))
1220
1228
  : Resource.Values.fromValue({
1221
1229
  focusResource: $resource,
1222
- propertyPath: PropertyShape.$schema.properties
1223
- .defaultValue.path,
1230
+ propertyPath: PropertyShape.schema.properties.defaultValue
1231
+ .path,
1224
1232
  value: Maybe.empty(),
1225
1233
  })),
1226
1234
  }).chain((defaultValue) => $shaclPropertyFromRdf({
1227
1235
  graph: _$options.graph,
1228
1236
  resource: $resource,
1229
- propertySchema: PropertyShape.$schema.properties.description,
1237
+ propertySchema: PropertyShape.schema.properties.description,
1230
1238
  typeFromRdf: (resourceValues) => resourceValues
1231
1239
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
1232
1240
  .chain((values) => values.chainMap((value) => value.toString()))
@@ -1234,56 +1242,56 @@ export var PropertyShape;
1234
1242
  ? values.map((value) => Maybe.of(value))
1235
1243
  : Resource.Values.fromValue({
1236
1244
  focusResource: $resource,
1237
- propertyPath: PropertyShape.$schema.properties
1245
+ propertyPath: PropertyShape.schema.properties
1238
1246
  .description.path,
1239
1247
  value: Maybe.empty(),
1240
1248
  })),
1241
1249
  }).chain((description) => $shaclPropertyFromRdf({
1242
1250
  graph: _$options.graph,
1243
1251
  resource: $resource,
1244
- propertySchema: PropertyShape.$schema.properties.display,
1252
+ propertySchema: PropertyShape.schema.properties.display,
1245
1253
  typeFromRdf: (resourceValues) => resourceValues
1246
1254
  .map((values) => values.length > 0
1247
1255
  ? values
1248
1256
  : new Resource.Value({
1249
1257
  dataFactory: dataFactory,
1250
1258
  focusResource: $resource,
1251
- propertyPath: PropertyShape.$schema.properties
1252
- .display.path,
1259
+ propertyPath: PropertyShape.schema.properties.display
1260
+ .path,
1253
1261
  term: dataFactory.literal("false", $RdfVocabularies.xsd.boolean),
1254
1262
  }).toValues())
1255
1263
  .chain((values) => values.chainMap((value) => value.toBoolean())),
1256
1264
  }).chain((display) => $shaclPropertyFromRdf({
1257
1265
  graph: _$options.graph,
1258
1266
  resource: $resource,
1259
- propertySchema: PropertyShape.$schema.properties.flags,
1267
+ propertySchema: PropertyShape.schema.properties.flags,
1260
1268
  typeFromRdf: (resourceValues) => resourceValues
1261
1269
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
1262
1270
  .chain((values) => values.chainMap((value) => value.toString()))
1263
1271
  .map((values) => values.toArray())
1264
1272
  .map((valuesArray) => Resource.Values.fromValue({
1265
1273
  focusResource: $resource,
1266
- propertyPath: PropertyShape.$schema.properties.flags
1274
+ propertyPath: PropertyShape.schema.properties.flags
1267
1275
  .path,
1268
1276
  value: valuesArray,
1269
1277
  })),
1270
1278
  }).chain((flags) => $shaclPropertyFromRdf({
1271
1279
  graph: _$options.graph,
1272
1280
  resource: $resource,
1273
- propertySchema: PropertyShape.$schema.properties.groups,
1281
+ propertySchema: PropertyShape.schema.properties.groups,
1274
1282
  typeFromRdf: (resourceValues) => resourceValues
1275
1283
  .chain((values) => values.chainMap((value) => value.toIdentifier()))
1276
1284
  .map((values) => values.toArray())
1277
1285
  .map((valuesArray) => Resource.Values.fromValue({
1278
1286
  focusResource: $resource,
1279
- propertyPath: PropertyShape.$schema.properties
1280
- .groups.path,
1287
+ propertyPath: PropertyShape.schema.properties.groups
1288
+ .path,
1281
1289
  value: valuesArray,
1282
1290
  })),
1283
1291
  }).chain((groups) => $shaclPropertyFromRdf({
1284
1292
  graph: _$options.graph,
1285
1293
  resource: $resource,
1286
- propertySchema: PropertyShape.$schema.properties.hasValues,
1294
+ propertySchema: PropertyShape.schema.properties.hasValues,
1287
1295
  typeFromRdf: (resourceValues) => resourceValues
1288
1296
  .chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
1289
1297
  switch (term.termType) {
@@ -1295,7 +1303,7 @@ export var PropertyShape;
1295
1303
  actualValue: term,
1296
1304
  expectedValueType: "(NamedNode | Literal)",
1297
1305
  focusResource: $resource,
1298
- propertyPath: PropertyShape.$schema
1306
+ propertyPath: PropertyShape.schema
1299
1307
  .properties.hasValues
1300
1308
  .path,
1301
1309
  }));
@@ -1304,22 +1312,22 @@ export var PropertyShape;
1304
1312
  .map((values) => values.toArray())
1305
1313
  .map((valuesArray) => Resource.Values.fromValue({
1306
1314
  focusResource: $resource,
1307
- propertyPath: PropertyShape.$schema.properties
1315
+ propertyPath: PropertyShape.schema.properties
1308
1316
  .hasValues.path,
1309
1317
  value: valuesArray,
1310
1318
  })),
1311
1319
  }).chain((hasValues) => $shaclPropertyFromRdf({
1312
1320
  graph: _$options.graph,
1313
1321
  resource: $resource,
1314
- propertySchema: PropertyShape.$schema.properties.in_,
1322
+ propertySchema: PropertyShape.schema.properties.in_,
1315
1323
  typeFromRdf: (resourceValues) => resourceValues
1316
1324
  .chain((values) => values.chainMap((value) => value.toList({
1317
1325
  graph: _$options.graph,
1318
1326
  })))
1319
1327
  .chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
1320
1328
  focusResource: $resource,
1321
- propertyPath: PropertyShape.$schema
1322
- .properties.in_.path,
1329
+ propertyPath: PropertyShape.schema.properties
1330
+ .in_.path,
1323
1331
  values: valueList.toArray(),
1324
1332
  })).chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
1325
1333
  switch (term.termType) {
@@ -1331,8 +1339,7 @@ export var PropertyShape;
1331
1339
  actualValue: term,
1332
1340
  expectedValueType: "(NamedNode | Literal)",
1333
1341
  focusResource: $resource,
1334
- propertyPath: PropertyShape
1335
- .$schema
1342
+ propertyPath: PropertyShape.schema
1336
1343
  .properties.in_
1337
1344
  .path,
1338
1345
  }));
@@ -1343,21 +1350,21 @@ export var PropertyShape;
1343
1350
  ? values.map((value) => Maybe.of(value))
1344
1351
  : Resource.Values.fromValue({
1345
1352
  focusResource: $resource,
1346
- propertyPath: PropertyShape.$schema
1347
- .properties.in_.path,
1353
+ propertyPath: PropertyShape.schema.properties
1354
+ .in_.path,
1348
1355
  value: Maybe.empty(),
1349
1356
  })),
1350
1357
  }).chain((in_) => $shaclPropertyFromRdf({
1351
1358
  graph: _$options.graph,
1352
1359
  resource: $resource,
1353
- propertySchema: PropertyShape.$schema.properties.isDefinedBy,
1360
+ propertySchema: PropertyShape.schema.properties.isDefinedBy,
1354
1361
  typeFromRdf: (resourceValues) => resourceValues
1355
1362
  .chain((values) => values.chainMap((value) => value.toIdentifier()))
1356
1363
  .map((values) => values.length > 0
1357
1364
  ? values.map((value) => Maybe.of(value))
1358
1365
  : Resource.Values.fromValue({
1359
1366
  focusResource: $resource,
1360
- propertyPath: PropertyShape.$schema
1367
+ propertyPath: PropertyShape.schema
1361
1368
  .properties.isDefinedBy
1362
1369
  .path,
1363
1370
  value: Maybe.empty(),
@@ -1365,7 +1372,7 @@ export var PropertyShape;
1365
1372
  }).chain((isDefinedBy) => $shaclPropertyFromRdf({
1366
1373
  graph: _$options.graph,
1367
1374
  resource: $resource,
1368
- propertySchema: PropertyShape.$schema.properties.label,
1375
+ propertySchema: PropertyShape.schema.properties.label,
1369
1376
  typeFromRdf: (resourceValues) => resourceValues
1370
1377
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
1371
1378
  .chain((values) => values.chainMap((value) => value.toString()))
@@ -1373,24 +1380,23 @@ export var PropertyShape;
1373
1380
  ? values.map((value) => Maybe.of(value))
1374
1381
  : Resource.Values.fromValue({
1375
1382
  focusResource: $resource,
1376
- propertyPath: PropertyShape.$schema
1383
+ propertyPath: PropertyShape.schema
1377
1384
  .properties.label.path,
1378
1385
  value: Maybe.empty(),
1379
1386
  })),
1380
1387
  }).chain((label) => $shaclPropertyFromRdf({
1381
1388
  graph: _$options.graph,
1382
1389
  resource: $resource,
1383
- propertySchema: PropertyShape.$schema.properties.languageIn,
1390
+ propertySchema: PropertyShape.schema.properties.languageIn,
1384
1391
  typeFromRdf: (resourceValues) => resourceValues
1385
1392
  .chain((values) => values.chainMap((value) => value.toList({
1386
1393
  graph: _$options.graph,
1387
1394
  })))
1388
1395
  .chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
1389
1396
  focusResource: $resource,
1390
- propertyPath: PropertyShape
1391
- .$schema
1392
- .properties
1393
- .languageIn.path,
1397
+ propertyPath: PropertyShape.schema
1398
+ .properties.languageIn
1399
+ .path,
1394
1400
  values: valueList.toArray(),
1395
1401
  }))
1396
1402
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
@@ -1400,7 +1406,7 @@ export var PropertyShape;
1400
1406
  ? values.map((value) => Maybe.of(value))
1401
1407
  : Resource.Values.fromValue({
1402
1408
  focusResource: $resource,
1403
- propertyPath: PropertyShape.$schema
1409
+ propertyPath: PropertyShape.schema
1404
1410
  .properties.languageIn
1405
1411
  .path,
1406
1412
  value: Maybe.empty(),
@@ -1408,14 +1414,14 @@ export var PropertyShape;
1408
1414
  }).chain((languageIn) => $shaclPropertyFromRdf({
1409
1415
  graph: _$options.graph,
1410
1416
  resource: $resource,
1411
- propertySchema: PropertyShape.$schema.properties.maxCount,
1417
+ propertySchema: PropertyShape.schema.properties.maxCount,
1412
1418
  typeFromRdf: (resourceValues) => resourceValues
1413
1419
  .chain((values) => values.chainMap((value) => value.toBigInt()))
1414
1420
  .map((values) => values.length > 0
1415
1421
  ? values.map((value) => Maybe.of(value))
1416
1422
  : Resource.Values.fromValue({
1417
1423
  focusResource: $resource,
1418
- propertyPath: PropertyShape.$schema
1424
+ propertyPath: PropertyShape.schema
1419
1425
  .properties.maxCount
1420
1426
  .path,
1421
1427
  value: Maybe.empty(),
@@ -1423,7 +1429,7 @@ export var PropertyShape;
1423
1429
  }).chain((maxCount) => $shaclPropertyFromRdf({
1424
1430
  graph: _$options.graph,
1425
1431
  resource: $resource,
1426
- propertySchema: PropertyShape.$schema.properties.maxExclusive,
1432
+ propertySchema: PropertyShape.schema.properties.maxExclusive,
1427
1433
  typeFromRdf: (resourceValues) => resourceValues
1428
1434
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
1429
1435
  .chain((values) => values.chainMap((value) => value.toLiteral()))
@@ -1431,18 +1437,15 @@ export var PropertyShape;
1431
1437
  ? values.map((value) => Maybe.of(value))
1432
1438
  : Resource.Values.fromValue({
1433
1439
  focusResource: $resource,
1434
- propertyPath: PropertyShape
1435
- .$schema
1440
+ propertyPath: PropertyShape.schema
1436
1441
  .properties
1437
- .maxExclusive
1438
- .path,
1442
+ .maxExclusive.path,
1439
1443
  value: Maybe.empty(),
1440
1444
  })),
1441
1445
  }).chain((maxExclusive) => $shaclPropertyFromRdf({
1442
1446
  graph: _$options.graph,
1443
1447
  resource: $resource,
1444
- propertySchema: PropertyShape.$schema.properties
1445
- .maxInclusive,
1448
+ propertySchema: PropertyShape.schema.properties.maxInclusive,
1446
1449
  typeFromRdf: (resourceValues) => resourceValues
1447
1450
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
1448
1451
  .chain((values) => values.chainMap((value) => value.toLiteral()))
@@ -1450,8 +1453,7 @@ export var PropertyShape;
1450
1453
  ? values.map((value) => Maybe.of(value))
1451
1454
  : Resource.Values.fromValue({
1452
1455
  focusResource: $resource,
1453
- propertyPath: PropertyShape
1454
- .$schema
1456
+ propertyPath: PropertyShape.schema
1455
1457
  .properties
1456
1458
  .maxInclusive
1457
1459
  .path,
@@ -1460,8 +1462,7 @@ export var PropertyShape;
1460
1462
  }).chain((maxInclusive) => $shaclPropertyFromRdf({
1461
1463
  graph: _$options.graph,
1462
1464
  resource: $resource,
1463
- propertySchema: PropertyShape.$schema.properties
1464
- .maxLength,
1465
+ propertySchema: PropertyShape.schema.properties.maxLength,
1465
1466
  typeFromRdf: (resourceValues) => resourceValues
1466
1467
  .chain((values) => values.chainMap((value) => value.toBigInt()))
1467
1468
  .map((values) => values.length > 0
@@ -1469,17 +1470,15 @@ export var PropertyShape;
1469
1470
  : Resource.Values.fromValue({
1470
1471
  focusResource: $resource,
1471
1472
  propertyPath: PropertyShape
1472
- .$schema
1473
+ .schema
1473
1474
  .properties
1474
- .maxLength
1475
- .path,
1475
+ .maxLength.path,
1476
1476
  value: Maybe.empty(),
1477
1477
  })),
1478
1478
  }).chain((maxLength) => $shaclPropertyFromRdf({
1479
1479
  graph: _$options.graph,
1480
1480
  resource: $resource,
1481
- propertySchema: PropertyShape.$schema.properties
1482
- .minCount,
1481
+ propertySchema: PropertyShape.schema.properties.minCount,
1483
1482
  typeFromRdf: (resourceValues) => resourceValues
1484
1483
  .chain((values) => values.chainMap((value) => value.toBigInt()))
1485
1484
  .map((values) => values.length > 0
@@ -1487,7 +1486,7 @@ export var PropertyShape;
1487
1486
  : Resource.Values.fromValue({
1488
1487
  focusResource: $resource,
1489
1488
  propertyPath: PropertyShape
1490
- .$schema
1489
+ .schema
1491
1490
  .properties
1492
1491
  .minCount
1493
1492
  .path,
@@ -1496,7 +1495,7 @@ export var PropertyShape;
1496
1495
  }).chain((minCount) => $shaclPropertyFromRdf({
1497
1496
  graph: _$options.graph,
1498
1497
  resource: $resource,
1499
- propertySchema: PropertyShape.$schema.properties
1498
+ propertySchema: PropertyShape.schema.properties
1500
1499
  .minExclusive,
1501
1500
  typeFromRdf: (resourceValues) => resourceValues
1502
1501
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
@@ -1506,7 +1505,7 @@ export var PropertyShape;
1506
1505
  : Resource.Values.fromValue({
1507
1506
  focusResource: $resource,
1508
1507
  propertyPath: PropertyShape
1509
- .$schema
1508
+ .schema
1510
1509
  .properties
1511
1510
  .minExclusive
1512
1511
  .path,
@@ -1515,7 +1514,7 @@ export var PropertyShape;
1515
1514
  }).chain((minExclusive) => $shaclPropertyFromRdf({
1516
1515
  graph: _$options.graph,
1517
1516
  resource: $resource,
1518
- propertySchema: PropertyShape.$schema.properties
1517
+ propertySchema: PropertyShape.schema.properties
1519
1518
  .minInclusive,
1520
1519
  typeFromRdf: (resourceValues) => resourceValues
1521
1520
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
@@ -1525,7 +1524,7 @@ export var PropertyShape;
1525
1524
  : Resource.Values.fromValue({
1526
1525
  focusResource: $resource,
1527
1526
  propertyPath: PropertyShape
1528
- .$schema
1527
+ .schema
1529
1528
  .properties
1530
1529
  .minInclusive
1531
1530
  .path,
@@ -1534,17 +1533,16 @@ export var PropertyShape;
1534
1533
  }).chain((minInclusive) => $shaclPropertyFromRdf({
1535
1534
  graph: _$options.graph,
1536
1535
  resource: $resource,
1537
- propertySchema: PropertyShape.$schema.properties
1536
+ propertySchema: PropertyShape.schema.properties
1538
1537
  .minLength,
1539
1538
  typeFromRdf: (resourceValues) => resourceValues
1540
1539
  .chain((values) => values.chainMap((value) => value.toBigInt()))
1541
- .map((values) => values.length >
1542
- 0
1540
+ .map((values) => values.length > 0
1543
1541
  ? values.map((value) => Maybe.of(value))
1544
1542
  : Resource.Values.fromValue({
1545
1543
  focusResource: $resource,
1546
1544
  propertyPath: PropertyShape
1547
- .$schema
1545
+ .schema
1548
1546
  .properties
1549
1547
  .minLength
1550
1548
  .path,
@@ -1553,8 +1551,7 @@ export var PropertyShape;
1553
1551
  }).chain((minLength) => $shaclPropertyFromRdf({
1554
1552
  graph: _$options.graph,
1555
1553
  resource: $resource,
1556
- propertySchema: PropertyShape.$schema
1557
- .properties
1554
+ propertySchema: PropertyShape.schema.properties
1558
1555
  .mutable,
1559
1556
  typeFromRdf: (resourceValues) => resourceValues
1560
1557
  .chain((values) => values.chainMap((value) => value.toBoolean()))
@@ -1564,7 +1561,7 @@ export var PropertyShape;
1564
1561
  : Resource.Values.fromValue({
1565
1562
  focusResource: $resource,
1566
1563
  propertyPath: PropertyShape
1567
- .$schema
1564
+ .schema
1568
1565
  .properties
1569
1566
  .mutable
1570
1567
  .path,
@@ -1573,7 +1570,7 @@ export var PropertyShape;
1573
1570
  }).chain((mutable) => $shaclPropertyFromRdf({
1574
1571
  graph: _$options.graph,
1575
1572
  resource: $resource,
1576
- propertySchema: PropertyShape.$schema
1573
+ propertySchema: PropertyShape.schema
1577
1574
  .properties
1578
1575
  .name,
1579
1576
  typeFromRdf: (resourceValues) => resourceValues
@@ -1585,7 +1582,7 @@ export var PropertyShape;
1585
1582
  : Resource.Values.fromValue({
1586
1583
  focusResource: $resource,
1587
1584
  propertyPath: PropertyShape
1588
- .$schema
1585
+ .schema
1589
1586
  .properties
1590
1587
  .name
1591
1588
  .path,
@@ -1594,7 +1591,7 @@ export var PropertyShape;
1594
1591
  }).chain((name) => $shaclPropertyFromRdf({
1595
1592
  graph: _$options.graph,
1596
1593
  resource: $resource,
1597
- propertySchema: PropertyShape.$schema
1594
+ propertySchema: PropertyShape.schema
1598
1595
  .properties
1599
1596
  .node,
1600
1597
  typeFromRdf: (resourceValues) => resourceValues
@@ -1605,7 +1602,7 @@ export var PropertyShape;
1605
1602
  : Resource.Values.fromValue({
1606
1603
  focusResource: $resource,
1607
1604
  propertyPath: PropertyShape
1608
- .$schema
1605
+ .schema
1609
1606
  .properties
1610
1607
  .node
1611
1608
  .path,
@@ -1614,7 +1611,7 @@ export var PropertyShape;
1614
1611
  }).chain((node) => $shaclPropertyFromRdf({
1615
1612
  graph: _$options.graph,
1616
1613
  resource: $resource,
1617
- propertySchema: PropertyShape.$schema
1614
+ propertySchema: PropertyShape.schema
1618
1615
  .properties
1619
1616
  .nodeKind,
1620
1617
  typeFromRdf: (resourceValues) => resourceValues
@@ -1632,7 +1629,7 @@ export var PropertyShape;
1632
1629
  : Resource.Values.fromValue({
1633
1630
  focusResource: $resource,
1634
1631
  propertyPath: PropertyShape
1635
- .$schema
1632
+ .schema
1636
1633
  .properties
1637
1634
  .nodeKind
1638
1635
  .path,
@@ -1641,7 +1638,7 @@ export var PropertyShape;
1641
1638
  }).chain((nodeKind) => $shaclPropertyFromRdf({
1642
1639
  graph: _$options.graph,
1643
1640
  resource: $resource,
1644
- propertySchema: PropertyShape.$schema
1641
+ propertySchema: PropertyShape.schema
1645
1642
  .properties
1646
1643
  .not,
1647
1644
  typeFromRdf: (resourceValues) => resourceValues
@@ -1650,7 +1647,7 @@ export var PropertyShape;
1650
1647
  .map((valuesArray) => Resource.Values.fromValue({
1651
1648
  focusResource: $resource,
1652
1649
  propertyPath: PropertyShape
1653
- .$schema
1650
+ .schema
1654
1651
  .properties
1655
1652
  .not
1656
1653
  .path,
@@ -1659,7 +1656,7 @@ export var PropertyShape;
1659
1656
  }).chain((not) => $shaclPropertyFromRdf({
1660
1657
  graph: _$options.graph,
1661
1658
  resource: $resource,
1662
- propertySchema: PropertyShape.$schema
1659
+ propertySchema: PropertyShape.schema
1663
1660
  .properties
1664
1661
  .or,
1665
1662
  typeFromRdf: (resourceValues) => resourceValues
@@ -1669,7 +1666,7 @@ export var PropertyShape;
1669
1666
  .chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
1670
1667
  focusResource: $resource,
1671
1668
  propertyPath: PropertyShape
1672
- .$schema
1669
+ .schema
1673
1670
  .properties
1674
1671
  .or
1675
1672
  .path,
@@ -1682,7 +1679,7 @@ export var PropertyShape;
1682
1679
  : Resource.Values.fromValue({
1683
1680
  focusResource: $resource,
1684
1681
  propertyPath: PropertyShape
1685
- .$schema
1682
+ .schema
1686
1683
  .properties
1687
1684
  .or
1688
1685
  .path,
@@ -1691,7 +1688,7 @@ export var PropertyShape;
1691
1688
  }).chain((or) => $shaclPropertyFromRdf({
1692
1689
  graph: _$options.graph,
1693
1690
  resource: $resource,
1694
- propertySchema: PropertyShape.$schema
1691
+ propertySchema: PropertyShape.schema
1695
1692
  .properties
1696
1693
  .order,
1697
1694
  typeFromRdf: (resourceValues) => resourceValues
@@ -1702,7 +1699,7 @@ export var PropertyShape;
1702
1699
  : Resource.Values.fromValue({
1703
1700
  focusResource: $resource,
1704
1701
  propertyPath: PropertyShape
1705
- .$schema
1702
+ .schema
1706
1703
  .properties
1707
1704
  .order
1708
1705
  .path,
@@ -1711,10 +1708,10 @@ export var PropertyShape;
1711
1708
  }).chain((order) => $shaclPropertyFromRdf({
1712
1709
  graph: _$options.graph,
1713
1710
  resource: $resource,
1714
- propertySchema: PropertyShape.$schema
1711
+ propertySchema: PropertyShape.schema
1715
1712
  .properties
1716
1713
  .path,
1717
- typeFromRdf: (resourceValues) => $PropertyPath.$fromRdfResourceValues(resourceValues, {
1714
+ typeFromRdf: (resourceValues) => $PropertyPath.fromRdfResourceValues(resourceValues, {
1718
1715
  context: _$options.context,
1719
1716
  graph: _$options.graph,
1720
1717
  preferredLanguages: _$options.preferredLanguages,
@@ -1722,7 +1719,7 @@ export var PropertyShape;
1722
1719
  resource: $resource,
1723
1720
  ignoreRdfType: true,
1724
1721
  propertyPath: PropertyShape
1725
- .$schema
1722
+ .schema
1726
1723
  .properties
1727
1724
  .path
1728
1725
  .path,
@@ -1730,7 +1727,7 @@ export var PropertyShape;
1730
1727
  }).chain((path) => $shaclPropertyFromRdf({
1731
1728
  graph: _$options.graph,
1732
1729
  resource: $resource,
1733
- propertySchema: PropertyShape.$schema
1730
+ propertySchema: PropertyShape.schema
1734
1731
  .properties
1735
1732
  .patterns,
1736
1733
  typeFromRdf: (resourceValues) => resourceValues
@@ -1740,7 +1737,7 @@ export var PropertyShape;
1740
1737
  .map((valuesArray) => Resource.Values.fromValue({
1741
1738
  focusResource: $resource,
1742
1739
  propertyPath: PropertyShape
1743
- .$schema
1740
+ .schema
1744
1741
  .properties
1745
1742
  .patterns
1746
1743
  .path,
@@ -1749,7 +1746,7 @@ export var PropertyShape;
1749
1746
  }).chain((patterns) => $shaclPropertyFromRdf({
1750
1747
  graph: _$options.graph,
1751
1748
  resource: $resource,
1752
- propertySchema: PropertyShape.$schema
1749
+ propertySchema: PropertyShape.schema
1753
1750
  .properties
1754
1751
  .resolve,
1755
1752
  typeFromRdf: (resourceValues) => resourceValues
@@ -1760,7 +1757,7 @@ export var PropertyShape;
1760
1757
  : Resource.Values.fromValue({
1761
1758
  focusResource: $resource,
1762
1759
  propertyPath: PropertyShape
1763
- .$schema
1760
+ .schema
1764
1761
  .properties
1765
1762
  .resolve
1766
1763
  .path,
@@ -1769,7 +1766,7 @@ export var PropertyShape;
1769
1766
  }).chain((resolve) => $shaclPropertyFromRdf({
1770
1767
  graph: _$options.graph,
1771
1768
  resource: $resource,
1772
- propertySchema: PropertyShape.$schema
1769
+ propertySchema: PropertyShape.schema
1773
1770
  .properties
1774
1771
  .shaclmateName,
1775
1772
  typeFromRdf: (resourceValues) => resourceValues
@@ -1781,7 +1778,7 @@ export var PropertyShape;
1781
1778
  : Resource.Values.fromValue({
1782
1779
  focusResource: $resource,
1783
1780
  propertyPath: PropertyShape
1784
- .$schema
1781
+ .schema
1785
1782
  .properties
1786
1783
  .shaclmateName
1787
1784
  .path,
@@ -1790,7 +1787,7 @@ export var PropertyShape;
1790
1787
  }).chain((shaclmateName) => $shaclPropertyFromRdf({
1791
1788
  graph: _$options.graph,
1792
1789
  resource: $resource,
1793
- propertySchema: PropertyShape.$schema
1790
+ propertySchema: PropertyShape.schema
1794
1791
  .properties
1795
1792
  .uniqueLang,
1796
1793
  typeFromRdf: (resourceValues) => resourceValues
@@ -1801,7 +1798,7 @@ export var PropertyShape;
1801
1798
  : Resource.Values.fromValue({
1802
1799
  focusResource: $resource,
1803
1800
  propertyPath: PropertyShape
1804
- .$schema
1801
+ .schema
1805
1802
  .properties
1806
1803
  .uniqueLang
1807
1804
  .path,
@@ -1810,7 +1807,7 @@ export var PropertyShape;
1810
1807
  }).chain((uniqueLang) => $shaclPropertyFromRdf({
1811
1808
  graph: _$options.graph,
1812
1809
  resource: $resource,
1813
- propertySchema: PropertyShape.$schema
1810
+ propertySchema: PropertyShape.schema
1814
1811
  .properties
1815
1812
  .xone,
1816
1813
  typeFromRdf: (resourceValues) => resourceValues
@@ -1820,7 +1817,7 @@ export var PropertyShape;
1820
1817
  .chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
1821
1818
  focusResource: $resource,
1822
1819
  propertyPath: PropertyShape
1823
- .$schema
1820
+ .schema
1824
1821
  .properties
1825
1822
  .xone
1826
1823
  .path,
@@ -1833,15 +1830,14 @@ export var PropertyShape;
1833
1830
  : Resource.Values.fromValue({
1834
1831
  focusResource: $resource,
1835
1832
  propertyPath: PropertyShape
1836
- .$schema
1833
+ .schema
1837
1834
  .properties
1838
1835
  .xone
1839
1836
  .path,
1840
1837
  value: Maybe.empty(),
1841
1838
  })),
1842
- }).map((xone) => ({
1839
+ }).map((xone) => create({
1843
1840
  $identifier,
1844
- $type,
1845
1841
  and,
1846
1842
  classes,
1847
1843
  comment,
@@ -1878,9 +1874,23 @@ export var PropertyShape;
1878
1874
  shaclmateName,
1879
1875
  uniqueLang,
1880
1876
  xone,
1881
- }))))))))))))))))))))))))))))))))))))))));
1877
+ })))))))))))))))))))))))))))))))))))))));
1882
1878
  };
1883
- PropertyShape.$schema = {
1879
+ PropertyShape.fromRdfResource = $wrap_FromRdfResourceFunction(PropertyShape._fromRdfResource);
1880
+ PropertyShape.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
1881
+ .toResource()
1882
+ .chain((resource) => PropertyShape.fromRdfResource(resource, options))));
1883
+ PropertyShape.fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape");
1884
+ function isPropertyShape(object) {
1885
+ switch (object.$type) {
1886
+ case "PropertyShape":
1887
+ return true;
1888
+ default:
1889
+ return false;
1890
+ }
1891
+ }
1892
+ PropertyShape.isPropertyShape = isPropertyShape;
1893
+ PropertyShape.schema = {
1884
1894
  properties: {
1885
1895
  $identifier: {
1886
1896
  kind: "Identifier",
@@ -2158,7 +2168,7 @@ export var PropertyShape;
2158
2168
  },
2159
2169
  path: {
2160
2170
  kind: "Shacl",
2161
- type: () => $PropertyPath.$schema,
2171
+ type: () => $PropertyPath.schema,
2162
2172
  path: dataFactory.namedNode("http://www.w3.org/ns/shacl#path"),
2163
2173
  },
2164
2174
  patterns: {
@@ -2206,212 +2216,208 @@ export var PropertyShape;
2206
2216
  },
2207
2217
  },
2208
2218
  };
2209
- function $toRdfResource(_propertyShape, options) {
2210
- const resourceSet = options?.resourceSet ??
2211
- new ResourceSet({
2212
- dataFactory: dataFactory,
2213
- dataset: datasetFactory.dataset(),
2214
- });
2215
- const resource = resourceSet.resource(_propertyShape.$identifier());
2216
- if (!options?.ignoreRdfType) {
2217
- resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape"), options?.graph);
2219
+ PropertyShape._toRdfResource = (parameters) => {
2220
+ if (!parameters.ignoreRdfType) {
2221
+ parameters.resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyShape"), parameters.graph);
2218
2222
  }
2219
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#and"), _propertyShape.and.toList().flatMap((value) => [
2223
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#and"), parameters.object.and.toList().flatMap((value) => [
2220
2224
  value.length > 0
2221
2225
  ? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
2222
2226
  if (itemIndex === 0) {
2223
2227
  currentSubListResource = listResource;
2224
2228
  }
2225
2229
  else {
2226
- const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
2227
- currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
2230
+ const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
2231
+ currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
2228
2232
  currentSubListResource = newSubListResource;
2229
2233
  }
2230
- currentSubListResource.add($RdfVocabularies.rdf.first, [item], options?.graph);
2234
+ currentSubListResource.add($RdfVocabularies.rdf.first, [item], parameters.graph);
2231
2235
  if (itemIndex + 1 === list.length) {
2232
- currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, options?.graph);
2236
+ currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
2233
2237
  }
2234
2238
  return { currentSubListResource, listResource };
2235
2239
  }, {
2236
2240
  currentSubListResource: null,
2237
- listResource: resourceSet.resource((() => dataFactory.blankNode())()),
2241
+ listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
2238
2242
  }).listResource.identifier
2239
2243
  : $RdfVocabularies.rdf.nil,
2240
- ]), options?.graph);
2241
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#class"), _propertyShape.classes.flatMap((item) => [item]), options?.graph);
2242
- resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#comment"), _propertyShape.comment
2244
+ ]), parameters.graph);
2245
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#class"), parameters.object.classes.flatMap((item) => [item]), parameters.graph);
2246
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#comment"), parameters.object.comment
2243
2247
  .toList()
2244
- .flatMap((value) => [$literalFactory.string(value)]), options?.graph);
2245
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#datatype"), _propertyShape.datatype.toList(), options?.graph);
2246
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#deactivated"), _propertyShape.deactivated
2248
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
2249
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#datatype"), parameters.object.datatype.toList(), parameters.graph);
2250
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#deactivated"), parameters.object.deactivated
2247
2251
  .toList()
2248
2252
  .flatMap((value) => [
2249
2253
  $literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
2250
- ]), options?.graph);
2251
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#defaultValue"), _propertyShape.defaultValue.toList(), options?.graph);
2252
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#description"), _propertyShape.description
2254
+ ]), parameters.graph);
2255
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#defaultValue"), parameters.object.defaultValue.toList(), parameters.graph);
2256
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#description"), parameters.object.description
2253
2257
  .toList()
2254
- .flatMap((value) => [$literalFactory.string(value)]), options?.graph);
2255
- resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#display"), $strictEquals(_propertyShape.display, false).isLeft()
2258
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
2259
+ parameters.resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#display"), $strictEquals(parameters.object.display, false).isLeft()
2256
2260
  ? [
2257
- $literalFactory.boolean(_propertyShape.display, $RdfVocabularies.xsd.boolean),
2261
+ $literalFactory.boolean(parameters.object.display, $RdfVocabularies.xsd.boolean),
2258
2262
  ]
2259
- : [], options?.graph);
2260
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#flags"), _propertyShape.flags.flatMap((item) => [$literalFactory.string(item)]), options?.graph);
2261
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#group"), _propertyShape.groups.flatMap((item) => [item]), options?.graph);
2262
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#hasValue"), _propertyShape.hasValues.flatMap((item) => [item]), options?.graph);
2263
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#in"), _propertyShape.in_.toList().flatMap((value) => [
2263
+ : [], parameters.graph);
2264
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#flags"), parameters.object.flags.flatMap((item) => [$literalFactory.string(item)]), parameters.graph);
2265
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#group"), parameters.object.groups.flatMap((item) => [item]), parameters.graph);
2266
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#hasValue"), parameters.object.hasValues.flatMap((item) => [item]), parameters.graph);
2267
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#in"), parameters.object.in_.toList().flatMap((value) => [
2264
2268
  value.length > 0
2265
2269
  ? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
2266
2270
  if (itemIndex === 0) {
2267
2271
  currentSubListResource = listResource;
2268
2272
  }
2269
2273
  else {
2270
- const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
2271
- currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
2274
+ const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
2275
+ currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
2272
2276
  currentSubListResource = newSubListResource;
2273
2277
  }
2274
- currentSubListResource.add($RdfVocabularies.rdf.first, [item], options?.graph);
2278
+ currentSubListResource.add($RdfVocabularies.rdf.first, [item], parameters.graph);
2275
2279
  if (itemIndex + 1 === list.length) {
2276
- currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, options?.graph);
2280
+ currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
2277
2281
  }
2278
2282
  return { currentSubListResource, listResource };
2279
2283
  }, {
2280
2284
  currentSubListResource: null,
2281
- listResource: resourceSet.resource((() => dataFactory.blankNode())()),
2285
+ listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
2282
2286
  }).listResource.identifier
2283
2287
  : $RdfVocabularies.rdf.nil,
2284
- ]), options?.graph);
2285
- resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#isDefinedBy"), _propertyShape.isDefinedBy.toList(), options?.graph);
2286
- resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#label"), _propertyShape.label
2288
+ ]), parameters.graph);
2289
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#isDefinedBy"), parameters.object.isDefinedBy.toList(), parameters.graph);
2290
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#label"), parameters.object.label
2287
2291
  .toList()
2288
- .flatMap((value) => [$literalFactory.string(value)]), options?.graph);
2289
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#languageIn"), _propertyShape.languageIn.toList().flatMap((value) => [
2292
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
2293
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#languageIn"), parameters.object.languageIn.toList().flatMap((value) => [
2290
2294
  value.length > 0
2291
2295
  ? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
2292
2296
  if (itemIndex === 0) {
2293
2297
  currentSubListResource = listResource;
2294
2298
  }
2295
2299
  else {
2296
- const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
2297
- currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
2300
+ const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
2301
+ currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
2298
2302
  currentSubListResource = newSubListResource;
2299
2303
  }
2300
- currentSubListResource.add($RdfVocabularies.rdf.first, [$literalFactory.string(item)], options?.graph);
2304
+ currentSubListResource.add($RdfVocabularies.rdf.first, [$literalFactory.string(item)], parameters.graph);
2301
2305
  if (itemIndex + 1 === list.length) {
2302
- currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, options?.graph);
2306
+ currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
2303
2307
  }
2304
2308
  return { currentSubListResource, listResource };
2305
2309
  }, {
2306
2310
  currentSubListResource: null,
2307
- listResource: resourceSet.resource((() => dataFactory.blankNode())()),
2311
+ listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
2308
2312
  }).listResource.identifier
2309
2313
  : $RdfVocabularies.rdf.nil,
2310
- ]), options?.graph);
2311
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"), _propertyShape.maxCount
2314
+ ]), parameters.graph);
2315
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"), parameters.object.maxCount
2312
2316
  .toList()
2313
2317
  .flatMap((value) => [
2314
2318
  $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
2315
- ]), options?.graph);
2316
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxExclusive"), _propertyShape.maxExclusive.toList(), options?.graph);
2317
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxInclusive"), _propertyShape.maxInclusive.toList(), options?.graph);
2318
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxLength"), _propertyShape.maxLength
2319
+ ]), parameters.graph);
2320
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxExclusive"), parameters.object.maxExclusive.toList(), parameters.graph);
2321
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxInclusive"), parameters.object.maxInclusive.toList(), parameters.graph);
2322
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxLength"), parameters.object.maxLength
2319
2323
  .toList()
2320
2324
  .flatMap((value) => [
2321
2325
  $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
2322
- ]), options?.graph);
2323
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"), _propertyShape.minCount
2326
+ ]), parameters.graph);
2327
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"), parameters.object.minCount
2324
2328
  .toList()
2325
2329
  .flatMap((value) => [
2326
2330
  $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
2327
- ]), options?.graph);
2328
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minExclusive"), _propertyShape.minExclusive.toList(), options?.graph);
2329
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minInclusive"), _propertyShape.minInclusive.toList(), options?.graph);
2330
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minLength"), _propertyShape.minLength
2331
+ ]), parameters.graph);
2332
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minExclusive"), parameters.object.minExclusive.toList(), parameters.graph);
2333
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minInclusive"), parameters.object.minInclusive.toList(), parameters.graph);
2334
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minLength"), parameters.object.minLength
2331
2335
  .toList()
2332
2336
  .flatMap((value) => [
2333
2337
  $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
2334
- ]), options?.graph);
2335
- resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#mutable"), _propertyShape.mutable
2338
+ ]), parameters.graph);
2339
+ parameters.resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#mutable"), parameters.object.mutable
2336
2340
  .toList()
2337
2341
  .flatMap((value) => [
2338
2342
  $literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
2339
- ]), options?.graph);
2340
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#name"), _propertyShape.name
2343
+ ]), parameters.graph);
2344
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#name"), parameters.object.name
2341
2345
  .toList()
2342
- .flatMap((value) => [$literalFactory.string(value)]), options?.graph);
2343
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#node"), _propertyShape.node.toList(), options?.graph);
2344
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"), _propertyShape.nodeKind.toList(), options?.graph);
2345
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#not"), _propertyShape.not.flatMap((item) => [item]), options?.graph);
2346
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#or"), _propertyShape.or.toList().flatMap((value) => [
2346
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
2347
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#node"), parameters.object.node.toList(), parameters.graph);
2348
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"), parameters.object.nodeKind.toList(), parameters.graph);
2349
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#not"), parameters.object.not.flatMap((item) => [item]), parameters.graph);
2350
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#or"), parameters.object.or.toList().flatMap((value) => [
2347
2351
  value.length > 0
2348
2352
  ? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
2349
2353
  if (itemIndex === 0) {
2350
2354
  currentSubListResource = listResource;
2351
2355
  }
2352
2356
  else {
2353
- const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
2354
- currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
2357
+ const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
2358
+ currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
2355
2359
  currentSubListResource = newSubListResource;
2356
2360
  }
2357
- currentSubListResource.add($RdfVocabularies.rdf.first, [item], options?.graph);
2361
+ currentSubListResource.add($RdfVocabularies.rdf.first, [item], parameters.graph);
2358
2362
  if (itemIndex + 1 === list.length) {
2359
- currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, options?.graph);
2363
+ currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
2360
2364
  }
2361
2365
  return { currentSubListResource, listResource };
2362
2366
  }, {
2363
2367
  currentSubListResource: null,
2364
- listResource: resourceSet.resource((() => dataFactory.blankNode())()),
2368
+ listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
2365
2369
  }).listResource.identifier
2366
2370
  : $RdfVocabularies.rdf.nil,
2367
- ]), options?.graph);
2368
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#order"), _propertyShape.order
2371
+ ]), parameters.graph);
2372
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#order"), parameters.object.order
2369
2373
  .toList()
2370
2374
  .flatMap((value) => [
2371
2375
  $literalFactory.number(value, $RdfVocabularies.xsd.double),
2372
- ]), options?.graph);
2373
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#path"), [
2374
- $PropertyPath.$toRdfResource(_propertyShape.path, {
2375
- graph: options?.graph,
2376
- resourceSet: resourceSet,
2376
+ ]), parameters.graph);
2377
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#path"), [
2378
+ $PropertyPath.toRdfResource(parameters.object.path, {
2379
+ graph: parameters.graph,
2380
+ resourceSet: parameters.resourceSet,
2377
2381
  }).identifier,
2378
- ], options?.graph);
2379
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#pattern"), _propertyShape.patterns.flatMap((item) => [$literalFactory.string(item)]), options?.graph);
2380
- resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#resolve"), _propertyShape.resolve.toList(), options?.graph);
2381
- resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#name"), _propertyShape.shaclmateName
2382
+ ], parameters.graph);
2383
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#pattern"), parameters.object.patterns.flatMap((item) => [
2384
+ $literalFactory.string(item),
2385
+ ]), parameters.graph);
2386
+ parameters.resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#resolve"), parameters.object.resolve.toList(), parameters.graph);
2387
+ parameters.resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#name"), parameters.object.shaclmateName
2382
2388
  .toList()
2383
- .flatMap((value) => [$literalFactory.string(value)]), options?.graph);
2384
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#uniqueLang"), _propertyShape.uniqueLang
2389
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
2390
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#uniqueLang"), parameters.object.uniqueLang
2385
2391
  .toList()
2386
2392
  .flatMap((value) => [
2387
2393
  $literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
2388
- ]), options?.graph);
2389
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#xone"), _propertyShape.xone.toList().flatMap((value) => [
2394
+ ]), parameters.graph);
2395
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#xone"), parameters.object.xone.toList().flatMap((value) => [
2390
2396
  value.length > 0
2391
2397
  ? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
2392
2398
  if (itemIndex === 0) {
2393
2399
  currentSubListResource = listResource;
2394
2400
  }
2395
2401
  else {
2396
- const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
2397
- currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
2402
+ const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
2403
+ currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
2398
2404
  currentSubListResource = newSubListResource;
2399
2405
  }
2400
- currentSubListResource.add($RdfVocabularies.rdf.first, [item], options?.graph);
2406
+ currentSubListResource.add($RdfVocabularies.rdf.first, [item], parameters.graph);
2401
2407
  if (itemIndex + 1 === list.length) {
2402
- currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, options?.graph);
2408
+ currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
2403
2409
  }
2404
2410
  return { currentSubListResource, listResource };
2405
2411
  }, {
2406
2412
  currentSubListResource: null,
2407
- listResource: resourceSet.resource((() => dataFactory.blankNode())()),
2413
+ listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
2408
2414
  }).listResource.identifier
2409
2415
  : $RdfVocabularies.rdf.nil,
2410
- ]), options?.graph);
2411
- return resource;
2412
- }
2413
- PropertyShape.$toRdfResource = $toRdfResource;
2414
- function $propertiesToStrings(_propertyShape) {
2416
+ ]), parameters.graph);
2417
+ return parameters.resource;
2418
+ };
2419
+ PropertyShape.toRdfResource = $wrap_ToRdfResourceFunction(PropertyShape._toRdfResource);
2420
+ function _propertiesToStrings(_propertyShape) {
2415
2421
  return $compactRecord({
2416
2422
  $identifier: _propertyShape.$identifier().toString(),
2417
2423
  label: _propertyShape.label.map((item) => item.toString()).extract(),
@@ -2422,15 +2428,15 @@ export var PropertyShape;
2422
2428
  .extract(),
2423
2429
  });
2424
2430
  }
2425
- PropertyShape.$propertiesToStrings = $propertiesToStrings;
2431
+ PropertyShape._propertiesToStrings = _propertiesToStrings;
2426
2432
  function $toString(_propertyShape) {
2427
- return `PropertyShape(${JSON.stringify($propertiesToStrings((_propertyShape ?? this)))})`;
2433
+ return `PropertyShape(${JSON.stringify(_propertiesToStrings((_propertyShape ?? this)))})`;
2428
2434
  }
2429
2435
  PropertyShape.$toString = $toString;
2430
2436
  })(PropertyShape || (PropertyShape = {}));
2431
2437
  export var PropertyGroup;
2432
2438
  (function (PropertyGroup) {
2433
- function $create(parameters) {
2439
+ function create(parameters) {
2434
2440
  const $identifierParameter = parameters?.$identifier;
2435
2441
  let $identifier;
2436
2442
  if (typeof $identifierParameter === "function") {
@@ -2478,13 +2484,13 @@ export var PropertyGroup;
2478
2484
  }
2479
2485
  return { $identifier, $type, comment, label };
2480
2486
  }
2481
- PropertyGroup.$create = $create;
2482
- let $Identifier;
2483
- (function ($Identifier) {
2484
- $Identifier.parse = $parseIdentifier;
2485
- $Identifier.stringify = NTriplesTerm.stringify;
2486
- })($Identifier = PropertyGroup.$Identifier || (PropertyGroup.$Identifier = {}));
2487
- function $filter(filter, value) {
2487
+ PropertyGroup.create = create;
2488
+ let Identifier;
2489
+ (function (Identifier) {
2490
+ Identifier.parse = $parseIdentifier;
2491
+ Identifier.stringify = NTriplesTerm.stringify;
2492
+ })(Identifier = PropertyGroup.Identifier || (PropertyGroup.Identifier = {}));
2493
+ function filter(filter, value) {
2488
2494
  if (filter.$identifier !== undefined &&
2489
2495
  !$filterIdentifier(filter.$identifier, value.$identifier())) {
2490
2496
  return false;
@@ -2499,34 +2505,8 @@ export var PropertyGroup;
2499
2505
  }
2500
2506
  return true;
2501
2507
  }
2502
- PropertyGroup.$filter = $filter;
2503
- PropertyGroup.$fromRdfResource = (resource, options) => {
2504
- let { context, graph, ignoreRdfType = false, objectSet, preferredLanguages, } = options ?? {};
2505
- if (!objectSet) {
2506
- objectSet = new $RdfjsDatasetObjectSet(resource.dataset);
2507
- }
2508
- return PropertyGroup.$propertiesFromRdfResource(resource, {
2509
- context,
2510
- graph,
2511
- ignoreRdfType,
2512
- objectSet,
2513
- preferredLanguages,
2514
- }).map($create);
2515
- };
2516
- PropertyGroup.$fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
2517
- .toResource()
2518
- .chain((resource) => PropertyGroup.$fromRdfResource(resource, options))));
2519
- PropertyGroup.$fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup");
2520
- function isPropertyGroup(object) {
2521
- switch (object.$type) {
2522
- case "PropertyGroup":
2523
- return true;
2524
- default:
2525
- return false;
2526
- }
2527
- }
2528
- PropertyGroup.isPropertyGroup = isPropertyGroup;
2529
- PropertyGroup.$propertiesFromRdfResource = ($resource, _$options) => {
2508
+ PropertyGroup.filter = filter;
2509
+ PropertyGroup._fromRdfResource = ($resource, _$options) => {
2530
2510
  return (!_$options.ignoreRdfType
2531
2511
  ? $resource
2532
2512
  .value($RdfVocabularies.rdf.type, { graph: _$options.graph })
@@ -2538,7 +2518,7 @@ export var PropertyGroup;
2538
2518
  return Right(true);
2539
2519
  }
2540
2520
  // Check arbitrary rdfs:subClassOf's of the expected type
2541
- if ($resource.isInstanceOf(PropertyGroup.$fromRdfType, {
2521
+ if ($resource.isInstanceOf(PropertyGroup.fromRdfType, {
2542
2522
  graph: _$options.graph,
2543
2523
  })) {
2544
2524
  return Right(true);
@@ -2553,10 +2533,10 @@ export var PropertyGroup;
2553
2533
  }).toValues())
2554
2534
  .chain((values) => values.chainMap((value) => value.toIdentifier()))
2555
2535
  .chain((values) => values.head())
2556
- .chain(($identifier) => Right("PropertyGroup").chain(($type) => $shaclPropertyFromRdf({
2536
+ .chain(($identifier) => $shaclPropertyFromRdf({
2557
2537
  graph: _$options.graph,
2558
2538
  resource: $resource,
2559
- propertySchema: PropertyGroup.$schema.properties.comment,
2539
+ propertySchema: PropertyGroup.schema.properties.comment,
2560
2540
  typeFromRdf: (resourceValues) => resourceValues
2561
2541
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
2562
2542
  .chain((values) => values.chainMap((value) => value.toString()))
@@ -2564,13 +2544,13 @@ export var PropertyGroup;
2564
2544
  ? values.map((value) => Maybe.of(value))
2565
2545
  : Resource.Values.fromValue({
2566
2546
  focusResource: $resource,
2567
- propertyPath: PropertyShape.$schema.properties.comment.path,
2547
+ propertyPath: PropertyShape.schema.properties.comment.path,
2568
2548
  value: Maybe.empty(),
2569
2549
  })),
2570
2550
  }).chain((comment) => $shaclPropertyFromRdf({
2571
2551
  graph: _$options.graph,
2572
2552
  resource: $resource,
2573
- propertySchema: PropertyGroup.$schema.properties.label,
2553
+ propertySchema: PropertyGroup.schema.properties.label,
2574
2554
  typeFromRdf: (resourceValues) => resourceValues
2575
2555
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
2576
2556
  .chain((values) => values.chainMap((value) => value.toString()))
@@ -2578,12 +2558,26 @@ export var PropertyGroup;
2578
2558
  ? values.map((value) => Maybe.of(value))
2579
2559
  : Resource.Values.fromValue({
2580
2560
  focusResource: $resource,
2581
- propertyPath: PropertyShape.$schema.properties.label.path,
2561
+ propertyPath: PropertyShape.schema.properties.label.path,
2582
2562
  value: Maybe.empty(),
2583
2563
  })),
2584
- }).map((label) => ({ $identifier, $type, comment, label }))))));
2564
+ }).map((label) => create({ $identifier, comment, label })))));
2585
2565
  };
2586
- PropertyGroup.$schema = {
2566
+ PropertyGroup.fromRdfResource = $wrap_FromRdfResourceFunction(PropertyGroup._fromRdfResource);
2567
+ PropertyGroup.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
2568
+ .toResource()
2569
+ .chain((resource) => PropertyGroup.fromRdfResource(resource, options))));
2570
+ PropertyGroup.fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup");
2571
+ function isPropertyGroup(object) {
2572
+ switch (object.$type) {
2573
+ case "PropertyGroup":
2574
+ return true;
2575
+ default:
2576
+ return false;
2577
+ }
2578
+ }
2579
+ PropertyGroup.isPropertyGroup = isPropertyGroup;
2580
+ PropertyGroup.schema = {
2587
2581
  properties: {
2588
2582
  $identifier: {
2589
2583
  kind: "Identifier",
@@ -2614,40 +2608,34 @@ export var PropertyGroup;
2614
2608
  },
2615
2609
  },
2616
2610
  };
2617
- function $toRdfResource(_propertyGroup, options) {
2618
- const resourceSet = options?.resourceSet ??
2619
- new ResourceSet({
2620
- dataFactory: dataFactory,
2621
- dataset: datasetFactory.dataset(),
2622
- });
2623
- const resource = resourceSet.resource(_propertyGroup.$identifier());
2624
- if (!options?.ignoreRdfType) {
2625
- resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup"), options?.graph);
2611
+ PropertyGroup._toRdfResource = (parameters) => {
2612
+ if (!parameters.ignoreRdfType) {
2613
+ parameters.resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/ns/shacl#PropertyGroup"), parameters.graph);
2626
2614
  }
2627
- resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#comment"), _propertyGroup.comment
2615
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#comment"), parameters.object.comment
2628
2616
  .toList()
2629
- .flatMap((value) => [$literalFactory.string(value)]), options?.graph);
2630
- resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#label"), _propertyGroup.label
2617
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
2618
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#label"), parameters.object.label
2631
2619
  .toList()
2632
- .flatMap((value) => [$literalFactory.string(value)]), options?.graph);
2633
- return resource;
2634
- }
2635
- PropertyGroup.$toRdfResource = $toRdfResource;
2636
- function $propertiesToStrings(_propertyGroup) {
2620
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
2621
+ return parameters.resource;
2622
+ };
2623
+ PropertyGroup.toRdfResource = $wrap_ToRdfResourceFunction(PropertyGroup._toRdfResource);
2624
+ function _propertiesToStrings(_propertyGroup) {
2637
2625
  return $compactRecord({
2638
2626
  $identifier: _propertyGroup.$identifier().toString(),
2639
2627
  label: _propertyGroup.label.map((item) => item.toString()).extract(),
2640
2628
  });
2641
2629
  }
2642
- PropertyGroup.$propertiesToStrings = $propertiesToStrings;
2630
+ PropertyGroup._propertiesToStrings = _propertiesToStrings;
2643
2631
  function $toString(_propertyGroup) {
2644
- return `PropertyGroup(${JSON.stringify($propertiesToStrings((_propertyGroup ?? this)))})`;
2632
+ return `PropertyGroup(${JSON.stringify(_propertiesToStrings((_propertyGroup ?? this)))})`;
2645
2633
  }
2646
2634
  PropertyGroup.$toString = $toString;
2647
2635
  })(PropertyGroup || (PropertyGroup = {}));
2648
2636
  export var Ontology;
2649
2637
  (function (Ontology) {
2650
- function $create(parameters) {
2638
+ function create(parameters) {
2651
2639
  const $identifierParameter = parameters?.$identifier;
2652
2640
  let $identifier;
2653
2641
  if (typeof $identifierParameter === "function") {
@@ -2739,13 +2727,13 @@ export var Ontology;
2739
2727
  tsImports,
2740
2728
  };
2741
2729
  }
2742
- Ontology.$create = $create;
2743
- let $Identifier;
2744
- (function ($Identifier) {
2745
- $Identifier.parse = $parseIdentifier;
2746
- $Identifier.stringify = NTriplesTerm.stringify;
2747
- })($Identifier = Ontology.$Identifier || (Ontology.$Identifier = {}));
2748
- function $filter(filter, value) {
2730
+ Ontology.create = create;
2731
+ let Identifier;
2732
+ (function (Identifier) {
2733
+ Identifier.parse = $parseIdentifier;
2734
+ Identifier.stringify = NTriplesTerm.stringify;
2735
+ })(Identifier = Ontology.Identifier || (Ontology.Identifier = {}));
2736
+ function filter(filter, value) {
2749
2737
  if (filter.$identifier !== undefined &&
2750
2738
  !$filterIdentifier(filter.$identifier, value.$identifier())) {
2751
2739
  return false;
@@ -2772,34 +2760,8 @@ export var Ontology;
2772
2760
  }
2773
2761
  return true;
2774
2762
  }
2775
- Ontology.$filter = $filter;
2776
- Ontology.$fromRdfResource = (resource, options) => {
2777
- let { context, graph, ignoreRdfType = false, objectSet, preferredLanguages, } = options ?? {};
2778
- if (!objectSet) {
2779
- objectSet = new $RdfjsDatasetObjectSet(resource.dataset);
2780
- }
2781
- return Ontology.$propertiesFromRdfResource(resource, {
2782
- context,
2783
- graph,
2784
- ignoreRdfType,
2785
- objectSet,
2786
- preferredLanguages,
2787
- }).map($create);
2788
- };
2789
- Ontology.$fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
2790
- .toResource()
2791
- .chain((resource) => Ontology.$fromRdfResource(resource, options))));
2792
- Ontology.$fromRdfType = dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology");
2793
- function isOntology(object) {
2794
- switch (object.$type) {
2795
- case "Ontology":
2796
- return true;
2797
- default:
2798
- return false;
2799
- }
2800
- }
2801
- Ontology.isOntology = isOntology;
2802
- Ontology.$propertiesFromRdfResource = ($resource, _$options) => {
2763
+ Ontology.filter = filter;
2764
+ Ontology._fromRdfResource = ($resource, _$options) => {
2803
2765
  return (!_$options.ignoreRdfType
2804
2766
  ? $resource
2805
2767
  .value($RdfVocabularies.rdf.type, { graph: _$options.graph })
@@ -2811,7 +2773,7 @@ export var Ontology;
2811
2773
  return Right(true);
2812
2774
  }
2813
2775
  // Check arbitrary rdfs:subClassOf's of the expected type
2814
- if ($resource.isInstanceOf(Ontology.$fromRdfType, {
2776
+ if ($resource.isInstanceOf(Ontology.fromRdfType, {
2815
2777
  graph: _$options.graph,
2816
2778
  })) {
2817
2779
  return Right(true);
@@ -2826,10 +2788,10 @@ export var Ontology;
2826
2788
  }).toValues())
2827
2789
  .chain((values) => values.chainMap((value) => value.toIdentifier()))
2828
2790
  .chain((values) => values.head())
2829
- .chain(($identifier) => Right("Ontology").chain(($type) => $shaclPropertyFromRdf({
2791
+ .chain(($identifier) => $shaclPropertyFromRdf({
2830
2792
  graph: _$options.graph,
2831
2793
  resource: $resource,
2832
- propertySchema: Ontology.$schema.properties.comment,
2794
+ propertySchema: Ontology.schema.properties.comment,
2833
2795
  typeFromRdf: (resourceValues) => resourceValues
2834
2796
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
2835
2797
  .chain((values) => values.chainMap((value) => value.toString()))
@@ -2837,13 +2799,13 @@ export var Ontology;
2837
2799
  ? values.map((value) => Maybe.of(value))
2838
2800
  : Resource.Values.fromValue({
2839
2801
  focusResource: $resource,
2840
- propertyPath: PropertyShape.$schema.properties.comment.path,
2802
+ propertyPath: PropertyShape.schema.properties.comment.path,
2841
2803
  value: Maybe.empty(),
2842
2804
  })),
2843
2805
  }).chain((comment) => $shaclPropertyFromRdf({
2844
2806
  graph: _$options.graph,
2845
2807
  resource: $resource,
2846
- propertySchema: Ontology.$schema.properties.label,
2808
+ propertySchema: Ontology.schema.properties.label,
2847
2809
  typeFromRdf: (resourceValues) => resourceValues
2848
2810
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
2849
2811
  .chain((values) => values.chainMap((value) => value.toString()))
@@ -2851,13 +2813,13 @@ export var Ontology;
2851
2813
  ? values.map((value) => Maybe.of(value))
2852
2814
  : Resource.Values.fromValue({
2853
2815
  focusResource: $resource,
2854
- propertyPath: PropertyShape.$schema.properties.label.path,
2816
+ propertyPath: PropertyShape.schema.properties.label.path,
2855
2817
  value: Maybe.empty(),
2856
2818
  })),
2857
2819
  }).chain((label) => $shaclPropertyFromRdf({
2858
2820
  graph: _$options.graph,
2859
2821
  resource: $resource,
2860
- propertySchema: Ontology.$schema.properties.tsFeatureExcludes,
2822
+ propertySchema: Ontology.schema.properties.tsFeatureExcludes,
2861
2823
  typeFromRdf: (resourceValues) => resourceValues
2862
2824
  .chain((values) => values.chainMap((value) => value.toIri([
2863
2825
  dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_All"),
@@ -2874,13 +2836,13 @@ export var Ontology;
2874
2836
  .map((values) => values.toArray())
2875
2837
  .map((valuesArray) => Resource.Values.fromValue({
2876
2838
  focusResource: $resource,
2877
- propertyPath: Ontology.$schema.properties.tsFeatureExcludes.path,
2839
+ propertyPath: Ontology.schema.properties.tsFeatureExcludes.path,
2878
2840
  value: valuesArray,
2879
2841
  })),
2880
2842
  }).chain((tsFeatureExcludes) => $shaclPropertyFromRdf({
2881
2843
  graph: _$options.graph,
2882
2844
  resource: $resource,
2883
- propertySchema: Ontology.$schema.properties.tsFeatureIncludes,
2845
+ propertySchema: Ontology.schema.properties.tsFeatureIncludes,
2884
2846
  typeFromRdf: (resourceValues) => resourceValues
2885
2847
  .chain((values) => values.chainMap((value) => value.toIri([
2886
2848
  dataFactory.namedNode("http://purl.org/shaclmate/ontology#_TsFeatures_All"),
@@ -2897,34 +2859,46 @@ export var Ontology;
2897
2859
  .map((values) => values.toArray())
2898
2860
  .map((valuesArray) => Resource.Values.fromValue({
2899
2861
  focusResource: $resource,
2900
- propertyPath: Ontology.$schema.properties.tsFeatureIncludes
2901
- .path,
2862
+ propertyPath: Ontology.schema.properties.tsFeatureIncludes.path,
2902
2863
  value: valuesArray,
2903
2864
  })),
2904
2865
  }).chain((tsFeatureIncludes) => $shaclPropertyFromRdf({
2905
2866
  graph: _$options.graph,
2906
2867
  resource: $resource,
2907
- propertySchema: Ontology.$schema.properties.tsImports,
2868
+ propertySchema: Ontology.schema.properties.tsImports,
2908
2869
  typeFromRdf: (resourceValues) => resourceValues
2909
2870
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
2910
2871
  .chain((values) => values.chainMap((value) => value.toString()))
2911
2872
  .map((values) => values.toArray())
2912
2873
  .map((valuesArray) => Resource.Values.fromValue({
2913
2874
  focusResource: $resource,
2914
- propertyPath: Ontology.$schema.properties.tsImports.path,
2875
+ propertyPath: Ontology.schema.properties.tsImports.path,
2915
2876
  value: valuesArray,
2916
2877
  })),
2917
- }).map((tsImports) => ({
2878
+ }).map((tsImports) => create({
2918
2879
  $identifier,
2919
- $type,
2920
2880
  comment,
2921
2881
  label,
2922
2882
  tsFeatureExcludes,
2923
2883
  tsFeatureIncludes,
2924
2884
  tsImports,
2925
- })))))))));
2885
+ }))))))));
2926
2886
  };
2927
- Ontology.$schema = {
2887
+ Ontology.fromRdfResource = $wrap_FromRdfResourceFunction(Ontology._fromRdfResource);
2888
+ Ontology.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
2889
+ .toResource()
2890
+ .chain((resource) => Ontology.fromRdfResource(resource, options))));
2891
+ Ontology.fromRdfType = dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology");
2892
+ function isOntology(object) {
2893
+ switch (object.$type) {
2894
+ case "Ontology":
2895
+ return true;
2896
+ default:
2897
+ return false;
2898
+ }
2899
+ }
2900
+ Ontology.isOntology = isOntology;
2901
+ Ontology.schema = {
2928
2902
  properties: {
2929
2903
  $identifier: {
2930
2904
  kind: "Identifier",
@@ -3007,43 +2981,39 @@ export var Ontology;
3007
2981
  },
3008
2982
  },
3009
2983
  };
3010
- function $toRdfResource(_ontology, options) {
3011
- const resourceSet = options?.resourceSet ??
3012
- new ResourceSet({
3013
- dataFactory: dataFactory,
3014
- dataset: datasetFactory.dataset(),
3015
- });
3016
- const resource = resourceSet.resource(_ontology.$identifier());
3017
- if (!options?.ignoreRdfType) {
3018
- resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology"), options?.graph);
2984
+ Ontology._toRdfResource = (parameters) => {
2985
+ if (!parameters.ignoreRdfType) {
2986
+ parameters.resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/2002/07/owl#Ontology"), parameters.graph);
3019
2987
  }
3020
- resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#comment"), _ontology.comment
2988
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#comment"), parameters.object.comment
3021
2989
  .toList()
3022
- .flatMap((value) => [$literalFactory.string(value)]), options?.graph);
3023
- resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#label"), _ontology.label
2990
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
2991
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#label"), parameters.object.label
3024
2992
  .toList()
3025
- .flatMap((value) => [$literalFactory.string(value)]), options?.graph);
3026
- resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsFeatureExclude"), _ontology.tsFeatureExcludes.flatMap((item) => [item]), options?.graph);
3027
- resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsFeatureInclude"), _ontology.tsFeatureIncludes.flatMap((item) => [item]), options?.graph);
3028
- resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsImport"), _ontology.tsImports.flatMap((item) => [$literalFactory.string(item)]), options?.graph);
3029
- return resource;
3030
- }
3031
- Ontology.$toRdfResource = $toRdfResource;
3032
- function $propertiesToStrings(_ontology) {
2993
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
2994
+ parameters.resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsFeatureExclude"), parameters.object.tsFeatureExcludes.flatMap((item) => [item]), parameters.graph);
2995
+ parameters.resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsFeatureInclude"), parameters.object.tsFeatureIncludes.flatMap((item) => [item]), parameters.graph);
2996
+ parameters.resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsImport"), parameters.object.tsImports.flatMap((item) => [
2997
+ $literalFactory.string(item),
2998
+ ]), parameters.graph);
2999
+ return parameters.resource;
3000
+ };
3001
+ Ontology.toRdfResource = $wrap_ToRdfResourceFunction(Ontology._toRdfResource);
3002
+ function _propertiesToStrings(_ontology) {
3033
3003
  return $compactRecord({
3034
3004
  $identifier: _ontology.$identifier().toString(),
3035
3005
  label: _ontology.label.map((item) => item.toString()).extract(),
3036
3006
  });
3037
3007
  }
3038
- Ontology.$propertiesToStrings = $propertiesToStrings;
3008
+ Ontology._propertiesToStrings = _propertiesToStrings;
3039
3009
  function $toString(_ontology) {
3040
- return `Ontology(${JSON.stringify($propertiesToStrings((_ontology ?? this)))})`;
3010
+ return `Ontology(${JSON.stringify(_propertiesToStrings((_ontology ?? this)))})`;
3041
3011
  }
3042
3012
  Ontology.$toString = $toString;
3043
3013
  })(Ontology || (Ontology = {}));
3044
3014
  export var NodeShape;
3045
3015
  (function (NodeShape) {
3046
- function $create(parameters) {
3016
+ function create(parameters) {
3047
3017
  const $identifierParameter = parameters?.$identifier;
3048
3018
  let $identifier;
3049
3019
  if (typeof $identifierParameter === "function") {
@@ -3746,13 +3716,13 @@ export var NodeShape;
3746
3716
  xone,
3747
3717
  };
3748
3718
  }
3749
- NodeShape.$create = $create;
3750
- let $Identifier;
3751
- (function ($Identifier) {
3752
- $Identifier.parse = $parseIdentifier;
3753
- $Identifier.stringify = NTriplesTerm.stringify;
3754
- })($Identifier = NodeShape.$Identifier || (NodeShape.$Identifier = {}));
3755
- function $filter(filter, value) {
3719
+ NodeShape.create = create;
3720
+ let Identifier;
3721
+ (function (Identifier) {
3722
+ Identifier.parse = $parseIdentifier;
3723
+ Identifier.stringify = NTriplesTerm.stringify;
3724
+ })(Identifier = NodeShape.Identifier || (NodeShape.Identifier = {}));
3725
+ function filter(filter, value) {
3756
3726
  if (filter.$identifier !== undefined &&
3757
3727
  !$filterIdentifier(filter.$identifier, value.$identifier())) {
3758
3728
  return false;
@@ -3919,34 +3889,8 @@ export var NodeShape;
3919
3889
  }
3920
3890
  return true;
3921
3891
  }
3922
- NodeShape.$filter = $filter;
3923
- NodeShape.$fromRdfResource = (resource, options) => {
3924
- let { context, graph, ignoreRdfType = false, objectSet, preferredLanguages, } = options ?? {};
3925
- if (!objectSet) {
3926
- objectSet = new $RdfjsDatasetObjectSet(resource.dataset);
3927
- }
3928
- return NodeShape.$propertiesFromRdfResource(resource, {
3929
- context,
3930
- graph,
3931
- ignoreRdfType,
3932
- objectSet,
3933
- preferredLanguages,
3934
- }).map($create);
3935
- };
3936
- NodeShape.$fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
3937
- .toResource()
3938
- .chain((resource) => NodeShape.$fromRdfResource(resource, options))));
3939
- NodeShape.$fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape");
3940
- function isNodeShape(object) {
3941
- switch (object.$type) {
3942
- case "NodeShape":
3943
- return true;
3944
- default:
3945
- return false;
3946
- }
3947
- }
3948
- NodeShape.isNodeShape = isNodeShape;
3949
- NodeShape.$propertiesFromRdfResource = ($resource, _$options) => {
3892
+ NodeShape.filter = filter;
3893
+ NodeShape._fromRdfResource = ($resource, _$options) => {
3950
3894
  return (!_$options.ignoreRdfType
3951
3895
  ? $resource
3952
3896
  .value($RdfVocabularies.rdf.type, { graph: _$options.graph })
@@ -3958,7 +3902,7 @@ export var NodeShape;
3958
3902
  return Right(true);
3959
3903
  }
3960
3904
  // Check arbitrary rdfs:subClassOf's of the expected type
3961
- if ($resource.isInstanceOf(NodeShape.$fromRdfType, {
3905
+ if ($resource.isInstanceOf(NodeShape.fromRdfType, {
3962
3906
  graph: _$options.graph,
3963
3907
  })) {
3964
3908
  return Right(true);
@@ -3973,15 +3917,15 @@ export var NodeShape;
3973
3917
  }).toValues())
3974
3918
  .chain((values) => values.chainMap((value) => value.toIdentifier()))
3975
3919
  .chain((values) => values.head())
3976
- .chain(($identifier) => Right("NodeShape").chain(($type) => $shaclPropertyFromRdf({
3920
+ .chain(($identifier) => $shaclPropertyFromRdf({
3977
3921
  graph: _$options.graph,
3978
3922
  resource: $resource,
3979
- propertySchema: NodeShape.$schema.properties.and,
3923
+ propertySchema: NodeShape.schema.properties.and,
3980
3924
  typeFromRdf: (resourceValues) => resourceValues
3981
3925
  .chain((values) => values.chainMap((value) => value.toList({ graph: _$options.graph })))
3982
3926
  .chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
3983
3927
  focusResource: $resource,
3984
- propertyPath: PropertyShape.$schema.properties.and.path,
3928
+ propertyPath: PropertyShape.schema.properties.and.path,
3985
3929
  values: valueList.toArray(),
3986
3930
  })).chain((values) => values.chainMap((value) => value.toIdentifier()))))
3987
3931
  .map((valueLists) => valueLists.map((valueList) => valueList.toArray()))
@@ -3989,38 +3933,38 @@ export var NodeShape;
3989
3933
  ? values.map((value) => Maybe.of(value))
3990
3934
  : Resource.Values.fromValue({
3991
3935
  focusResource: $resource,
3992
- propertyPath: PropertyShape.$schema.properties.and.path,
3936
+ propertyPath: PropertyShape.schema.properties.and.path,
3993
3937
  value: Maybe.empty(),
3994
3938
  })),
3995
3939
  }).chain((and) => $shaclPropertyFromRdf({
3996
3940
  graph: _$options.graph,
3997
3941
  resource: $resource,
3998
- propertySchema: NodeShape.$schema.properties.classes,
3942
+ propertySchema: NodeShape.schema.properties.classes,
3999
3943
  typeFromRdf: (resourceValues) => resourceValues
4000
3944
  .chain((values) => values.chainMap((value) => value.toIri()))
4001
3945
  .map((values) => values.toArray())
4002
3946
  .map((valuesArray) => Resource.Values.fromValue({
4003
3947
  focusResource: $resource,
4004
- propertyPath: PropertyShape.$schema.properties.classes.path,
3948
+ propertyPath: PropertyShape.schema.properties.classes.path,
4005
3949
  value: valuesArray,
4006
3950
  })),
4007
3951
  }).chain((classes) => $shaclPropertyFromRdf({
4008
3952
  graph: _$options.graph,
4009
3953
  resource: $resource,
4010
- propertySchema: NodeShape.$schema.properties.closed,
3954
+ propertySchema: NodeShape.schema.properties.closed,
4011
3955
  typeFromRdf: (resourceValues) => resourceValues
4012
3956
  .chain((values) => values.chainMap((value) => value.toBoolean()))
4013
3957
  .map((values) => values.length > 0
4014
3958
  ? values.map((value) => Maybe.of(value))
4015
3959
  : Resource.Values.fromValue({
4016
3960
  focusResource: $resource,
4017
- propertyPath: NodeShape.$schema.properties.closed.path,
3961
+ propertyPath: NodeShape.schema.properties.closed.path,
4018
3962
  value: Maybe.empty(),
4019
3963
  })),
4020
3964
  }).chain((closed) => $shaclPropertyFromRdf({
4021
3965
  graph: _$options.graph,
4022
3966
  resource: $resource,
4023
- propertySchema: NodeShape.$schema.properties.comment,
3967
+ propertySchema: NodeShape.schema.properties.comment,
4024
3968
  typeFromRdf: (resourceValues) => resourceValues
4025
3969
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
4026
3970
  .chain((values) => values.chainMap((value) => value.toString()))
@@ -4028,41 +3972,40 @@ export var NodeShape;
4028
3972
  ? values.map((value) => Maybe.of(value))
4029
3973
  : Resource.Values.fromValue({
4030
3974
  focusResource: $resource,
4031
- propertyPath: PropertyShape.$schema.properties.comment.path,
3975
+ propertyPath: PropertyShape.schema.properties.comment.path,
4032
3976
  value: Maybe.empty(),
4033
3977
  })),
4034
3978
  }).chain((comment) => $shaclPropertyFromRdf({
4035
3979
  graph: _$options.graph,
4036
3980
  resource: $resource,
4037
- propertySchema: NodeShape.$schema.properties.datatype,
3981
+ propertySchema: NodeShape.schema.properties.datatype,
4038
3982
  typeFromRdf: (resourceValues) => resourceValues
4039
3983
  .chain((values) => values.chainMap((value) => value.toIri()))
4040
3984
  .map((values) => values.length > 0
4041
3985
  ? values.map((value) => Maybe.of(value))
4042
3986
  : Resource.Values.fromValue({
4043
3987
  focusResource: $resource,
4044
- propertyPath: PropertyShape.$schema.properties.datatype
4045
- .path,
3988
+ propertyPath: PropertyShape.schema.properties.datatype.path,
4046
3989
  value: Maybe.empty(),
4047
3990
  })),
4048
3991
  }).chain((datatype) => $shaclPropertyFromRdf({
4049
3992
  graph: _$options.graph,
4050
3993
  resource: $resource,
4051
- propertySchema: NodeShape.$schema.properties.deactivated,
3994
+ propertySchema: NodeShape.schema.properties.deactivated,
4052
3995
  typeFromRdf: (resourceValues) => resourceValues
4053
3996
  .chain((values) => values.chainMap((value) => value.toBoolean()))
4054
3997
  .map((values) => values.length > 0
4055
3998
  ? values.map((value) => Maybe.of(value))
4056
3999
  : Resource.Values.fromValue({
4057
4000
  focusResource: $resource,
4058
- propertyPath: PropertyShape.$schema.properties
4059
- .deactivated.path,
4001
+ propertyPath: PropertyShape.schema.properties.deactivated
4002
+ .path,
4060
4003
  value: Maybe.empty(),
4061
4004
  })),
4062
4005
  }).chain((deactivated) => $shaclPropertyFromRdf({
4063
4006
  graph: _$options.graph,
4064
4007
  resource: $resource,
4065
- propertySchema: NodeShape.$schema.properties.discriminantValue,
4008
+ propertySchema: NodeShape.schema.properties.discriminantValue,
4066
4009
  typeFromRdf: (resourceValues) => resourceValues
4067
4010
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
4068
4011
  .chain((values) => values.chainMap((value) => value.toString()))
@@ -4070,56 +4013,55 @@ export var NodeShape;
4070
4013
  ? values.map((value) => Maybe.of(value))
4071
4014
  : Resource.Values.fromValue({
4072
4015
  focusResource: $resource,
4073
- propertyPath: NodeShape.$schema.properties
4016
+ propertyPath: NodeShape.schema.properties
4074
4017
  .discriminantValue.path,
4075
4018
  value: Maybe.empty(),
4076
4019
  })),
4077
4020
  }).chain((discriminantValue) => $shaclPropertyFromRdf({
4078
4021
  graph: _$options.graph,
4079
4022
  resource: $resource,
4080
- propertySchema: NodeShape.$schema.properties.extern,
4023
+ propertySchema: NodeShape.schema.properties.extern,
4081
4024
  typeFromRdf: (resourceValues) => resourceValues
4082
4025
  .chain((values) => values.chainMap((value) => value.toBoolean()))
4083
4026
  .map((values) => values.length > 0
4084
4027
  ? values.map((value) => Maybe.of(value))
4085
4028
  : Resource.Values.fromValue({
4086
4029
  focusResource: $resource,
4087
- propertyPath: NodeShape.$schema.properties.extern
4088
- .path,
4030
+ propertyPath: NodeShape.schema.properties.extern.path,
4089
4031
  value: Maybe.empty(),
4090
4032
  })),
4091
4033
  }).chain((extern) => $shaclPropertyFromRdf({
4092
4034
  graph: _$options.graph,
4093
4035
  resource: $resource,
4094
- propertySchema: NodeShape.$schema.properties.flags,
4036
+ propertySchema: NodeShape.schema.properties.flags,
4095
4037
  typeFromRdf: (resourceValues) => resourceValues
4096
4038
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
4097
4039
  .chain((values) => values.chainMap((value) => value.toString()))
4098
4040
  .map((values) => values.toArray())
4099
4041
  .map((valuesArray) => Resource.Values.fromValue({
4100
4042
  focusResource: $resource,
4101
- propertyPath: PropertyShape.$schema.properties.flags
4043
+ propertyPath: PropertyShape.schema.properties.flags
4102
4044
  .path,
4103
4045
  value: valuesArray,
4104
4046
  })),
4105
4047
  }).chain((flags) => $shaclPropertyFromRdf({
4106
4048
  graph: _$options.graph,
4107
4049
  resource: $resource,
4108
- propertySchema: NodeShape.$schema.properties.fromRdfType,
4050
+ propertySchema: NodeShape.schema.properties.fromRdfType,
4109
4051
  typeFromRdf: (resourceValues) => resourceValues
4110
4052
  .chain((values) => values.chainMap((value) => value.toIri()))
4111
4053
  .map((values) => values.length > 0
4112
4054
  ? values.map((value) => Maybe.of(value))
4113
4055
  : Resource.Values.fromValue({
4114
4056
  focusResource: $resource,
4115
- propertyPath: NodeShape.$schema.properties
4057
+ propertyPath: NodeShape.schema.properties
4116
4058
  .fromRdfType.path,
4117
4059
  value: Maybe.empty(),
4118
4060
  })),
4119
4061
  }).chain((fromRdfType) => $shaclPropertyFromRdf({
4120
4062
  graph: _$options.graph,
4121
4063
  resource: $resource,
4122
- propertySchema: NodeShape.$schema.properties.hasValues,
4064
+ propertySchema: NodeShape.schema.properties.hasValues,
4123
4065
  typeFromRdf: (resourceValues) => resourceValues
4124
4066
  .chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
4125
4067
  switch (term.termType) {
@@ -4131,7 +4073,7 @@ export var NodeShape;
4131
4073
  actualValue: term,
4132
4074
  expectedValueType: "(NamedNode | Literal)",
4133
4075
  focusResource: $resource,
4134
- propertyPath: PropertyShape.$schema
4076
+ propertyPath: PropertyShape.schema
4135
4077
  .properties.hasValues
4136
4078
  .path,
4137
4079
  }));
@@ -4140,21 +4082,21 @@ export var NodeShape;
4140
4082
  .map((values) => values.toArray())
4141
4083
  .map((valuesArray) => Resource.Values.fromValue({
4142
4084
  focusResource: $resource,
4143
- propertyPath: PropertyShape.$schema.properties
4085
+ propertyPath: PropertyShape.schema.properties
4144
4086
  .hasValues.path,
4145
4087
  value: valuesArray,
4146
4088
  })),
4147
4089
  }).chain((hasValues) => $shaclPropertyFromRdf({
4148
4090
  graph: _$options.graph,
4149
4091
  resource: $resource,
4150
- propertySchema: NodeShape.$schema.properties.ignoredProperties,
4092
+ propertySchema: NodeShape.schema.properties.ignoredProperties,
4151
4093
  typeFromRdf: (resourceValues) => resourceValues
4152
4094
  .chain((values) => values.chainMap((value) => value.toList({
4153
4095
  graph: _$options.graph,
4154
4096
  })))
4155
4097
  .chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
4156
4098
  focusResource: $resource,
4157
- propertyPath: NodeShape.$schema.properties
4099
+ propertyPath: NodeShape.schema.properties
4158
4100
  .ignoredProperties.path,
4159
4101
  values: valueList.toArray(),
4160
4102
  })).chain((values) => values.chainMap((value) => value.toIri()))))
@@ -4163,26 +4105,24 @@ export var NodeShape;
4163
4105
  ? values.map((value) => Maybe.of(value))
4164
4106
  : Resource.Values.fromValue({
4165
4107
  focusResource: $resource,
4166
- propertyPath: NodeShape.$schema.properties
4108
+ propertyPath: NodeShape.schema.properties
4167
4109
  .ignoredProperties.path,
4168
4110
  value: Maybe.empty(),
4169
4111
  })),
4170
4112
  }).chain((ignoredProperties) => $shaclPropertyFromRdf({
4171
4113
  graph: _$options.graph,
4172
4114
  resource: $resource,
4173
- propertySchema: NodeShape.$schema.properties.in_,
4115
+ propertySchema: NodeShape.schema.properties.in_,
4174
4116
  typeFromRdf: (resourceValues) => resourceValues
4175
4117
  .chain((values) => values.chainMap((value) => value.toList({
4176
4118
  graph: _$options.graph,
4177
4119
  })))
4178
4120
  .chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
4179
4121
  focusResource: $resource,
4180
- propertyPath: PropertyShape.$schema
4122
+ propertyPath: PropertyShape.schema
4181
4123
  .properties.in_.path,
4182
4124
  values: valueList.toArray(),
4183
- })).chain((values) => values.chainMap((value) => value
4184
- .toTerm()
4185
- .chain((term) => {
4125
+ })).chain((values) => values.chainMap((value) => value.toTerm().chain((term) => {
4186
4126
  switch (term.termType) {
4187
4127
  case "NamedNode":
4188
4128
  case "Literal":
@@ -4193,9 +4133,9 @@ export var NodeShape;
4193
4133
  expectedValueType: "(NamedNode | Literal)",
4194
4134
  focusResource: $resource,
4195
4135
  propertyPath: PropertyShape
4196
- .$schema
4197
- .properties
4198
- .in_.path,
4136
+ .schema
4137
+ .properties.in_
4138
+ .path,
4199
4139
  }));
4200
4140
  }
4201
4141
  })))))
@@ -4204,21 +4144,21 @@ export var NodeShape;
4204
4144
  ? values.map((value) => Maybe.of(value))
4205
4145
  : Resource.Values.fromValue({
4206
4146
  focusResource: $resource,
4207
- propertyPath: PropertyShape.$schema
4147
+ propertyPath: PropertyShape.schema
4208
4148
  .properties.in_.path,
4209
4149
  value: Maybe.empty(),
4210
4150
  })),
4211
4151
  }).chain((in_) => $shaclPropertyFromRdf({
4212
4152
  graph: _$options.graph,
4213
4153
  resource: $resource,
4214
- propertySchema: NodeShape.$schema.properties.isDefinedBy,
4154
+ propertySchema: NodeShape.schema.properties.isDefinedBy,
4215
4155
  typeFromRdf: (resourceValues) => resourceValues
4216
4156
  .chain((values) => values.chainMap((value) => value.toIdentifier()))
4217
4157
  .map((values) => values.length > 0
4218
4158
  ? values.map((value) => Maybe.of(value))
4219
4159
  : Resource.Values.fromValue({
4220
4160
  focusResource: $resource,
4221
- propertyPath: PropertyShape.$schema
4161
+ propertyPath: PropertyShape.schema
4222
4162
  .properties.isDefinedBy
4223
4163
  .path,
4224
4164
  value: Maybe.empty(),
@@ -4226,7 +4166,7 @@ export var NodeShape;
4226
4166
  }).chain((isDefinedBy) => $shaclPropertyFromRdf({
4227
4167
  graph: _$options.graph,
4228
4168
  resource: $resource,
4229
- propertySchema: NodeShape.$schema.properties.label,
4169
+ propertySchema: NodeShape.schema.properties.label,
4230
4170
  typeFromRdf: (resourceValues) => resourceValues
4231
4171
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
4232
4172
  .chain((values) => values.chainMap((value) => value.toString()))
@@ -4234,26 +4174,23 @@ export var NodeShape;
4234
4174
  ? values.map((value) => Maybe.of(value))
4235
4175
  : Resource.Values.fromValue({
4236
4176
  focusResource: $resource,
4237
- propertyPath: PropertyShape.$schema
4238
- .properties.label
4239
- .path,
4177
+ propertyPath: PropertyShape.schema
4178
+ .properties.label.path,
4240
4179
  value: Maybe.empty(),
4241
4180
  })),
4242
4181
  }).chain((label) => $shaclPropertyFromRdf({
4243
4182
  graph: _$options.graph,
4244
4183
  resource: $resource,
4245
- propertySchema: NodeShape.$schema.properties.languageIn,
4184
+ propertySchema: NodeShape.schema.properties.languageIn,
4246
4185
  typeFromRdf: (resourceValues) => resourceValues
4247
4186
  .chain((values) => values.chainMap((value) => value.toList({
4248
4187
  graph: _$options.graph,
4249
4188
  })))
4250
4189
  .chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
4251
4190
  focusResource: $resource,
4252
- propertyPath: PropertyShape
4253
- .$schema
4191
+ propertyPath: PropertyShape.schema
4254
4192
  .properties
4255
- .languageIn
4256
- .path,
4193
+ .languageIn.path,
4257
4194
  values: valueList.toArray(),
4258
4195
  }))
4259
4196
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
@@ -4263,32 +4200,30 @@ export var NodeShape;
4263
4200
  ? values.map((value) => Maybe.of(value))
4264
4201
  : Resource.Values.fromValue({
4265
4202
  focusResource: $resource,
4266
- propertyPath: PropertyShape.$schema
4267
- .properties
4268
- .languageIn.path,
4203
+ propertyPath: PropertyShape.schema
4204
+ .properties.languageIn
4205
+ .path,
4269
4206
  value: Maybe.empty(),
4270
4207
  })),
4271
4208
  }).chain((languageIn) => $shaclPropertyFromRdf({
4272
4209
  graph: _$options.graph,
4273
4210
  resource: $resource,
4274
- propertySchema: NodeShape.$schema.properties.maxCount,
4211
+ propertySchema: NodeShape.schema.properties.maxCount,
4275
4212
  typeFromRdf: (resourceValues) => resourceValues
4276
4213
  .chain((values) => values.chainMap((value) => value.toBigInt()))
4277
4214
  .map((values) => values.length > 0
4278
4215
  ? values.map((value) => Maybe.of(value))
4279
4216
  : Resource.Values.fromValue({
4280
4217
  focusResource: $resource,
4281
- propertyPath: PropertyShape
4282
- .$schema
4283
- .properties
4284
- .maxCount.path,
4218
+ propertyPath: PropertyShape.schema
4219
+ .properties.maxCount
4220
+ .path,
4285
4221
  value: Maybe.empty(),
4286
4222
  })),
4287
4223
  }).chain((maxCount) => $shaclPropertyFromRdf({
4288
4224
  graph: _$options.graph,
4289
4225
  resource: $resource,
4290
- propertySchema: NodeShape.$schema.properties
4291
- .maxExclusive,
4226
+ propertySchema: NodeShape.schema.properties.maxExclusive,
4292
4227
  typeFromRdf: (resourceValues) => resourceValues
4293
4228
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
4294
4229
  .chain((values) => values.chainMap((value) => value.toLiteral()))
@@ -4296,8 +4231,7 @@ export var NodeShape;
4296
4231
  ? values.map((value) => Maybe.of(value))
4297
4232
  : Resource.Values.fromValue({
4298
4233
  focusResource: $resource,
4299
- propertyPath: PropertyShape
4300
- .$schema
4234
+ propertyPath: PropertyShape.schema
4301
4235
  .properties
4302
4236
  .maxExclusive
4303
4237
  .path,
@@ -4306,7 +4240,7 @@ export var NodeShape;
4306
4240
  }).chain((maxExclusive) => $shaclPropertyFromRdf({
4307
4241
  graph: _$options.graph,
4308
4242
  resource: $resource,
4309
- propertySchema: NodeShape.$schema.properties
4243
+ propertySchema: NodeShape.schema.properties
4310
4244
  .maxInclusive,
4311
4245
  typeFromRdf: (resourceValues) => resourceValues
4312
4246
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
@@ -4316,7 +4250,7 @@ export var NodeShape;
4316
4250
  : Resource.Values.fromValue({
4317
4251
  focusResource: $resource,
4318
4252
  propertyPath: PropertyShape
4319
- .$schema
4253
+ .schema
4320
4254
  .properties
4321
4255
  .maxInclusive
4322
4256
  .path,
@@ -4325,8 +4259,7 @@ export var NodeShape;
4325
4259
  }).chain((maxInclusive) => $shaclPropertyFromRdf({
4326
4260
  graph: _$options.graph,
4327
4261
  resource: $resource,
4328
- propertySchema: NodeShape.$schema.properties
4329
- .maxLength,
4262
+ propertySchema: NodeShape.schema.properties.maxLength,
4330
4263
  typeFromRdf: (resourceValues) => resourceValues
4331
4264
  .chain((values) => values.chainMap((value) => value.toBigInt()))
4332
4265
  .map((values) => values.length > 0
@@ -4334,7 +4267,7 @@ export var NodeShape;
4334
4267
  : Resource.Values.fromValue({
4335
4268
  focusResource: $resource,
4336
4269
  propertyPath: PropertyShape
4337
- .$schema
4270
+ .schema
4338
4271
  .properties
4339
4272
  .maxLength
4340
4273
  .path,
@@ -4343,7 +4276,7 @@ export var NodeShape;
4343
4276
  }).chain((maxLength) => $shaclPropertyFromRdf({
4344
4277
  graph: _$options.graph,
4345
4278
  resource: $resource,
4346
- propertySchema: NodeShape.$schema.properties
4279
+ propertySchema: NodeShape.schema.properties
4347
4280
  .minCount,
4348
4281
  typeFromRdf: (resourceValues) => resourceValues
4349
4282
  .chain((values) => values.chainMap((value) => value.toBigInt()))
@@ -4352,7 +4285,7 @@ export var NodeShape;
4352
4285
  : Resource.Values.fromValue({
4353
4286
  focusResource: $resource,
4354
4287
  propertyPath: PropertyShape
4355
- .$schema
4288
+ .schema
4356
4289
  .properties
4357
4290
  .minCount
4358
4291
  .path,
@@ -4361,7 +4294,7 @@ export var NodeShape;
4361
4294
  }).chain((minCount) => $shaclPropertyFromRdf({
4362
4295
  graph: _$options.graph,
4363
4296
  resource: $resource,
4364
- propertySchema: NodeShape.$schema.properties
4297
+ propertySchema: NodeShape.schema.properties
4365
4298
  .minExclusive,
4366
4299
  typeFromRdf: (resourceValues) => resourceValues
4367
4300
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
@@ -4371,7 +4304,7 @@ export var NodeShape;
4371
4304
  : Resource.Values.fromValue({
4372
4305
  focusResource: $resource,
4373
4306
  propertyPath: PropertyShape
4374
- .$schema
4307
+ .schema
4375
4308
  .properties
4376
4309
  .minExclusive
4377
4310
  .path,
@@ -4380,18 +4313,17 @@ export var NodeShape;
4380
4313
  }).chain((minExclusive) => $shaclPropertyFromRdf({
4381
4314
  graph: _$options.graph,
4382
4315
  resource: $resource,
4383
- propertySchema: NodeShape.$schema.properties
4316
+ propertySchema: NodeShape.schema.properties
4384
4317
  .minInclusive,
4385
4318
  typeFromRdf: (resourceValues) => resourceValues
4386
4319
  .chain((values) => $fromRdfPreferredLanguages(values, _$options.preferredLanguages))
4387
4320
  .chain((values) => values.chainMap((value) => value.toLiteral()))
4388
- .map((values) => values.length >
4389
- 0
4321
+ .map((values) => values.length > 0
4390
4322
  ? values.map((value) => Maybe.of(value))
4391
4323
  : Resource.Values.fromValue({
4392
4324
  focusResource: $resource,
4393
4325
  propertyPath: PropertyShape
4394
- .$schema
4326
+ .schema
4395
4327
  .properties
4396
4328
  .minInclusive
4397
4329
  .path,
@@ -4400,8 +4332,7 @@ export var NodeShape;
4400
4332
  }).chain((minInclusive) => $shaclPropertyFromRdf({
4401
4333
  graph: _$options.graph,
4402
4334
  resource: $resource,
4403
- propertySchema: NodeShape.$schema
4404
- .properties
4335
+ propertySchema: NodeShape.schema.properties
4405
4336
  .minLength,
4406
4337
  typeFromRdf: (resourceValues) => resourceValues
4407
4338
  .chain((values) => values.chainMap((value) => value.toBigInt()))
@@ -4411,7 +4342,7 @@ export var NodeShape;
4411
4342
  : Resource.Values.fromValue({
4412
4343
  focusResource: $resource,
4413
4344
  propertyPath: PropertyShape
4414
- .$schema
4345
+ .schema
4415
4346
  .properties
4416
4347
  .minLength
4417
4348
  .path,
@@ -4420,7 +4351,7 @@ export var NodeShape;
4420
4351
  }).chain((minLength) => $shaclPropertyFromRdf({
4421
4352
  graph: _$options.graph,
4422
4353
  resource: $resource,
4423
- propertySchema: NodeShape.$schema
4354
+ propertySchema: NodeShape.schema
4424
4355
  .properties
4425
4356
  .mutable,
4426
4357
  typeFromRdf: (resourceValues) => resourceValues
@@ -4431,7 +4362,7 @@ export var NodeShape;
4431
4362
  : Resource.Values.fromValue({
4432
4363
  focusResource: $resource,
4433
4364
  propertyPath: PropertyShape
4434
- .$schema
4365
+ .schema
4435
4366
  .properties
4436
4367
  .mutable
4437
4368
  .path,
@@ -4440,7 +4371,7 @@ export var NodeShape;
4440
4371
  }).chain((mutable) => $shaclPropertyFromRdf({
4441
4372
  graph: _$options.graph,
4442
4373
  resource: $resource,
4443
- propertySchema: NodeShape.$schema
4374
+ propertySchema: NodeShape.schema
4444
4375
  .properties
4445
4376
  .node,
4446
4377
  typeFromRdf: (resourceValues) => resourceValues
@@ -4451,7 +4382,7 @@ export var NodeShape;
4451
4382
  : Resource.Values.fromValue({
4452
4383
  focusResource: $resource,
4453
4384
  propertyPath: PropertyShape
4454
- .$schema
4385
+ .schema
4455
4386
  .properties
4456
4387
  .node
4457
4388
  .path,
@@ -4460,7 +4391,7 @@ export var NodeShape;
4460
4391
  }).chain((node) => $shaclPropertyFromRdf({
4461
4392
  graph: _$options.graph,
4462
4393
  resource: $resource,
4463
- propertySchema: NodeShape.$schema
4394
+ propertySchema: NodeShape.schema
4464
4395
  .properties
4465
4396
  .nodeKind,
4466
4397
  typeFromRdf: (resourceValues) => resourceValues
@@ -4478,7 +4409,7 @@ export var NodeShape;
4478
4409
  : Resource.Values.fromValue({
4479
4410
  focusResource: $resource,
4480
4411
  propertyPath: PropertyShape
4481
- .$schema
4412
+ .schema
4482
4413
  .properties
4483
4414
  .nodeKind
4484
4415
  .path,
@@ -4487,7 +4418,7 @@ export var NodeShape;
4487
4418
  }).chain((nodeKind) => $shaclPropertyFromRdf({
4488
4419
  graph: _$options.graph,
4489
4420
  resource: $resource,
4490
- propertySchema: NodeShape.$schema
4421
+ propertySchema: NodeShape.schema
4491
4422
  .properties
4492
4423
  .not,
4493
4424
  typeFromRdf: (resourceValues) => resourceValues
@@ -4496,7 +4427,7 @@ export var NodeShape;
4496
4427
  .map((valuesArray) => Resource.Values.fromValue({
4497
4428
  focusResource: $resource,
4498
4429
  propertyPath: PropertyShape
4499
- .$schema
4430
+ .schema
4500
4431
  .properties
4501
4432
  .not
4502
4433
  .path,
@@ -4505,7 +4436,7 @@ export var NodeShape;
4505
4436
  }).chain((not) => $shaclPropertyFromRdf({
4506
4437
  graph: _$options.graph,
4507
4438
  resource: $resource,
4508
- propertySchema: NodeShape.$schema
4439
+ propertySchema: NodeShape.schema
4509
4440
  .properties
4510
4441
  .or,
4511
4442
  typeFromRdf: (resourceValues) => resourceValues
@@ -4515,7 +4446,7 @@ export var NodeShape;
4515
4446
  .chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
4516
4447
  focusResource: $resource,
4517
4448
  propertyPath: PropertyShape
4518
- .$schema
4449
+ .schema
4519
4450
  .properties
4520
4451
  .or
4521
4452
  .path,
@@ -4528,7 +4459,7 @@ export var NodeShape;
4528
4459
  : Resource.Values.fromValue({
4529
4460
  focusResource: $resource,
4530
4461
  propertyPath: PropertyShape
4531
- .$schema
4462
+ .schema
4532
4463
  .properties
4533
4464
  .or
4534
4465
  .path,
@@ -4537,7 +4468,7 @@ export var NodeShape;
4537
4468
  }).chain((or) => $shaclPropertyFromRdf({
4538
4469
  graph: _$options.graph,
4539
4470
  resource: $resource,
4540
- propertySchema: NodeShape.$schema
4471
+ propertySchema: NodeShape.schema
4541
4472
  .properties
4542
4473
  .patterns,
4543
4474
  typeFromRdf: (resourceValues) => resourceValues
@@ -4547,7 +4478,7 @@ export var NodeShape;
4547
4478
  .map((valuesArray) => Resource.Values.fromValue({
4548
4479
  focusResource: $resource,
4549
4480
  propertyPath: PropertyShape
4550
- .$schema
4481
+ .schema
4551
4482
  .properties
4552
4483
  .patterns
4553
4484
  .path,
@@ -4556,7 +4487,7 @@ export var NodeShape;
4556
4487
  }).chain((patterns) => $shaclPropertyFromRdf({
4557
4488
  graph: _$options.graph,
4558
4489
  resource: $resource,
4559
- propertySchema: NodeShape.$schema
4490
+ propertySchema: NodeShape.schema
4560
4491
  .properties
4561
4492
  .properties,
4562
4493
  typeFromRdf: (resourceValues) => resourceValues
@@ -4565,7 +4496,7 @@ export var NodeShape;
4565
4496
  .map((valuesArray) => Resource.Values.fromValue({
4566
4497
  focusResource: $resource,
4567
4498
  propertyPath: NodeShape
4568
- .$schema
4499
+ .schema
4569
4500
  .properties
4570
4501
  .properties
4571
4502
  .path,
@@ -4574,7 +4505,7 @@ export var NodeShape;
4574
4505
  }).chain((properties) => $shaclPropertyFromRdf({
4575
4506
  graph: _$options.graph,
4576
4507
  resource: $resource,
4577
- propertySchema: NodeShape.$schema
4508
+ propertySchema: NodeShape.schema
4578
4509
  .properties
4579
4510
  .rdfType,
4580
4511
  typeFromRdf: (resourceValues) => resourceValues
@@ -4585,7 +4516,7 @@ export var NodeShape;
4585
4516
  : Resource.Values.fromValue({
4586
4517
  focusResource: $resource,
4587
4518
  propertyPath: NodeShape
4588
- .$schema
4519
+ .schema
4589
4520
  .properties
4590
4521
  .rdfType
4591
4522
  .path,
@@ -4594,7 +4525,7 @@ export var NodeShape;
4594
4525
  }).chain((rdfType) => $shaclPropertyFromRdf({
4595
4526
  graph: _$options.graph,
4596
4527
  resource: $resource,
4597
- propertySchema: NodeShape.$schema
4528
+ propertySchema: NodeShape.schema
4598
4529
  .properties
4599
4530
  .shaclmateName,
4600
4531
  typeFromRdf: (resourceValues) => resourceValues
@@ -4606,7 +4537,7 @@ export var NodeShape;
4606
4537
  : Resource.Values.fromValue({
4607
4538
  focusResource: $resource,
4608
4539
  propertyPath: PropertyShape
4609
- .$schema
4540
+ .schema
4610
4541
  .properties
4611
4542
  .shaclmateName
4612
4543
  .path,
@@ -4615,7 +4546,7 @@ export var NodeShape;
4615
4546
  }).chain((shaclmateName) => $shaclPropertyFromRdf({
4616
4547
  graph: _$options.graph,
4617
4548
  resource: $resource,
4618
- propertySchema: NodeShape.$schema
4549
+ propertySchema: NodeShape.schema
4619
4550
  .properties
4620
4551
  .subClassOf,
4621
4552
  typeFromRdf: (resourceValues) => resourceValues
@@ -4624,7 +4555,7 @@ export var NodeShape;
4624
4555
  .map((valuesArray) => Resource.Values.fromValue({
4625
4556
  focusResource: $resource,
4626
4557
  propertyPath: NodeShape
4627
- .$schema
4558
+ .schema
4628
4559
  .properties
4629
4560
  .subClassOf
4630
4561
  .path,
@@ -4633,7 +4564,7 @@ export var NodeShape;
4633
4564
  }).chain((subClassOf) => $shaclPropertyFromRdf({
4634
4565
  graph: _$options.graph,
4635
4566
  resource: $resource,
4636
- propertySchema: NodeShape.$schema
4567
+ propertySchema: NodeShape.schema
4637
4568
  .properties
4638
4569
  .toRdfTypes,
4639
4570
  typeFromRdf: (resourceValues) => resourceValues
@@ -4642,7 +4573,7 @@ export var NodeShape;
4642
4573
  .map((valuesArray) => Resource.Values.fromValue({
4643
4574
  focusResource: $resource,
4644
4575
  propertyPath: NodeShape
4645
- .$schema
4576
+ .schema
4646
4577
  .properties
4647
4578
  .toRdfTypes
4648
4579
  .path,
@@ -4651,7 +4582,7 @@ export var NodeShape;
4651
4582
  }).chain((toRdfTypes) => $shaclPropertyFromRdf({
4652
4583
  graph: _$options.graph,
4653
4584
  resource: $resource,
4654
- propertySchema: NodeShape.$schema
4585
+ propertySchema: NodeShape.schema
4655
4586
  .properties
4656
4587
  .tsFeatureExcludes,
4657
4588
  typeFromRdf: (resourceValues) => resourceValues
@@ -4671,7 +4602,7 @@ export var NodeShape;
4671
4602
  .map((valuesArray) => Resource.Values.fromValue({
4672
4603
  focusResource: $resource,
4673
4604
  propertyPath: Ontology
4674
- .$schema
4605
+ .schema
4675
4606
  .properties
4676
4607
  .tsFeatureExcludes
4677
4608
  .path,
@@ -4680,7 +4611,7 @@ export var NodeShape;
4680
4611
  }).chain((tsFeatureExcludes) => $shaclPropertyFromRdf({
4681
4612
  graph: _$options.graph,
4682
4613
  resource: $resource,
4683
- propertySchema: NodeShape.$schema
4614
+ propertySchema: NodeShape.schema
4684
4615
  .properties
4685
4616
  .tsFeatureIncludes,
4686
4617
  typeFromRdf: (resourceValues) => resourceValues
@@ -4700,7 +4631,7 @@ export var NodeShape;
4700
4631
  .map((valuesArray) => Resource.Values.fromValue({
4701
4632
  focusResource: $resource,
4702
4633
  propertyPath: Ontology
4703
- .$schema
4634
+ .schema
4704
4635
  .properties
4705
4636
  .tsFeatureIncludes
4706
4637
  .path,
@@ -4709,7 +4640,7 @@ export var NodeShape;
4709
4640
  }).chain((tsFeatureIncludes) => $shaclPropertyFromRdf({
4710
4641
  graph: _$options.graph,
4711
4642
  resource: $resource,
4712
- propertySchema: NodeShape.$schema
4643
+ propertySchema: NodeShape.schema
4713
4644
  .properties
4714
4645
  .tsImports,
4715
4646
  typeFromRdf: (resourceValues) => resourceValues
@@ -4719,7 +4650,7 @@ export var NodeShape;
4719
4650
  .map((valuesArray) => Resource.Values.fromValue({
4720
4651
  focusResource: $resource,
4721
4652
  propertyPath: Ontology
4722
- .$schema
4653
+ .schema
4723
4654
  .properties
4724
4655
  .tsImports
4725
4656
  .path,
@@ -4728,7 +4659,7 @@ export var NodeShape;
4728
4659
  }).chain((tsImports) => $shaclPropertyFromRdf({
4729
4660
  graph: _$options.graph,
4730
4661
  resource: $resource,
4731
- propertySchema: NodeShape.$schema
4662
+ propertySchema: NodeShape.schema
4732
4663
  .properties
4733
4664
  .types,
4734
4665
  typeFromRdf: (resourceValues) => resourceValues
@@ -4737,7 +4668,7 @@ export var NodeShape;
4737
4668
  .map((valuesArray) => Resource.Values.fromValue({
4738
4669
  focusResource: $resource,
4739
4670
  propertyPath: NodeShape
4740
- .$schema
4671
+ .schema
4741
4672
  .properties
4742
4673
  .types
4743
4674
  .path,
@@ -4746,7 +4677,7 @@ export var NodeShape;
4746
4677
  }).chain((types) => $shaclPropertyFromRdf({
4747
4678
  graph: _$options.graph,
4748
4679
  resource: $resource,
4749
- propertySchema: NodeShape.$schema
4680
+ propertySchema: NodeShape.schema
4750
4681
  .properties
4751
4682
  .xone,
4752
4683
  typeFromRdf: (resourceValues) => resourceValues
@@ -4756,7 +4687,7 @@ export var NodeShape;
4756
4687
  .chain((valueLists) => valueLists.chainMap((valueList) => Right(Resource.Values.fromArray({
4757
4688
  focusResource: $resource,
4758
4689
  propertyPath: PropertyShape
4759
- .$schema
4690
+ .schema
4760
4691
  .properties
4761
4692
  .xone
4762
4693
  .path,
@@ -4769,15 +4700,14 @@ export var NodeShape;
4769
4700
  : Resource.Values.fromValue({
4770
4701
  focusResource: $resource,
4771
4702
  propertyPath: PropertyShape
4772
- .$schema
4703
+ .schema
4773
4704
  .properties
4774
4705
  .xone
4775
4706
  .path,
4776
4707
  value: Maybe.empty(),
4777
4708
  })),
4778
- }).map((xone) => ({
4709
+ }).map((xone) => create({
4779
4710
  $identifier,
4780
- $type,
4781
4711
  and,
4782
4712
  classes,
4783
4713
  closed,
@@ -4818,9 +4748,23 @@ export var NodeShape;
4818
4748
  tsImports,
4819
4749
  types,
4820
4750
  xone,
4821
- }))))))))))))))))))))))))))))))))))))))))))));
4751
+ })))))))))))))))))))))))))))))))))))))))))));
4822
4752
  };
4823
- NodeShape.$schema = {
4753
+ NodeShape.fromRdfResource = $wrap_FromRdfResourceFunction(NodeShape._fromRdfResource);
4754
+ NodeShape.fromRdfResourceValues = (values, options) => values.chain((values) => values.chainMap((value) => value
4755
+ .toResource()
4756
+ .chain((resource) => NodeShape.fromRdfResource(resource, options))));
4757
+ NodeShape.fromRdfType = dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape");
4758
+ function isNodeShape(object) {
4759
+ switch (object.$type) {
4760
+ case "NodeShape":
4761
+ return true;
4762
+ default:
4763
+ return false;
4764
+ }
4765
+ }
4766
+ NodeShape.isNodeShape = isNodeShape;
4767
+ NodeShape.schema = {
4824
4768
  properties: {
4825
4769
  $identifier: {
4826
4770
  kind: "Identifier",
@@ -5211,226 +5155,224 @@ export var NodeShape;
5211
5155
  },
5212
5156
  },
5213
5157
  };
5214
- function $toRdfResource(_nodeShape, options) {
5215
- const resourceSet = options?.resourceSet ??
5216
- new ResourceSet({
5217
- dataFactory: dataFactory,
5218
- dataset: datasetFactory.dataset(),
5219
- });
5220
- const resource = resourceSet.resource(_nodeShape.$identifier());
5221
- if (!options?.ignoreRdfType) {
5222
- resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape"), options?.graph);
5158
+ NodeShape._toRdfResource = (parameters) => {
5159
+ if (!parameters.ignoreRdfType) {
5160
+ parameters.resource.add($RdfVocabularies.rdf.type, dataFactory.namedNode("http://www.w3.org/ns/shacl#NodeShape"), parameters.graph);
5223
5161
  }
5224
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#and"), _nodeShape.and.toList().flatMap((value) => [
5162
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#and"), parameters.object.and.toList().flatMap((value) => [
5225
5163
  value.length > 0
5226
5164
  ? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
5227
5165
  if (itemIndex === 0) {
5228
5166
  currentSubListResource = listResource;
5229
5167
  }
5230
5168
  else {
5231
- const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
5232
- currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
5169
+ const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
5170
+ currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
5233
5171
  currentSubListResource = newSubListResource;
5234
5172
  }
5235
- currentSubListResource.add($RdfVocabularies.rdf.first, [item], options?.graph);
5173
+ currentSubListResource.add($RdfVocabularies.rdf.first, [item], parameters.graph);
5236
5174
  if (itemIndex + 1 === list.length) {
5237
- currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, options?.graph);
5175
+ currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
5238
5176
  }
5239
5177
  return { currentSubListResource, listResource };
5240
5178
  }, {
5241
5179
  currentSubListResource: null,
5242
- listResource: resourceSet.resource((() => dataFactory.blankNode())()),
5180
+ listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
5243
5181
  }).listResource.identifier
5244
5182
  : $RdfVocabularies.rdf.nil,
5245
- ]), options?.graph);
5246
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#class"), _nodeShape.classes.flatMap((item) => [item]), options?.graph);
5247
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#closed"), _nodeShape.closed
5183
+ ]), parameters.graph);
5184
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#class"), parameters.object.classes.flatMap((item) => [item]), parameters.graph);
5185
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#closed"), parameters.object.closed
5248
5186
  .toList()
5249
5187
  .flatMap((value) => [
5250
5188
  $literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
5251
- ]), options?.graph);
5252
- resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#comment"), _nodeShape.comment
5189
+ ]), parameters.graph);
5190
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#comment"), parameters.object.comment
5253
5191
  .toList()
5254
- .flatMap((value) => [$literalFactory.string(value)]), options?.graph);
5255
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#datatype"), _nodeShape.datatype.toList(), options?.graph);
5256
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#deactivated"), _nodeShape.deactivated
5192
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
5193
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#datatype"), parameters.object.datatype.toList(), parameters.graph);
5194
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#deactivated"), parameters.object.deactivated
5257
5195
  .toList()
5258
5196
  .flatMap((value) => [
5259
5197
  $literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
5260
- ]), options?.graph);
5261
- resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#discriminantValue"), _nodeShape.discriminantValue
5198
+ ]), parameters.graph);
5199
+ parameters.resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#discriminantValue"), parameters.object.discriminantValue
5262
5200
  .toList()
5263
- .flatMap((value) => [$literalFactory.string(value)]), options?.graph);
5264
- resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#extern"), _nodeShape.extern
5201
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
5202
+ parameters.resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#extern"), parameters.object.extern
5265
5203
  .toList()
5266
5204
  .flatMap((value) => [
5267
5205
  $literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
5268
- ]), options?.graph);
5269
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#flags"), _nodeShape.flags.flatMap((item) => [$literalFactory.string(item)]), options?.graph);
5270
- resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#fromRdfType"), _nodeShape.fromRdfType.toList(), options?.graph);
5271
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#hasValue"), _nodeShape.hasValues.flatMap((item) => [item]), options?.graph);
5272
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#ignoredProperties"), _nodeShape.ignoredProperties.toList().flatMap((value) => [
5206
+ ]), parameters.graph);
5207
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#flags"), parameters.object.flags.flatMap((item) => [$literalFactory.string(item)]), parameters.graph);
5208
+ parameters.resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#fromRdfType"), parameters.object.fromRdfType.toList(), parameters.graph);
5209
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#hasValue"), parameters.object.hasValues.flatMap((item) => [item]), parameters.graph);
5210
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#ignoredProperties"), parameters.object.ignoredProperties.toList().flatMap((value) => [
5273
5211
  value.length > 0
5274
5212
  ? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
5275
5213
  if (itemIndex === 0) {
5276
5214
  currentSubListResource = listResource;
5277
5215
  }
5278
5216
  else {
5279
- const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
5280
- currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
5217
+ const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
5218
+ currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
5281
5219
  currentSubListResource = newSubListResource;
5282
5220
  }
5283
- currentSubListResource.add($RdfVocabularies.rdf.first, [item], options?.graph);
5221
+ currentSubListResource.add($RdfVocabularies.rdf.first, [item], parameters.graph);
5284
5222
  if (itemIndex + 1 === list.length) {
5285
- currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, options?.graph);
5223
+ currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
5286
5224
  }
5287
5225
  return { currentSubListResource, listResource };
5288
5226
  }, {
5289
5227
  currentSubListResource: null,
5290
- listResource: resourceSet.resource((() => dataFactory.blankNode())()),
5228
+ listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
5291
5229
  }).listResource.identifier
5292
5230
  : $RdfVocabularies.rdf.nil,
5293
- ]), options?.graph);
5294
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#in"), _nodeShape.in_.toList().flatMap((value) => [
5231
+ ]), parameters.graph);
5232
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#in"), parameters.object.in_.toList().flatMap((value) => [
5295
5233
  value.length > 0
5296
5234
  ? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
5297
5235
  if (itemIndex === 0) {
5298
5236
  currentSubListResource = listResource;
5299
5237
  }
5300
5238
  else {
5301
- const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
5302
- currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
5239
+ const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
5240
+ currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
5303
5241
  currentSubListResource = newSubListResource;
5304
5242
  }
5305
- currentSubListResource.add($RdfVocabularies.rdf.first, [item], options?.graph);
5243
+ currentSubListResource.add($RdfVocabularies.rdf.first, [item], parameters.graph);
5306
5244
  if (itemIndex + 1 === list.length) {
5307
- currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, options?.graph);
5245
+ currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
5308
5246
  }
5309
5247
  return { currentSubListResource, listResource };
5310
5248
  }, {
5311
5249
  currentSubListResource: null,
5312
- listResource: resourceSet.resource((() => dataFactory.blankNode())()),
5250
+ listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
5313
5251
  }).listResource.identifier
5314
5252
  : $RdfVocabularies.rdf.nil,
5315
- ]), options?.graph);
5316
- resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#isDefinedBy"), _nodeShape.isDefinedBy.toList(), options?.graph);
5317
- resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#label"), _nodeShape.label
5253
+ ]), parameters.graph);
5254
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#isDefinedBy"), parameters.object.isDefinedBy.toList(), parameters.graph);
5255
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/2000/01/rdf-schema#label"), parameters.object.label
5318
5256
  .toList()
5319
- .flatMap((value) => [$literalFactory.string(value)]), options?.graph);
5320
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#languageIn"), _nodeShape.languageIn.toList().flatMap((value) => [
5257
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
5258
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#languageIn"), parameters.object.languageIn.toList().flatMap((value) => [
5321
5259
  value.length > 0
5322
5260
  ? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
5323
5261
  if (itemIndex === 0) {
5324
5262
  currentSubListResource = listResource;
5325
5263
  }
5326
5264
  else {
5327
- const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
5328
- currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
5265
+ const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
5266
+ currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
5329
5267
  currentSubListResource = newSubListResource;
5330
5268
  }
5331
- currentSubListResource.add($RdfVocabularies.rdf.first, [$literalFactory.string(item)], options?.graph);
5269
+ currentSubListResource.add($RdfVocabularies.rdf.first, [$literalFactory.string(item)], parameters.graph);
5332
5270
  if (itemIndex + 1 === list.length) {
5333
- currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, options?.graph);
5271
+ currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
5334
5272
  }
5335
5273
  return { currentSubListResource, listResource };
5336
5274
  }, {
5337
5275
  currentSubListResource: null,
5338
- listResource: resourceSet.resource((() => dataFactory.blankNode())()),
5276
+ listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
5339
5277
  }).listResource.identifier
5340
5278
  : $RdfVocabularies.rdf.nil,
5341
- ]), options?.graph);
5342
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"), _nodeShape.maxCount
5279
+ ]), parameters.graph);
5280
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxCount"), parameters.object.maxCount
5343
5281
  .toList()
5344
5282
  .flatMap((value) => [
5345
5283
  $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
5346
- ]), options?.graph);
5347
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxExclusive"), _nodeShape.maxExclusive.toList(), options?.graph);
5348
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxInclusive"), _nodeShape.maxInclusive.toList(), options?.graph);
5349
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxLength"), _nodeShape.maxLength
5284
+ ]), parameters.graph);
5285
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxExclusive"), parameters.object.maxExclusive.toList(), parameters.graph);
5286
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxInclusive"), parameters.object.maxInclusive.toList(), parameters.graph);
5287
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#maxLength"), parameters.object.maxLength
5350
5288
  .toList()
5351
5289
  .flatMap((value) => [
5352
5290
  $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
5353
- ]), options?.graph);
5354
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"), _nodeShape.minCount
5291
+ ]), parameters.graph);
5292
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minCount"), parameters.object.minCount
5355
5293
  .toList()
5356
5294
  .flatMap((value) => [
5357
5295
  $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
5358
- ]), options?.graph);
5359
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minExclusive"), _nodeShape.minExclusive.toList(), options?.graph);
5360
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minInclusive"), _nodeShape.minInclusive.toList(), options?.graph);
5361
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minLength"), _nodeShape.minLength
5296
+ ]), parameters.graph);
5297
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minExclusive"), parameters.object.minExclusive.toList(), parameters.graph);
5298
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minInclusive"), parameters.object.minInclusive.toList(), parameters.graph);
5299
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#minLength"), parameters.object.minLength
5362
5300
  .toList()
5363
5301
  .flatMap((value) => [
5364
5302
  $literalFactory.bigint(value, $RdfVocabularies.xsd.integer),
5365
- ]), options?.graph);
5366
- resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#mutable"), _nodeShape.mutable
5303
+ ]), parameters.graph);
5304
+ parameters.resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#mutable"), parameters.object.mutable
5367
5305
  .toList()
5368
5306
  .flatMap((value) => [
5369
5307
  $literalFactory.boolean(value, $RdfVocabularies.xsd.boolean),
5370
- ]), options?.graph);
5371
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#node"), _nodeShape.node.toList(), options?.graph);
5372
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"), _nodeShape.nodeKind.toList(), options?.graph);
5373
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#not"), _nodeShape.not.flatMap((item) => [item]), options?.graph);
5374
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#or"), _nodeShape.or.toList().flatMap((value) => [
5308
+ ]), parameters.graph);
5309
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#node"), parameters.object.node.toList(), parameters.graph);
5310
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#nodeKind"), parameters.object.nodeKind.toList(), parameters.graph);
5311
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#not"), parameters.object.not.flatMap((item) => [item]), parameters.graph);
5312
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#or"), parameters.object.or.toList().flatMap((value) => [
5375
5313
  value.length > 0
5376
5314
  ? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
5377
5315
  if (itemIndex === 0) {
5378
5316
  currentSubListResource = listResource;
5379
5317
  }
5380
5318
  else {
5381
- const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
5382
- currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
5319
+ const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
5320
+ currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
5383
5321
  currentSubListResource = newSubListResource;
5384
5322
  }
5385
- currentSubListResource.add($RdfVocabularies.rdf.first, [item], options?.graph);
5323
+ currentSubListResource.add($RdfVocabularies.rdf.first, [item], parameters.graph);
5386
5324
  if (itemIndex + 1 === list.length) {
5387
- currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, options?.graph);
5325
+ currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
5388
5326
  }
5389
5327
  return { currentSubListResource, listResource };
5390
5328
  }, {
5391
5329
  currentSubListResource: null,
5392
- listResource: resourceSet.resource((() => dataFactory.blankNode())()),
5330
+ listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
5393
5331
  }).listResource.identifier
5394
5332
  : $RdfVocabularies.rdf.nil,
5395
- ]), options?.graph);
5396
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#pattern"), _nodeShape.patterns.flatMap((item) => [$literalFactory.string(item)]), options?.graph);
5397
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#property"), _nodeShape.properties.flatMap((item) => [item]), options?.graph);
5398
- resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#rdfType"), _nodeShape.rdfType.toList(), options?.graph);
5399
- resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#name"), _nodeShape.shaclmateName
5333
+ ]), parameters.graph);
5334
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#pattern"), parameters.object.patterns.flatMap((item) => [
5335
+ $literalFactory.string(item),
5336
+ ]), parameters.graph);
5337
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#property"), parameters.object.properties.flatMap((item) => [item]), parameters.graph);
5338
+ parameters.resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#rdfType"), parameters.object.rdfType.toList(), parameters.graph);
5339
+ parameters.resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#name"), parameters.object.shaclmateName
5400
5340
  .toList()
5401
- .flatMap((value) => [$literalFactory.string(value)]), options?.graph);
5402
- resource.add($RdfVocabularies.rdfs.subClassOf, _nodeShape.subClassOf.flatMap((item) => [item]), options?.graph);
5403
- resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#toRdfType"), _nodeShape.toRdfTypes.flatMap((item) => [item]), options?.graph);
5404
- resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsFeatureExclude"), _nodeShape.tsFeatureExcludes.flatMap((item) => [item]), options?.graph);
5405
- resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsFeatureInclude"), _nodeShape.tsFeatureIncludes.flatMap((item) => [item]), options?.graph);
5406
- resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsImport"), _nodeShape.tsImports.flatMap((item) => [$literalFactory.string(item)]), options?.graph);
5407
- resource.add($RdfVocabularies.rdf.type, _nodeShape.types.flatMap((item) => [item]), options?.graph);
5408
- resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#xone"), _nodeShape.xone.toList().flatMap((value) => [
5341
+ .flatMap((value) => [$literalFactory.string(value)]), parameters.graph);
5342
+ parameters.resource.add($RdfVocabularies.rdfs.subClassOf, parameters.object.subClassOf.flatMap((item) => [item]), parameters.graph);
5343
+ parameters.resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#toRdfType"), parameters.object.toRdfTypes.flatMap((item) => [item]), parameters.graph);
5344
+ parameters.resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsFeatureExclude"), parameters.object.tsFeatureExcludes.flatMap((item) => [item]), parameters.graph);
5345
+ parameters.resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsFeatureInclude"), parameters.object.tsFeatureIncludes.flatMap((item) => [item]), parameters.graph);
5346
+ parameters.resource.add(dataFactory.namedNode("http://purl.org/shaclmate/ontology#tsImport"), parameters.object.tsImports.flatMap((item) => [
5347
+ $literalFactory.string(item),
5348
+ ]), parameters.graph);
5349
+ parameters.resource.add($RdfVocabularies.rdf.type, parameters.object.types.flatMap((item) => [item]), parameters.graph);
5350
+ parameters.resource.add(dataFactory.namedNode("http://www.w3.org/ns/shacl#xone"), parameters.object.xone.toList().flatMap((value) => [
5409
5351
  value.length > 0
5410
5352
  ? value.reduce(({ currentSubListResource, listResource }, item, itemIndex, list) => {
5411
5353
  if (itemIndex === 0) {
5412
5354
  currentSubListResource = listResource;
5413
5355
  }
5414
5356
  else {
5415
- const newSubListResource = resourceSet.resource((() => dataFactory.blankNode())());
5416
- currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, options?.graph);
5357
+ const newSubListResource = parameters.resourceSet.resource((() => dataFactory.blankNode())());
5358
+ currentSubListResource.add($RdfVocabularies.rdf.rest, newSubListResource.identifier, parameters.graph);
5417
5359
  currentSubListResource = newSubListResource;
5418
5360
  }
5419
- currentSubListResource.add($RdfVocabularies.rdf.first, [item], options?.graph);
5361
+ currentSubListResource.add($RdfVocabularies.rdf.first, [item], parameters.graph);
5420
5362
  if (itemIndex + 1 === list.length) {
5421
- currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, options?.graph);
5363
+ currentSubListResource.add($RdfVocabularies.rdf.rest, $RdfVocabularies.rdf.nil, parameters.graph);
5422
5364
  }
5423
5365
  return { currentSubListResource, listResource };
5424
5366
  }, {
5425
5367
  currentSubListResource: null,
5426
- listResource: resourceSet.resource((() => dataFactory.blankNode())()),
5368
+ listResource: parameters.resourceSet.resource((() => dataFactory.blankNode())()),
5427
5369
  }).listResource.identifier
5428
5370
  : $RdfVocabularies.rdf.nil,
5429
- ]), options?.graph);
5430
- return resource;
5431
- }
5432
- NodeShape.$toRdfResource = $toRdfResource;
5433
- function $propertiesToStrings(_nodeShape) {
5371
+ ]), parameters.graph);
5372
+ return parameters.resource;
5373
+ };
5374
+ NodeShape.toRdfResource = $wrap_ToRdfResourceFunction(NodeShape._toRdfResource);
5375
+ function _propertiesToStrings(_nodeShape) {
5434
5376
  return $compactRecord({
5435
5377
  $identifier: _nodeShape.$identifier().toString(),
5436
5378
  label: _nodeShape.label.map((item) => item.toString()).extract(),
@@ -5439,43 +5381,52 @@ export var NodeShape;
5439
5381
  .extract(),
5440
5382
  });
5441
5383
  }
5442
- NodeShape.$propertiesToStrings = $propertiesToStrings;
5384
+ NodeShape._propertiesToStrings = _propertiesToStrings;
5443
5385
  function $toString(_nodeShape) {
5444
- return `NodeShape(${JSON.stringify($propertiesToStrings((_nodeShape ?? this)))})`;
5386
+ return `NodeShape(${JSON.stringify(_propertiesToStrings((_nodeShape ?? this)))})`;
5445
5387
  }
5446
5388
  NodeShape.$toString = $toString;
5447
5389
  })(NodeShape || (NodeShape = {}));
5448
5390
  export var Shape;
5449
5391
  (function (Shape) {
5450
- Shape.$filter = (filter, value) => {
5392
+ Shape.$toString = (value) => {
5393
+ if (NodeShape.isNodeShape(value)) {
5394
+ return NodeShape.$toString(value);
5395
+ }
5396
+ if (PropertyShape.isPropertyShape(value)) {
5397
+ return PropertyShape.$toString(value);
5398
+ }
5399
+ throw new Error("unable to serialize to string");
5400
+ };
5401
+ Shape.filter = (filter, value) => {
5451
5402
  if (filter.$identifier !== undefined &&
5452
5403
  !$filterIdentifier(filter.$identifier, value.$identifier())) {
5453
5404
  return false;
5454
5405
  }
5455
5406
  if (filter.on?.["NodeShape"] !== undefined &&
5456
5407
  NodeShape.isNodeShape(value)) {
5457
- if (!NodeShape.$filter(filter.on["NodeShape"], value)) {
5408
+ if (!NodeShape.filter(filter.on["NodeShape"], value)) {
5458
5409
  return false;
5459
5410
  }
5460
5411
  }
5461
5412
  if (filter.on?.["PropertyShape"] !== undefined &&
5462
5413
  PropertyShape.isPropertyShape(value)) {
5463
- if (!PropertyShape.$filter(filter.on["PropertyShape"], value)) {
5414
+ if (!PropertyShape.filter(filter.on["PropertyShape"], value)) {
5464
5415
  return false;
5465
5416
  }
5466
5417
  }
5467
5418
  return true;
5468
5419
  };
5469
- Shape.$fromRdfResource = (resource, options) => NodeShape.$fromRdfResource(resource, {
5420
+ Shape.fromRdfResource = (resource, options) => NodeShape.fromRdfResource(resource, {
5470
5421
  ...options,
5471
5422
  ignoreRdfType: false,
5472
- }).altLazy(() => PropertyShape.$fromRdfResource(resource, {
5423
+ }).altLazy(() => PropertyShape.fromRdfResource(resource, {
5473
5424
  ...options,
5474
5425
  ignoreRdfType: false,
5475
5426
  }));
5476
- Shape.$fromRdfResourceValues = ((values, _options) => values.chain((values) => values.chainMap((value) => {
5427
+ Shape.fromRdfResourceValues = ((values, _options) => values.chain((values) => values.chainMap((value) => {
5477
5428
  const valueAsValues = Right(value.toValues());
5478
- return NodeShape.$fromRdfResourceValues(valueAsValues, {
5429
+ return NodeShape.fromRdfResourceValues(valueAsValues, {
5479
5430
  context: _options.context,
5480
5431
  graph: _options.graph,
5481
5432
  ignoreRdfType: false,
@@ -5484,7 +5435,7 @@ export var Shape;
5484
5435
  propertyPath: _options.propertyPath,
5485
5436
  resource: _options.resource,
5486
5437
  })
5487
- .altLazy(() => PropertyShape.$fromRdfResourceValues(valueAsValues, {
5438
+ .altLazy(() => PropertyShape.fromRdfResourceValues(valueAsValues, {
5488
5439
  context: _options.context,
5489
5440
  graph: _options.graph,
5490
5441
  ignoreRdfType: false,
@@ -5495,18 +5446,22 @@ export var Shape;
5495
5446
  }))
5496
5447
  .chain((values) => values.head());
5497
5448
  })));
5498
- let $Identifier;
5499
- (function ($Identifier) {
5500
- $Identifier.parse = $parseIdentifier;
5501
- $Identifier.stringify = NTriplesTerm.stringify;
5502
- })($Identifier = Shape.$Identifier || (Shape.$Identifier = {}));
5503
- Shape.$schema = {
5449
+ let Identifier;
5450
+ (function (Identifier) {
5451
+ Identifier.parse = $parseIdentifier;
5452
+ Identifier.stringify = NTriplesTerm.stringify;
5453
+ })(Identifier = Shape.Identifier || (Shape.Identifier = {}));
5454
+ function isShape(object) {
5455
+ return (NodeShape.isNodeShape(object) || PropertyShape.isPropertyShape(object));
5456
+ }
5457
+ Shape.isShape = isShape;
5458
+ Shape.schema = {
5504
5459
  kind: "NamedObjectUnion",
5505
5460
  members: {
5506
- NodeShape: { discriminantValues: ["NodeShape"], type: NodeShape.$schema },
5461
+ NodeShape: { discriminantValues: ["NodeShape"], type: NodeShape.schema },
5507
5462
  PropertyShape: {
5508
5463
  discriminantValues: ["PropertyShape"],
5509
- type: PropertyShape.$schema,
5464
+ type: PropertyShape.schema,
5510
5465
  },
5511
5466
  },
5512
5467
  properties: {
@@ -5753,19 +5708,19 @@ export var Shape;
5753
5708
  },
5754
5709
  },
5755
5710
  };
5756
- Shape.$toRdfResource = (value, options) => {
5757
- if (NodeShape.isNodeShape(value)) {
5758
- return NodeShape.$toRdfResource(value, options);
5711
+ Shape.toRdfResource = (object, options) => {
5712
+ if (NodeShape.isNodeShape(object)) {
5713
+ return NodeShape.toRdfResource(object, options);
5759
5714
  }
5760
- if (PropertyShape.isPropertyShape(value)) {
5761
- return PropertyShape.$toRdfResource(value, options);
5715
+ if (PropertyShape.isPropertyShape(object)) {
5716
+ return PropertyShape.toRdfResource(object, options);
5762
5717
  }
5763
5718
  throw new Error("unrecognized type");
5764
5719
  };
5765
- Shape.$toRdfResourceValues = ((value, _options) => {
5720
+ Shape.toRdfResourceValues = ((value, _options) => {
5766
5721
  if (NodeShape.isNodeShape(value)) {
5767
5722
  return [
5768
- NodeShape.$toRdfResource(value, {
5723
+ NodeShape.toRdfResource(value, {
5769
5724
  graph: _options.graph,
5770
5725
  resourceSet: _options.resourceSet,
5771
5726
  }).identifier,
@@ -5773,7 +5728,7 @@ export var Shape;
5773
5728
  }
5774
5729
  if (PropertyShape.isPropertyShape(value)) {
5775
5730
  return [
5776
- PropertyShape.$toRdfResource(value, {
5731
+ PropertyShape.toRdfResource(value, {
5777
5732
  graph: _options.graph,
5778
5733
  resourceSet: _options.resourceSet,
5779
5734
  }).identifier,
@@ -5781,71 +5736,73 @@ export var Shape;
5781
5736
  }
5782
5737
  throw new Error("unable to serialize to RDF");
5783
5738
  });
5784
- Shape.$toString = (value) => {
5739
+ })(Shape || (Shape = {}));
5740
+ export var $Object;
5741
+ (function ($Object) {
5742
+ $Object.$toString = (value) => {
5785
5743
  if (NodeShape.isNodeShape(value)) {
5786
5744
  return NodeShape.$toString(value);
5787
5745
  }
5746
+ if (Ontology.isOntology(value)) {
5747
+ return Ontology.$toString(value);
5748
+ }
5749
+ if (PropertyGroup.isPropertyGroup(value)) {
5750
+ return PropertyGroup.$toString(value);
5751
+ }
5788
5752
  if (PropertyShape.isPropertyShape(value)) {
5789
5753
  return PropertyShape.$toString(value);
5790
5754
  }
5791
5755
  throw new Error("unable to serialize to string");
5792
5756
  };
5793
- function isShape(object) {
5794
- return (NodeShape.isNodeShape(object) || PropertyShape.isPropertyShape(object));
5795
- }
5796
- Shape.isShape = isShape;
5797
- })(Shape || (Shape = {}));
5798
- export var $Object;
5799
- (function ($Object) {
5800
- $Object.$filter = (filter, value) => {
5757
+ $Object.filter = (filter, value) => {
5801
5758
  if (filter.$identifier !== undefined &&
5802
5759
  !$filterIdentifier(filter.$identifier, value.$identifier())) {
5803
5760
  return false;
5804
5761
  }
5805
5762
  if (filter.on?.["NodeShape"] !== undefined &&
5806
5763
  NodeShape.isNodeShape(value)) {
5807
- if (!NodeShape.$filter(filter.on["NodeShape"], value)) {
5764
+ if (!NodeShape.filter(filter.on["NodeShape"], value)) {
5808
5765
  return false;
5809
5766
  }
5810
5767
  }
5811
5768
  if (filter.on?.["Ontology"] !== undefined && Ontology.isOntology(value)) {
5812
- if (!Ontology.$filter(filter.on["Ontology"], value)) {
5769
+ if (!Ontology.filter(filter.on["Ontology"], value)) {
5813
5770
  return false;
5814
5771
  }
5815
5772
  }
5816
5773
  if (filter.on?.["PropertyGroup"] !== undefined &&
5817
5774
  PropertyGroup.isPropertyGroup(value)) {
5818
- if (!PropertyGroup.$filter(filter.on["PropertyGroup"], value)) {
5775
+ if (!PropertyGroup.filter(filter.on["PropertyGroup"], value)) {
5819
5776
  return false;
5820
5777
  }
5821
5778
  }
5822
5779
  if (filter.on?.["PropertyShape"] !== undefined &&
5823
5780
  PropertyShape.isPropertyShape(value)) {
5824
- if (!PropertyShape.$filter(filter.on["PropertyShape"], value)) {
5781
+ if (!PropertyShape.filter(filter.on["PropertyShape"], value)) {
5825
5782
  return false;
5826
5783
  }
5827
5784
  }
5828
5785
  return true;
5829
5786
  };
5830
- $Object.$fromRdfResource = (resource, options) => NodeShape.$fromRdfResource(resource, {
5787
+ $Object.fromRdfResource = (resource, options) => NodeShape.fromRdfResource(resource, {
5831
5788
  ...options,
5832
5789
  ignoreRdfType: false,
5833
5790
  })
5834
- .altLazy(() => Ontology.$fromRdfResource(resource, {
5791
+ .altLazy(() => Ontology.fromRdfResource(resource, {
5835
5792
  ...options,
5836
5793
  ignoreRdfType: false,
5837
5794
  }))
5838
- .altLazy(() => PropertyGroup.$fromRdfResource(resource, {
5795
+ .altLazy(() => PropertyGroup.fromRdfResource(resource, {
5839
5796
  ...options,
5840
5797
  ignoreRdfType: false,
5841
5798
  }))
5842
- .altLazy(() => PropertyShape.$fromRdfResource(resource, {
5799
+ .altLazy(() => PropertyShape.fromRdfResource(resource, {
5843
5800
  ...options,
5844
5801
  ignoreRdfType: false,
5845
5802
  }));
5846
- $Object.$fromRdfResourceValues = ((values, _options) => values.chain((values) => values.chainMap((value) => {
5803
+ $Object.fromRdfResourceValues = ((values, _options) => values.chain((values) => values.chainMap((value) => {
5847
5804
  const valueAsValues = Right(value.toValues());
5848
- return NodeShape.$fromRdfResourceValues(valueAsValues, {
5805
+ return NodeShape.fromRdfResourceValues(valueAsValues, {
5849
5806
  context: _options.context,
5850
5807
  graph: _options.graph,
5851
5808
  ignoreRdfType: false,
@@ -5854,7 +5811,7 @@ export var $Object;
5854
5811
  propertyPath: _options.propertyPath,
5855
5812
  resource: _options.resource,
5856
5813
  })
5857
- .altLazy(() => Ontology.$fromRdfResourceValues(valueAsValues, {
5814
+ .altLazy(() => Ontology.fromRdfResourceValues(valueAsValues, {
5858
5815
  context: _options.context,
5859
5816
  graph: _options.graph,
5860
5817
  ignoreRdfType: false,
@@ -5863,7 +5820,7 @@ export var $Object;
5863
5820
  propertyPath: _options.propertyPath,
5864
5821
  resource: _options.resource,
5865
5822
  }))
5866
- .altLazy(() => PropertyGroup.$fromRdfResourceValues(valueAsValues, {
5823
+ .altLazy(() => PropertyGroup.fromRdfResourceValues(valueAsValues, {
5867
5824
  context: _options.context,
5868
5825
  graph: _options.graph,
5869
5826
  ignoreRdfType: false,
@@ -5872,7 +5829,7 @@ export var $Object;
5872
5829
  propertyPath: _options.propertyPath,
5873
5830
  resource: _options.resource,
5874
5831
  }))
5875
- .altLazy(() => PropertyShape.$fromRdfResourceValues(valueAsValues, {
5832
+ .altLazy(() => PropertyShape.fromRdfResourceValues(valueAsValues, {
5876
5833
  context: _options.context,
5877
5834
  graph: _options.graph,
5878
5835
  ignoreRdfType: false,
@@ -5883,23 +5840,23 @@ export var $Object;
5883
5840
  }))
5884
5841
  .chain((values) => values.head());
5885
5842
  })));
5886
- let $Identifier;
5887
- (function ($Identifier) {
5888
- $Identifier.parse = $parseIdentifier;
5889
- $Identifier.stringify = NTriplesTerm.stringify;
5890
- })($Identifier = $Object.$Identifier || ($Object.$Identifier = {}));
5891
- $Object.$schema = {
5843
+ let Identifier;
5844
+ (function (Identifier) {
5845
+ Identifier.parse = $parseIdentifier;
5846
+ Identifier.stringify = NTriplesTerm.stringify;
5847
+ })(Identifier = $Object.Identifier || ($Object.Identifier = {}));
5848
+ $Object.schema = {
5892
5849
  kind: "NamedObjectUnion",
5893
5850
  members: {
5894
- NodeShape: { discriminantValues: ["NodeShape"], type: NodeShape.$schema },
5895
- Ontology: { discriminantValues: ["Ontology"], type: Ontology.$schema },
5851
+ NodeShape: { discriminantValues: ["NodeShape"], type: NodeShape.schema },
5852
+ Ontology: { discriminantValues: ["Ontology"], type: Ontology.schema },
5896
5853
  PropertyGroup: {
5897
5854
  discriminantValues: ["PropertyGroup"],
5898
- type: PropertyGroup.$schema,
5855
+ type: PropertyGroup.schema,
5899
5856
  },
5900
5857
  PropertyShape: {
5901
5858
  discriminantValues: ["PropertyShape"],
5902
- type: PropertyShape.$schema,
5859
+ type: PropertyShape.schema,
5903
5860
  },
5904
5861
  },
5905
5862
  properties: {
@@ -5921,25 +5878,25 @@ export var $Object;
5921
5878
  },
5922
5879
  },
5923
5880
  };
5924
- $Object.$toRdfResource = (value, options) => {
5925
- if (NodeShape.isNodeShape(value)) {
5926
- return NodeShape.$toRdfResource(value, options);
5881
+ $Object.toRdfResource = (object, options) => {
5882
+ if (NodeShape.isNodeShape(object)) {
5883
+ return NodeShape.toRdfResource(object, options);
5927
5884
  }
5928
- if (Ontology.isOntology(value)) {
5929
- return Ontology.$toRdfResource(value, options);
5885
+ if (Ontology.isOntology(object)) {
5886
+ return Ontology.toRdfResource(object, options);
5930
5887
  }
5931
- if (PropertyGroup.isPropertyGroup(value)) {
5932
- return PropertyGroup.$toRdfResource(value, options);
5888
+ if (PropertyGroup.isPropertyGroup(object)) {
5889
+ return PropertyGroup.toRdfResource(object, options);
5933
5890
  }
5934
- if (PropertyShape.isPropertyShape(value)) {
5935
- return PropertyShape.$toRdfResource(value, options);
5891
+ if (PropertyShape.isPropertyShape(object)) {
5892
+ return PropertyShape.toRdfResource(object, options);
5936
5893
  }
5937
5894
  throw new Error("unrecognized type");
5938
5895
  };
5939
- $Object.$toRdfResourceValues = ((value, _options) => {
5896
+ $Object.toRdfResourceValues = ((value, _options) => {
5940
5897
  if (NodeShape.isNodeShape(value)) {
5941
5898
  return [
5942
- NodeShape.$toRdfResource(value, {
5899
+ NodeShape.toRdfResource(value, {
5943
5900
  graph: _options.graph,
5944
5901
  resourceSet: _options.resourceSet,
5945
5902
  }).identifier,
@@ -5947,7 +5904,7 @@ export var $Object;
5947
5904
  }
5948
5905
  if (Ontology.isOntology(value)) {
5949
5906
  return [
5950
- Ontology.$toRdfResource(value, {
5907
+ Ontology.toRdfResource(value, {
5951
5908
  graph: _options.graph,
5952
5909
  resourceSet: _options.resourceSet,
5953
5910
  }).identifier,
@@ -5955,7 +5912,7 @@ export var $Object;
5955
5912
  }
5956
5913
  if (PropertyGroup.isPropertyGroup(value)) {
5957
5914
  return [
5958
- PropertyGroup.$toRdfResource(value, {
5915
+ PropertyGroup.toRdfResource(value, {
5959
5916
  graph: _options.graph,
5960
5917
  resourceSet: _options.resourceSet,
5961
5918
  }).identifier,
@@ -5963,7 +5920,7 @@ export var $Object;
5963
5920
  }
5964
5921
  if (PropertyShape.isPropertyShape(value)) {
5965
5922
  return [
5966
- PropertyShape.$toRdfResource(value, {
5923
+ PropertyShape.toRdfResource(value, {
5967
5924
  graph: _options.graph,
5968
5925
  resourceSet: _options.resourceSet,
5969
5926
  }).identifier,
@@ -5971,28 +5928,13 @@ export var $Object;
5971
5928
  }
5972
5929
  throw new Error("unable to serialize to RDF");
5973
5930
  });
5974
- $Object.$toString = (value) => {
5975
- if (NodeShape.isNodeShape(value)) {
5976
- return NodeShape.$toString(value);
5977
- }
5978
- if (Ontology.isOntology(value)) {
5979
- return Ontology.$toString(value);
5980
- }
5981
- if (PropertyGroup.isPropertyGroup(value)) {
5982
- return PropertyGroup.$toString(value);
5983
- }
5984
- if (PropertyShape.isPropertyShape(value)) {
5985
- return PropertyShape.$toString(value);
5986
- }
5987
- throw new Error("unable to serialize to string");
5988
- };
5989
5931
  })($Object || ($Object = {}));
5990
5932
  export class $RdfjsDatasetObjectSet {
5991
- $graph;
5992
5933
  #dataset;
5934
+ #graph;
5993
5935
  constructor(dataset, options) {
5994
5936
  this.#dataset = dataset;
5995
- this.$graph = options?.graph;
5937
+ this.#graph = options?.graph;
5996
5938
  }
5997
5939
  $dataset() {
5998
5940
  if (typeof this.#dataset === "object") {
@@ -6032,9 +5974,9 @@ export class $RdfjsDatasetObjectSet {
6032
5974
  }
6033
5975
  nodeShapesSync(query) {
6034
5976
  return this.#objectsSync({
6035
- $filter: NodeShape.$filter,
6036
- $fromRdfResource: NodeShape.$fromRdfResource,
6037
- $fromRdfTypes: [NodeShape.$fromRdfType],
5977
+ filter: NodeShape.filter,
5978
+ fromRdfResource: NodeShape.fromRdfResource,
5979
+ fromRdfTypes: [NodeShape.fromRdfType],
6038
5980
  }, query);
6039
5981
  }
6040
5982
  async ontology(identifier, options) {
@@ -6063,9 +6005,9 @@ export class $RdfjsDatasetObjectSet {
6063
6005
  }
6064
6006
  ontologiesSync(query) {
6065
6007
  return this.#objectsSync({
6066
- $filter: Ontology.$filter,
6067
- $fromRdfResource: Ontology.$fromRdfResource,
6068
- $fromRdfTypes: [Ontology.$fromRdfType],
6008
+ filter: Ontology.filter,
6009
+ fromRdfResource: Ontology.fromRdfResource,
6010
+ fromRdfTypes: [Ontology.fromRdfType],
6069
6011
  }, query);
6070
6012
  }
6071
6013
  async propertyGroup(identifier, options) {
@@ -6094,9 +6036,9 @@ export class $RdfjsDatasetObjectSet {
6094
6036
  }
6095
6037
  propertyGroupsSync(query) {
6096
6038
  return this.#objectsSync({
6097
- $filter: PropertyGroup.$filter,
6098
- $fromRdfResource: PropertyGroup.$fromRdfResource,
6099
- $fromRdfTypes: [PropertyGroup.$fromRdfType],
6039
+ filter: PropertyGroup.filter,
6040
+ fromRdfResource: PropertyGroup.fromRdfResource,
6041
+ fromRdfTypes: [PropertyGroup.fromRdfType],
6100
6042
  }, query);
6101
6043
  }
6102
6044
  async propertyShape(identifier, options) {
@@ -6125,9 +6067,9 @@ export class $RdfjsDatasetObjectSet {
6125
6067
  }
6126
6068
  propertyShapesSync(query) {
6127
6069
  return this.#objectsSync({
6128
- $filter: PropertyShape.$filter,
6129
- $fromRdfResource: PropertyShape.$fromRdfResource,
6130
- $fromRdfTypes: [PropertyShape.$fromRdfType],
6070
+ filter: PropertyShape.filter,
6071
+ fromRdfResource: PropertyShape.fromRdfResource,
6072
+ fromRdfTypes: [PropertyShape.fromRdfType],
6131
6073
  }, query);
6132
6074
  }
6133
6075
  async shape(identifier, options) {
@@ -6157,14 +6099,14 @@ export class $RdfjsDatasetObjectSet {
6157
6099
  shapesSync(query) {
6158
6100
  return this.#objectUnionsSync([
6159
6101
  {
6160
- $filter: Shape.$filter,
6161
- $fromRdfResource: NodeShape.$fromRdfResource,
6162
- $fromRdfTypes: [NodeShape.$fromRdfType],
6102
+ filter: Shape.filter,
6103
+ fromRdfResource: NodeShape.fromRdfResource,
6104
+ fromRdfTypes: [NodeShape.fromRdfType],
6163
6105
  },
6164
6106
  {
6165
- $filter: Shape.$filter,
6166
- $fromRdfResource: PropertyShape.$fromRdfResource,
6167
- $fromRdfTypes: [PropertyShape.$fromRdfType],
6107
+ filter: Shape.filter,
6108
+ fromRdfResource: PropertyShape.fromRdfResource,
6109
+ fromRdfTypes: [PropertyShape.fromRdfType],
6168
6110
  },
6169
6111
  ], query);
6170
6112
  }
@@ -6195,29 +6137,29 @@ export class $RdfjsDatasetObjectSet {
6195
6137
  $objectsSync(query) {
6196
6138
  return this.#objectUnionsSync([
6197
6139
  {
6198
- $filter: $Object.$filter,
6199
- $fromRdfResource: NodeShape.$fromRdfResource,
6200
- $fromRdfTypes: [NodeShape.$fromRdfType],
6140
+ filter: $Object.filter,
6141
+ fromRdfResource: NodeShape.fromRdfResource,
6142
+ fromRdfTypes: [NodeShape.fromRdfType],
6201
6143
  },
6202
6144
  {
6203
- $filter: $Object.$filter,
6204
- $fromRdfResource: Ontology.$fromRdfResource,
6205
- $fromRdfTypes: [Ontology.$fromRdfType],
6145
+ filter: $Object.filter,
6146
+ fromRdfResource: Ontology.fromRdfResource,
6147
+ fromRdfTypes: [Ontology.fromRdfType],
6206
6148
  },
6207
6149
  {
6208
- $filter: $Object.$filter,
6209
- $fromRdfResource: PropertyGroup.$fromRdfResource,
6210
- $fromRdfTypes: [PropertyGroup.$fromRdfType],
6150
+ filter: $Object.filter,
6151
+ fromRdfResource: PropertyGroup.fromRdfResource,
6152
+ fromRdfTypes: [PropertyGroup.fromRdfType],
6211
6153
  },
6212
6154
  {
6213
- $filter: $Object.$filter,
6214
- $fromRdfResource: PropertyShape.$fromRdfResource,
6215
- $fromRdfTypes: [PropertyShape.$fromRdfType],
6155
+ filter: $Object.filter,
6156
+ fromRdfResource: PropertyShape.fromRdfResource,
6157
+ fromRdfTypes: [PropertyShape.fromRdfType],
6216
6158
  },
6217
6159
  ], query);
6218
6160
  }
6219
6161
  #objectsSync(namedObjectType, query) {
6220
- const graph = query?.graph ?? this.$graph;
6162
+ const graph = query?.graph ?? this.#graph;
6221
6163
  const limit = query?.limit ?? Number.MAX_SAFE_INTEGER;
6222
6164
  if (limit <= 0) {
6223
6165
  return Right([]);
@@ -6240,11 +6182,11 @@ export class $RdfjsDatasetObjectSet {
6240
6182
  }));
6241
6183
  sortResources = false;
6242
6184
  }
6243
- else if (namedObjectType.$fromRdfTypes.length > 0) {
6185
+ else if (namedObjectType.fromRdfTypes.length > 0) {
6244
6186
  const identifierSet = new $IdentifierSet();
6245
6187
  resources = [];
6246
6188
  sortResources = true;
6247
- for (const fromRdfType of namedObjectType.$fromRdfTypes) {
6189
+ for (const fromRdfType of namedObjectType.fromRdfTypes) {
6248
6190
  for (const resource of resourceSet.instancesOf(fromRdfType, {
6249
6191
  graph,
6250
6192
  })) {
@@ -6277,7 +6219,7 @@ export class $RdfjsDatasetObjectSet {
6277
6219
  const resource = resourceSet.resource(quad.subject);
6278
6220
  // Eagerly eliminate the majority of resources that won't match the object type
6279
6221
  namedObjectType
6280
- .$fromRdfResource(resource, fromRdfResourceOptions)
6222
+ .fromRdfResource(resource, fromRdfResourceOptions)
6281
6223
  .ifRight((object) => {
6282
6224
  resources.push({ object, resource });
6283
6225
  });
@@ -6291,13 +6233,13 @@ export class $RdfjsDatasetObjectSet {
6291
6233
  const objects = [];
6292
6234
  for (let { object, resource } of resources) {
6293
6235
  if (!object) {
6294
- const objectEither = namedObjectType.$fromRdfResource(resource, fromRdfResourceOptions);
6236
+ const objectEither = namedObjectType.fromRdfResource(resource, fromRdfResourceOptions);
6295
6237
  if (objectEither.isLeft()) {
6296
6238
  return objectEither;
6297
6239
  }
6298
6240
  object = objectEither.unsafeCoerce();
6299
6241
  }
6300
- if (query?.filter && !namedObjectType.$filter(query.filter, object)) {
6242
+ if (query?.filter && !namedObjectType.filter(query.filter, object)) {
6301
6243
  continue;
6302
6244
  }
6303
6245
  if (objectI++ >= offset) {
@@ -6310,7 +6252,7 @@ export class $RdfjsDatasetObjectSet {
6310
6252
  return Right(objects);
6311
6253
  }
6312
6254
  #objectUnionsSync(namedObjectTypes, query) {
6313
- const graph = query?.graph ?? this.$graph;
6255
+ const graph = query?.graph ?? this.#graph;
6314
6256
  const limit = query?.limit ?? Number.MAX_SAFE_INTEGER;
6315
6257
  if (limit <= 0) {
6316
6258
  return Right([]);
@@ -6333,12 +6275,12 @@ export class $RdfjsDatasetObjectSet {
6333
6275
  }));
6334
6276
  sortResources = false;
6335
6277
  }
6336
- else if (namedObjectTypes.every((namedObjectType) => namedObjectType.$fromRdfTypes.length > 0)) {
6278
+ else if (namedObjectTypes.every((namedObjectType) => namedObjectType.fromRdfTypes.length > 0)) {
6337
6279
  const identifierSet = new $IdentifierSet();
6338
6280
  resources = [];
6339
6281
  sortResources = true;
6340
6282
  for (const namedObjectType of namedObjectTypes) {
6341
- for (const fromRdfType of namedObjectType.$fromRdfTypes) {
6283
+ for (const fromRdfType of namedObjectType.fromRdfTypes) {
6342
6284
  for (const resource of resourceSet.instancesOf(fromRdfType, {
6343
6285
  graph,
6344
6286
  })) {
@@ -6373,7 +6315,7 @@ export class $RdfjsDatasetObjectSet {
6373
6315
  const resource = resourceSet.resource(quad.subject);
6374
6316
  for (const namedObjectType of namedObjectTypes) {
6375
6317
  if (namedObjectType
6376
- .$fromRdfResource(resource, fromRdfResourceOptions)
6318
+ .fromRdfResource(resource, fromRdfResourceOptions)
6377
6319
  .ifRight((object) => {
6378
6320
  resources.push({ object, namedObjectType, resource });
6379
6321
  })
@@ -6393,12 +6335,12 @@ export class $RdfjsDatasetObjectSet {
6393
6335
  if (!object) {
6394
6336
  let objectEither;
6395
6337
  if (namedObjectType) {
6396
- objectEither = namedObjectType.$fromRdfResource(resource, fromRdfResourceOptions);
6338
+ objectEither = namedObjectType.fromRdfResource(resource, fromRdfResourceOptions);
6397
6339
  }
6398
6340
  else {
6399
6341
  objectEither = Left(new Error("no object types"));
6400
6342
  for (const tryObjectType of namedObjectTypes) {
6401
- objectEither = tryObjectType.$fromRdfResource(resource, fromRdfResourceOptions);
6343
+ objectEither = tryObjectType.fromRdfResource(resource, fromRdfResourceOptions);
6402
6344
  if (objectEither.isRight()) {
6403
6345
  namedObjectType = tryObjectType;
6404
6346
  break;
@@ -6413,7 +6355,7 @@ export class $RdfjsDatasetObjectSet {
6413
6355
  if (!namedObjectType) {
6414
6356
  throw new Error("namedObjectType should be set here");
6415
6357
  }
6416
- if (query?.filter && !namedObjectType.$filter(query.filter, object)) {
6358
+ if (query?.filter && !namedObjectType.filter(query.filter, object)) {
6417
6359
  continue;
6418
6360
  }
6419
6361
  if (objectI++ >= offset) {