@shaclmate/compiler 4.0.8 → 4.0.9

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 (302) hide show
  1. package/dist/Compiler.d.ts +1 -4
  2. package/dist/Compiler.js +1 -5
  3. package/dist/ShapesGraphToAstTransformer.d.ts +2 -11
  4. package/dist/ShapesGraphToAstTransformer.js +25 -27
  5. package/dist/_ShapesGraphToAstTransformer/defaultNodeShapeNodeKinds.d.ts +3 -0
  6. package/dist/_ShapesGraphToAstTransformer/defaultNodeShapeNodeKinds.js +5 -0
  7. package/dist/_ShapesGraphToAstTransformer/shapeAstTypeName.d.ts +4 -0
  8. package/dist/_ShapesGraphToAstTransformer/shapeAstTypeName.js +27 -0
  9. package/dist/_ShapesGraphToAstTransformer/transformPropertyShapeToAstObjectTypeProperty.js +74 -19
  10. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompoundType.d.ts +1 -1
  11. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstCompoundType.js +45 -91
  12. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.d.ts +11 -0
  13. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstListType.js +146 -0
  14. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstObjectType.d.ts +7 -0
  15. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstObjectType.js +182 -0
  16. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstTermType.js +9 -7
  17. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.d.ts +3 -5
  18. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstType.js +33 -10
  19. package/dist/ast/AbstractCompoundType.d.ts +26 -8
  20. package/dist/ast/AbstractCompoundType.js +84 -16
  21. package/dist/ast/AbstractContainerType.d.ts +2 -4
  22. package/dist/ast/AbstractContainerType.js +3 -4
  23. package/dist/ast/AbstractLazyObjectType.d.ts +1 -0
  24. package/dist/ast/AbstractLazyObjectType.js +3 -0
  25. package/dist/ast/AbstractTermType.d.ts +1 -0
  26. package/dist/ast/AbstractTermType.js +1 -0
  27. package/dist/ast/AbstractType.d.ts +16 -1
  28. package/dist/ast/AbstractType.js +11 -1
  29. package/dist/ast/Ast.d.ts +4 -4
  30. package/dist/ast/BlankNodeType.d.ts +1 -1
  31. package/dist/ast/DefaultValueType.d.ts +1 -2
  32. package/dist/ast/DefaultValueType.js +2 -0
  33. package/dist/ast/IdentifierType.d.ts +1 -1
  34. package/dist/ast/IntersectionType.d.ts +7 -2
  35. package/dist/ast/IntersectionType.js +8 -0
  36. package/dist/ast/ListType.d.ts +2 -9
  37. package/dist/ast/ListType.js +1 -9
  38. package/dist/ast/LiteralType.d.ts +1 -0
  39. package/dist/ast/LiteralType.js +26 -0
  40. package/dist/ast/ObjectCompoundType.d.ts +12 -0
  41. package/dist/ast/ObjectCompoundType.js +88 -0
  42. package/dist/ast/ObjectIntersectionType.d.ts +3 -7
  43. package/dist/ast/ObjectIntersectionType.js +1 -7
  44. package/dist/ast/ObjectType.d.ts +14 -31
  45. package/dist/ast/ObjectType.js +41 -73
  46. package/dist/ast/ObjectUnionType.d.ts +3 -7
  47. package/dist/ast/ObjectUnionType.js +1 -7
  48. package/dist/ast/OptionType.d.ts +1 -2
  49. package/dist/ast/OptionType.js +2 -0
  50. package/dist/ast/SetType.d.ts +1 -2
  51. package/dist/ast/SetType.js +2 -0
  52. package/dist/ast/Type.d.ts +1 -4
  53. package/dist/ast/Type.js +0 -6
  54. package/dist/ast/UnionType.d.ts +11 -6
  55. package/dist/ast/UnionType.js +6 -4
  56. package/dist/ast/index.d.ts +1 -2
  57. package/dist/ast/index.js +1 -2
  58. package/dist/generators/json/AstJsonGenerator.js +16 -14
  59. package/dist/generators/ts/AbstractCollectionType.js +8 -10
  60. package/dist/generators/ts/AbstractContainerType.d.ts +8 -3
  61. package/dist/generators/ts/AbstractContainerType.js +9 -2
  62. package/dist/generators/ts/AbstractDateType.d.ts +2 -2
  63. package/dist/generators/ts/AbstractDateType.js +2 -2
  64. package/dist/generators/ts/AbstractIdentifierType.d.ts +1 -1
  65. package/dist/generators/ts/AbstractIdentifierType.js +1 -1
  66. package/dist/generators/ts/AbstractLazyObjectType.d.ts +11 -8
  67. package/dist/generators/ts/AbstractLazyObjectType.js +19 -14
  68. package/dist/generators/ts/AbstractNamedUnionType.d.ts +33 -0
  69. package/dist/generators/ts/AbstractNamedUnionType.js +193 -0
  70. package/dist/generators/ts/AbstractNumericType.d.ts +2 -2
  71. package/dist/generators/ts/AbstractNumericType.js +3 -3
  72. package/dist/generators/ts/AbstractTermType.d.ts +7 -4
  73. package/dist/generators/ts/AbstractTermType.js +7 -4
  74. package/dist/generators/ts/AbstractType.d.ts +29 -14
  75. package/dist/generators/ts/AbstractUnionType.d.ts +80 -0
  76. package/dist/generators/ts/AbstractUnionType.js +514 -0
  77. package/dist/generators/ts/AnonymousUnionType.d.ts +26 -0
  78. package/dist/generators/ts/AnonymousUnionType.js +56 -0
  79. package/dist/generators/ts/BigDecimalType.d.ts +3 -3
  80. package/dist/generators/ts/BigDecimalType.js +3 -3
  81. package/dist/generators/ts/BlankNodeType.d.ts +1 -1
  82. package/dist/generators/ts/BlankNodeType.js +1 -1
  83. package/dist/generators/ts/BooleanType.d.ts +2 -2
  84. package/dist/generators/ts/BooleanType.js +2 -2
  85. package/dist/generators/ts/DefaultValueType.d.ts +4 -4
  86. package/dist/generators/ts/DefaultValueType.js +14 -13
  87. package/dist/generators/ts/IdentifierType.d.ts +1 -1
  88. package/dist/generators/ts/IdentifierType.js +1 -1
  89. package/dist/generators/ts/IriType.d.ts +1 -1
  90. package/dist/generators/ts/IriType.js +1 -1
  91. package/dist/generators/ts/LazyObjectOptionType.d.ts +1 -1
  92. package/dist/generators/ts/LazyObjectOptionType.js +9 -9
  93. package/dist/generators/ts/LazyObjectSetType.d.ts +1 -1
  94. package/dist/generators/ts/LazyObjectSetType.js +7 -7
  95. package/dist/generators/ts/LazyObjectType.d.ts +1 -1
  96. package/dist/generators/ts/LazyObjectType.js +7 -8
  97. package/dist/generators/ts/ListType.d.ts +8 -7
  98. package/dist/generators/ts/ListType.js +14 -13
  99. package/dist/generators/ts/LiteralType.d.ts +1 -1
  100. package/dist/generators/ts/LiteralType.js +2 -2
  101. package/dist/generators/ts/NamedObjectUnionType.d.ts +35 -0
  102. package/dist/generators/ts/NamedObjectUnionType.js +221 -0
  103. package/dist/generators/ts/NamedUnionType.d.ts +11 -0
  104. package/dist/generators/ts/NamedUnionType.js +13 -0
  105. package/dist/generators/ts/ObjectType.d.ts +34 -25
  106. package/dist/generators/ts/ObjectType.js +62 -52
  107. package/dist/generators/ts/OptionType.d.ts +4 -4
  108. package/dist/generators/ts/OptionType.js +10 -10
  109. package/dist/generators/ts/SetType.d.ts +4 -4
  110. package/dist/generators/ts/SetType.js +13 -11
  111. package/dist/generators/ts/StringType.d.ts +2 -2
  112. package/dist/generators/ts/StringType.js +2 -2
  113. package/dist/generators/ts/TermType.d.ts +1 -1
  114. package/dist/generators/ts/TermType.js +2 -2
  115. package/dist/generators/ts/TsGenerator.js +23 -15
  116. package/dist/generators/ts/Type.d.ts +4 -3
  117. package/dist/generators/ts/TypeFactory.d.ts +7 -5
  118. package/dist/generators/ts/TypeFactory.js +117 -90
  119. package/dist/generators/ts/ZodGenerator.js +6 -6
  120. package/dist/generators/ts/_ObjectType/AbstractProperty.d.ts +3 -3
  121. package/dist/generators/ts/_ObjectType/{TypeDiscriminantProperty.d.ts → DiscriminantProperty.d.ts} +14 -14
  122. package/dist/generators/ts/_ObjectType/{TypeDiscriminantProperty.js → DiscriminantProperty.js} +10 -10
  123. package/dist/generators/ts/_ObjectType/IdentifierPrefixProperty.d.ts +2 -2
  124. package/dist/generators/ts/_ObjectType/IdentifierPrefixProperty.js +2 -2
  125. package/dist/generators/ts/_ObjectType/IdentifierProperty.d.ts +2 -2
  126. package/dist/generators/ts/_ObjectType/IdentifierProperty.js +7 -4
  127. package/dist/generators/ts/_ObjectType/ObjectType_classDeclaration.js +8 -8
  128. package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlConstructTriplesFunctionDeclaration.d.ts +5 -0
  129. package/dist/generators/ts/_ObjectType/{ObjectType_sparqlConstructTriplesFunctionDeclaration.js → ObjectType_focusSparqlConstructTriplesFunctionDeclaration.js} +6 -5
  130. package/dist/generators/ts/_ObjectType/ObjectType_focusSparqlWherePatternsFunctionDeclaration.d.ts +5 -0
  131. package/dist/generators/ts/_ObjectType/{ObjectType_sparqlWherePatternsFunctionDeclarations.js → ObjectType_focusSparqlWherePatternsFunctionDeclaration.js} +5 -5
  132. package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclaration.d.ts +5 -0
  133. package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclaration.js +20 -0
  134. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceFunctionDeclaration.d.ts +5 -0
  135. package/dist/generators/ts/_ObjectType/{ObjectType_fromRdfFunctionDeclaration.js → ObjectType_fromRdfResourceFunctionDeclaration.js} +6 -7
  136. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunctionDeclaration.d.ts +5 -0
  137. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfResourceValuesFunctionDeclaration.js +20 -0
  138. package/dist/generators/ts/_ObjectType/ObjectType_isTypeFunctionDeclaration.js +2 -2
  139. package/dist/generators/ts/_ObjectType/ObjectType_parseJsonFunctionDeclaration.d.ts +5 -0
  140. package/dist/generators/ts/_ObjectType/ObjectType_parseJsonFunctionDeclaration.js +19 -0
  141. package/dist/generators/ts/_ObjectType/ObjectType_propertiesFromJsonFunctionDeclaration.d.ts +5 -0
  142. package/dist/generators/ts/_ObjectType/ObjectType_propertiesFromJsonFunctionDeclaration.js +38 -0
  143. package/dist/generators/ts/_ObjectType/ObjectType_propertiesFromRdfResourceFunctionDeclaration.d.ts +5 -0
  144. package/dist/generators/ts/_ObjectType/{ObjectType_propertiesFromRdfFunctionDeclaration.js → ObjectType_propertiesFromRdfResourceFunctionDeclaration.js} +16 -15
  145. package/dist/generators/ts/_ObjectType/ObjectType_schemaVariableStatement.js +1 -2
  146. package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructQueryFunctionDeclaration.js +2 -2
  147. package/dist/generators/ts/_ObjectType/ObjectType_toRdfResourceFunctionOrMethodDeclaration.d.ts +5 -0
  148. package/dist/generators/ts/_ObjectType/{ObjectType_toRdfFunctionOrMethodDeclaration.js → ObjectType_toRdfResourceFunctionOrMethodDeclaration.js} +10 -8
  149. package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionDeclaration.d.ts +5 -0
  150. package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlConstructTriplesFunctionDeclaration.js +13 -0
  151. package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionDeclaration.d.ts +5 -0
  152. package/dist/generators/ts/_ObjectType/ObjectType_valueSparqlWherePatternsFunctionDeclaration.js +15 -0
  153. package/dist/generators/ts/_ObjectType/Property.d.ts +2 -2
  154. package/dist/generators/ts/_ObjectType/ShaclProperty.d.ts +2 -2
  155. package/dist/generators/ts/_ObjectType/ShaclProperty.js +6 -6
  156. package/dist/generators/ts/_snippets/snippets_FocusSparqlConstructTriplesFunction.d.ts +2 -0
  157. package/dist/generators/ts/_snippets/snippets_FocusSparqlConstructTriplesFunction.js +12 -0
  158. package/dist/generators/ts/_snippets/snippets_FocusSparqlWherePatternsFunction.d.ts +2 -0
  159. package/dist/generators/ts/_snippets/snippets_FocusSparqlWherePatternsFunction.js +14 -0
  160. package/dist/generators/ts/_snippets/snippets_FromRdfResourceFunction.d.ts +2 -0
  161. package/dist/generators/ts/_snippets/snippets_FromRdfResourceFunction.js +15 -0
  162. package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.d.ts +2 -0
  163. package/dist/generators/ts/_snippets/snippets_FromRdfResourceValuesFunction.js +17 -0
  164. package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfResourceFunction.d.ts +2 -0
  165. package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfResourceFunction.js +15 -0
  166. package/dist/generators/ts/_snippets/snippets_PropertyPath.d.ts +5 -0
  167. package/dist/generators/ts/_snippets/snippets_PropertyPath.js +35 -0
  168. package/dist/generators/ts/_snippets/snippets_ShaclPropertySchema.js +2 -2
  169. package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.d.ts +2 -0
  170. package/dist/generators/ts/_snippets/snippets_ToRdfResourceFunction.js +7 -0
  171. package/dist/generators/ts/_snippets/snippets_ToRdfResourceValuesFunction.d.ts +2 -0
  172. package/dist/generators/ts/_snippets/snippets_ToRdfResourceValuesFunction.js +16 -0
  173. package/dist/generators/ts/_snippets/snippets_ValueSparqlConstructTriplesFunction.d.ts +2 -0
  174. package/dist/generators/ts/_snippets/snippets_ValueSparqlConstructTriplesFunction.js +13 -0
  175. package/dist/generators/ts/_snippets/snippets_ValueSparqlWherePatternsFunction.d.ts +2 -0
  176. package/dist/generators/ts/_snippets/snippets_ValueSparqlWherePatternsFunction.js +16 -0
  177. package/dist/generators/ts/_snippets/snippets_bigDecimalSparqlWherePatterns.js +2 -2
  178. package/dist/generators/ts/_snippets/snippets_blankNodeSparqlWherePatterns.js +2 -2
  179. package/dist/generators/ts/_snippets/snippets_booleanEquals.js +1 -1
  180. package/dist/generators/ts/_snippets/snippets_booleanSparqlWherePatterns.js +2 -2
  181. package/dist/generators/ts/_snippets/snippets_dateSparqlWherePatterns.js +2 -2
  182. package/dist/generators/ts/_snippets/snippets_defaultValueSparqlWherePatterns.js +2 -2
  183. package/dist/generators/ts/_snippets/snippets_fromRdfLanguageIn.js +1 -1
  184. package/dist/generators/ts/_snippets/snippets_identifierSparqlWherePatterns.js +2 -2
  185. package/dist/generators/ts/_snippets/snippets_iriSparqlWherePatterns.js +2 -2
  186. package/dist/generators/ts/_snippets/snippets_listSparqlConstructTriples.js +2 -2
  187. package/dist/generators/ts/_snippets/snippets_listSparqlWherePatterns.js +2 -2
  188. package/dist/generators/ts/_snippets/snippets_literalSparqlWherePatterns.js +2 -2
  189. package/dist/generators/ts/_snippets/snippets_maybeSparqlConstructTriples.js +2 -2
  190. package/dist/generators/ts/_snippets/snippets_maybeSparqlWherePatterns.js +2 -2
  191. package/dist/generators/ts/_snippets/snippets_numericSparqlWherePatterns.js +2 -3
  192. package/dist/generators/ts/_snippets/snippets_setSparqlConstructTriples.js +2 -2
  193. package/dist/generators/ts/_snippets/snippets_setSparqlWherePatterns.js +2 -2
  194. package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlConstructTriples.js +4 -3
  195. package/dist/generators/ts/_snippets/snippets_shaclPropertySparqlWherePatterns.js +4 -3
  196. package/dist/generators/ts/_snippets/snippets_sparqlPropertyPath.js +3 -2
  197. package/dist/generators/ts/_snippets/snippets_stringSparqlWherePatterns.js +2 -2
  198. package/dist/generators/ts/_snippets/snippets_termSparqlWherePatterns.js +2 -2
  199. package/dist/generators/ts/graphqlSchemaVariableStatement.d.ts +2 -2
  200. package/dist/generators/ts/graphqlSchemaVariableStatement.js +4 -4
  201. package/dist/generators/ts/imports.d.ts +1 -1
  202. package/dist/generators/ts/imports.js +1 -1
  203. package/dist/generators/ts/objectSetDeclarations.d.ts +3 -3
  204. package/dist/generators/ts/objectSetDeclarations.js +15 -15
  205. package/dist/generators/ts/objectSetInterfaceDeclaration.d.ts +3 -3
  206. package/dist/generators/ts/objectSetInterfaceDeclaration.js +2 -2
  207. package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.d.ts +3 -3
  208. package/dist/generators/ts/rdfjsDatasetObjectSetClassDeclaration.js +16 -17
  209. package/dist/generators/ts/snippets.d.ts +10 -6
  210. package/dist/generators/ts/snippets.js +20 -12
  211. package/dist/generators/ts/sparqlObjectSetClassDeclaration.d.ts +3 -3
  212. package/dist/generators/ts/sparqlObjectSetClassDeclaration.js +7 -8
  213. package/dist/generators/ts/synthesizeUberObjectUnionType.d.ts +2 -2
  214. package/dist/generators/ts/synthesizeUberObjectUnionType.js +9 -4
  215. package/dist/input/NodeShape.d.ts +0 -1
  216. package/dist/input/NodeShape.js +0 -3
  217. package/dist/input/ShapesGraph.d.ts +3 -2
  218. package/dist/input/ShapesGraph.js +12 -7
  219. package/dist/input/generated.d.ts +1899 -88
  220. package/dist/input/generated.js +676 -564
  221. package/package.json +3 -5
  222. package/dist/_ShapesGraphToAstTransformer/CurieFactory.d.ts +0 -16
  223. package/dist/_ShapesGraphToAstTransformer/CurieFactory.js +0 -45
  224. package/dist/_ShapesGraphToAstTransformer/NodeShapeAstType.d.ts +0 -3
  225. package/dist/_ShapesGraphToAstTransformer/NodeShapeAstType.js +0 -2
  226. package/dist/_ShapesGraphToAstTransformer/index.d.ts +0 -6
  227. package/dist/_ShapesGraphToAstTransformer/index.js +0 -6
  228. package/dist/_ShapesGraphToAstTransformer/shapeIdentifier.d.ts +0 -5
  229. package/dist/_ShapesGraphToAstTransformer/shapeIdentifier.js +0 -9
  230. package/dist/_ShapesGraphToAstTransformer/transformNodeShapeToAstType.d.ts +0 -11
  231. package/dist/_ShapesGraphToAstTransformer/transformNodeShapeToAstType.js +0 -338
  232. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstAbstractTypeProperties.d.ts +0 -12
  233. package/dist/_ShapesGraphToAstTransformer/transformShapeToAstAbstractTypeProperties.js +0 -31
  234. package/dist/ast/AbstractObjectCompoundType.d.ts +0 -45
  235. package/dist/ast/AbstractObjectCompoundType.js +0 -180
  236. package/dist/ast/Curie.d.ts +0 -21
  237. package/dist/ast/Curie.js +0 -29
  238. package/dist/ast/PlaceholderType.d.ts +0 -15
  239. package/dist/ast/PlaceholderType.js +0 -19
  240. package/dist/generators/codeName.d.ts +0 -6
  241. package/dist/generators/codeName.js +0 -66
  242. package/dist/generators/ts/AbstractDeclaredType.d.ts +0 -23
  243. package/dist/generators/ts/AbstractDeclaredType.js +0 -17
  244. package/dist/generators/ts/ObjectUnionType.d.ts +0 -65
  245. package/dist/generators/ts/ObjectUnionType.js +0 -257
  246. package/dist/generators/ts/UnionType.d.ts +0 -40
  247. package/dist/generators/ts/UnionType.js +0 -527
  248. package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclarations.d.ts +0 -4
  249. package/dist/generators/ts/_ObjectType/ObjectType_fromJsonFunctionDeclarations.js +0 -66
  250. package/dist/generators/ts/_ObjectType/ObjectType_fromRdfFunctionDeclaration.d.ts +0 -5
  251. package/dist/generators/ts/_ObjectType/ObjectType_propertiesFromRdfFunctionDeclaration.d.ts +0 -5
  252. package/dist/generators/ts/_ObjectType/ObjectType_sparqlConstructTriplesFunctionDeclaration.d.ts +0 -5
  253. package/dist/generators/ts/_ObjectType/ObjectType_sparqlWherePatternsFunctionDeclarations.d.ts +0 -5
  254. package/dist/generators/ts/_ObjectType/ObjectType_toRdfFunctionOrMethodDeclaration.d.ts +0 -5
  255. package/dist/generators/ts/_ObjectUnionType/MemberType.d.ts +0 -34
  256. package/dist/generators/ts/_ObjectUnionType/MemberType.js +0 -105
  257. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_equalsFunctionDeclaration.d.ts +0 -5
  258. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_equalsFunctionDeclaration.js +0 -29
  259. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_filterFunctionDeclaration.d.ts +0 -4
  260. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_filterFunctionDeclaration.js +0 -19
  261. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_filterTypeDeclaration.d.ts +0 -4
  262. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_filterTypeDeclaration.js +0 -10
  263. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_fromJsonFunctionDeclaration.d.ts +0 -5
  264. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_fromJsonFunctionDeclaration.js +0 -19
  265. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_fromRdfFunctionDeclarations.d.ts +0 -5
  266. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_fromRdfFunctionDeclarations.js +0 -20
  267. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_graphqlTypeVariableStatement.d.ts +0 -5
  268. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_graphqlTypeVariableStatement.js +0 -18
  269. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_hashFunctionDeclaration.d.ts +0 -5
  270. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_hashFunctionDeclaration.js +0 -28
  271. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_identifierTypeDeclarations.d.ts +0 -4
  272. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_identifierTypeDeclarations.js +0 -9
  273. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_isTypeFunctionDeclaration.d.ts +0 -5
  274. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_isTypeFunctionDeclaration.js +0 -13
  275. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_jsonTypeAliasDeclaration.d.ts +0 -5
  276. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_jsonTypeAliasDeclaration.js +0 -10
  277. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_jsonZodSchemaFunctionDeclaration.d.ts +0 -5
  278. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_jsonZodSchemaFunctionDeclaration.js +0 -14
  279. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_schemaVariableStatement.d.ts +0 -4
  280. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_schemaVariableStatement.js +0 -37
  281. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_sparqlConstructTriplesFunctionDeclaration.d.ts +0 -5
  282. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_sparqlConstructTriplesFunctionDeclaration.js +0 -15
  283. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_sparqlWherePatternsFunctionDeclaration.d.ts +0 -5
  284. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_sparqlWherePatternsFunctionDeclaration.js +0 -35
  285. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_toJsonFunctionDeclaration.d.ts +0 -5
  286. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_toJsonFunctionDeclaration.js +0 -26
  287. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_toRdfFunctionDeclarations.d.ts +0 -5
  288. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_toRdfFunctionDeclarations.js +0 -43
  289. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_typeAliasDeclaration.d.ts +0 -4
  290. package/dist/generators/ts/_ObjectUnionType/ObjectUnionType_typeAliasDeclaration.js +0 -10
  291. package/dist/generators/ts/_snippets/snippets_FromRdfOptions.d.ts +0 -2
  292. package/dist/generators/ts/_snippets/snippets_FromRdfOptions.js +0 -5
  293. package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfParameters.d.ts +0 -2
  294. package/dist/generators/ts/_snippets/snippets_PropertiesFromRdfParameters.js +0 -5
  295. package/dist/generators/ts/_snippets/snippets_SparqlConstructTriplesFunction.d.ts +0 -2
  296. package/dist/generators/ts/_snippets/snippets_SparqlConstructTriplesFunction.js +0 -6
  297. package/dist/generators/ts/_snippets/snippets_SparqlConstructTriplesFunctionParameters.d.ts +0 -2
  298. package/dist/generators/ts/_snippets/snippets_SparqlConstructTriplesFunctionParameters.js +0 -12
  299. package/dist/generators/ts/_snippets/snippets_SparqlWherePatternsFunction.d.ts +0 -2
  300. package/dist/generators/ts/_snippets/snippets_SparqlWherePatternsFunction.js +0 -6
  301. package/dist/generators/ts/_snippets/snippets_SparqlWherePatternsFunctionParameters.d.ts +0 -2
  302. package/dist/generators/ts/_snippets/snippets_SparqlWherePatternsFunctionParameters.js +0 -15
@@ -26,9 +26,9 @@ export const imports = {
26
26
  Maybe: imp("Maybe@purify-ts"),
27
27
  NamedNode: imp("NamedNode@@rdfjs/types"),
28
28
  NonEmptyList: imp("NonEmptyList@purify-ts"),
29
- PropertyPath: imp("PropertyPath@rdfjs-resource"),
30
29
  Quad: imp("Quad@@rdfjs/types"),
31
30
  Quad_Graph: imp("Quad_Graph@@rdfjs/types"),
31
+ RdfjsResourcePropertyPath: imp("PropertyPath:RdfjsResourcePropertyPath@rdfjs-resource"),
32
32
  Resource: imp("Resource@rdfjs-resource"),
33
33
  ResourceSet: imp("ResourceSet@rdfjs-resource"),
34
34
  Right: imp("Right@purify-ts"),
@@ -1,8 +1,8 @@
1
+ import type { NamedObjectUnionType } from "./NamedObjectUnionType.js";
1
2
  import type { ObjectType } from "./ObjectType.js";
2
- import type { ObjectUnionType } from "./ObjectUnionType.js";
3
3
  import type { Code } from "./ts-poet-wrapper.js";
4
- export declare function objectSetDeclarations({ objectUnionTypes, ...parameters }: {
4
+ export declare function objectSetDeclarations({ namedObjectUnionTypes, ...parameters }: {
5
5
  objectTypes: readonly ObjectType[];
6
- objectUnionTypes: readonly ObjectUnionType[];
6
+ namedObjectUnionTypes: readonly NamedObjectUnionType[];
7
7
  }): readonly Code[];
8
8
  //# sourceMappingURL=objectSetDeclarations.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { objectSetInterfaceDeclaration } from "./objectSetInterfaceDeclaration.js";
2
2
  import { rdfjsDatasetObjectSetClassDeclaration } from "./rdfjsDatasetObjectSetClassDeclaration.js";
3
3
  import { sparqlObjectSetClassDeclaration } from "./sparqlObjectSetClassDeclaration.js";
4
- export function objectSetDeclarations({ objectUnionTypes, ...parameters }) {
4
+ export function objectSetDeclarations({ namedObjectUnionTypes, ...parameters }) {
5
5
  const objectTypes = parameters.objectTypes.filter((objectType) => !objectType.abstract && !objectType.extern && !objectType.synthetic);
6
6
  let objectTypesWithRdfFeatureCount = 0;
7
7
  let objectTypesWithSparqlFeatureCount = 0;
@@ -16,42 +16,42 @@ export function objectSetDeclarations({ objectUnionTypes, ...parameters }) {
16
16
  objectTypesWithSparqlFeatureCount++;
17
17
  }
18
18
  }
19
- let objectUnionTypesWithRdfFeatureCount = 0;
20
- let objectUnionTypesWithSparqlFeatureCount = 0;
21
- for (const objectUnionType of objectUnionTypes) {
22
- if (!objectUnionType.features.has("rdf") &&
23
- !objectUnionType.features.has("sparql")) {
19
+ let namedObjectUnionTypesWithRdfFeatureCount = 0;
20
+ let namedObjectUnionTypesWithSparqlFeatureCount = 0;
21
+ for (const namedObjectUnionType of namedObjectUnionTypes) {
22
+ if (!namedObjectUnionType.features.has("rdf") &&
23
+ !namedObjectUnionType.features.has("sparql")) {
24
24
  continue;
25
25
  }
26
- if (objectUnionType.features.has("rdf")) {
27
- objectUnionTypesWithRdfFeatureCount++;
26
+ if (namedObjectUnionType.features.has("rdf")) {
27
+ namedObjectUnionTypesWithRdfFeatureCount++;
28
28
  }
29
- if (objectUnionType.features.has("sparql")) {
30
- objectUnionTypesWithSparqlFeatureCount++;
29
+ if (namedObjectUnionType.features.has("sparql")) {
30
+ namedObjectUnionTypesWithSparqlFeatureCount++;
31
31
  }
32
32
  }
33
33
  if (objectTypesWithRdfFeatureCount === 0 &&
34
34
  objectTypesWithSparqlFeatureCount === 0 &&
35
- objectUnionTypesWithRdfFeatureCount === 0 &&
36
- objectUnionTypesWithSparqlFeatureCount === 0) {
35
+ namedObjectUnionTypesWithRdfFeatureCount === 0 &&
36
+ namedObjectUnionTypesWithSparqlFeatureCount === 0) {
37
37
  return [];
38
38
  }
39
39
  const declarations = [
40
40
  objectSetInterfaceDeclaration({
41
41
  objectTypes,
42
- objectUnionTypes,
42
+ namedObjectUnionTypes,
43
43
  }),
44
44
  ];
45
45
  if (objectTypesWithRdfFeatureCount > 0) {
46
46
  declarations.push(rdfjsDatasetObjectSetClassDeclaration({
47
47
  objectTypes,
48
- objectUnionTypes,
48
+ namedObjectUnionTypes,
49
49
  }));
50
50
  }
51
51
  if (objectTypesWithSparqlFeatureCount > 0) {
52
52
  declarations.push(sparqlObjectSetClassDeclaration({
53
53
  objectTypes,
54
- objectUnionTypes,
54
+ namedObjectUnionTypes,
55
55
  }));
56
56
  }
57
57
  return declarations;
@@ -1,8 +1,8 @@
1
+ import type { NamedObjectUnionType } from "./NamedObjectUnionType.js";
1
2
  import type { ObjectType } from "./ObjectType.js";
2
- import type { ObjectUnionType } from "./ObjectUnionType.js";
3
3
  import { type Code } from "./ts-poet-wrapper.js";
4
- export declare function objectSetInterfaceDeclaration({ objectTypes, objectUnionTypes, }: {
4
+ export declare function objectSetInterfaceDeclaration({ objectTypes, namedObjectUnionTypes, }: {
5
5
  objectTypes: readonly ObjectType[];
6
- objectUnionTypes: readonly ObjectUnionType[];
6
+ namedObjectUnionTypes: readonly NamedObjectUnionType[];
7
7
  }): Code;
8
8
  //# sourceMappingURL=objectSetInterfaceDeclaration.d.ts.map
@@ -2,12 +2,12 @@ import { imports } from "./imports.js";
2
2
  import { objectSetMethodSignatures } from "./objectSetMethodSignatures.js";
3
3
  import { syntheticNamePrefix } from "./syntheticNamePrefix.js";
4
4
  import { code, joinCode } from "./ts-poet-wrapper.js";
5
- export function objectSetInterfaceDeclaration({ objectTypes, objectUnionTypes, }) {
5
+ export function objectSetInterfaceDeclaration({ objectTypes, namedObjectUnionTypes, }) {
6
6
  return code `\
7
7
  export interface ${syntheticNamePrefix}ObjectSet {
8
8
  ${joinCode(objectTypes
9
9
  .flatMap((objectType) => Object.values(objectSetMethodSignatures({ objectType })))
10
- .concat(objectUnionTypes.flatMap((objectUnionType) => Object.values(objectSetMethodSignatures({ objectType: objectUnionType }))))
10
+ .concat(namedObjectUnionTypes.flatMap((namedObjectUnionType) => Object.values(objectSetMethodSignatures({ objectType: namedObjectUnionType }))))
11
11
  .map((methodSignature) => code `${methodSignature.name}(${methodSignature.parameters}): ${methodSignature.returnType};`), { on: "\n\n" })}
12
12
  }
13
13
 
@@ -1,8 +1,8 @@
1
+ import type { NamedObjectUnionType } from "./NamedObjectUnionType.js";
1
2
  import type { ObjectType } from "./ObjectType.js";
2
- import type { ObjectUnionType } from "./ObjectUnionType.js";
3
3
  import { type Code } from "./ts-poet-wrapper.js";
4
- export declare function rdfjsDatasetObjectSetClassDeclaration({ objectTypes, objectUnionTypes, }: {
4
+ export declare function rdfjsDatasetObjectSetClassDeclaration({ objectTypes, namedObjectUnionTypes, }: {
5
5
  objectTypes: readonly ObjectType[];
6
- objectUnionTypes: readonly ObjectUnionType[];
6
+ namedObjectUnionTypes: readonly NamedObjectUnionType[];
7
7
  }): Code;
8
8
  //# sourceMappingURL=rdfjsDatasetObjectSetClassDeclaration.d.ts.map
@@ -1,15 +1,14 @@
1
- import { snippets_FromRdfOptions } from "./_snippets/snippets_FromRdfOptions.js";
2
1
  import { imports } from "./imports.js";
3
2
  import { objectSetMethodSignatures } from "./objectSetMethodSignatures.js";
4
3
  import { snippets } from "./snippets.js";
5
4
  import { syntheticNamePrefix } from "./syntheticNamePrefix.js";
6
5
  import { code, joinCode } from "./ts-poet-wrapper.js";
7
6
  import { unsupportedObjectSetMethodDeclarations } from "./unsupportedObjectSetMethodDeclarations.js";
8
- export function rdfjsDatasetObjectSetClassDeclaration({ objectTypes, objectUnionTypes, }) {
7
+ export function rdfjsDatasetObjectSetClassDeclaration({ objectTypes, namedObjectUnionTypes, }) {
9
8
  const objectTypeType = code `\
10
9
  {
11
10
  ${syntheticNamePrefix}filter: (filter: ObjectFilterT, value: ObjectT) => boolean;
12
- ${syntheticNamePrefix}fromRdf: (resource: ${imports.Resource}, options?: ${snippets_FromRdfOptions}) => ${imports.Either}<Error, ObjectT>;
11
+ ${syntheticNamePrefix}fromRdfResource: ${snippets.FromRdfResourceFunction}<ObjectT>;
13
12
  ${syntheticNamePrefix}fromRdfTypes: readonly ${imports.NamedNode}[]
14
13
  }`;
15
14
  const parameters = {
@@ -42,7 +41,7 @@ export class ${syntheticNamePrefix}RdfjsDatasetObjectSet implements ${syntheticN
42
41
  }
43
42
 
44
43
  ${joinCode([
45
- ...[...objectTypes, ...objectUnionTypes].flatMap((objectType) => {
44
+ ...[...objectTypes, ...namedObjectUnionTypes].flatMap((objectType) => {
46
45
  if (!objectType.features.has("rdf")) {
47
46
  return Object.values(unsupportedObjectSetMethodDeclarations({
48
47
  objectType,
@@ -91,7 +90,7 @@ async ${methodSignatures.objects.name}(${methodSignatures.objects.parameters}):
91
90
  const fromRdfTypes = objectType.fromRdfTypeVariable
92
91
  .toList()
93
92
  .concat(objectType.descendantFromRdfTypeVariables);
94
- return code `{ ${syntheticNamePrefix}filter: ${filterFunction}, ${syntheticNamePrefix}fromRdf: ${objectType.staticModuleName}.${syntheticNamePrefix}fromRdf, ${syntheticNamePrefix}fromRdfTypes: ${fromRdfTypes.length > 0 ? code `[${joinCode(fromRdfTypes, { on: ", " })}]` : "[]"} }`;
93
+ return code `{ ${syntheticNamePrefix}filter: ${filterFunction}, ${syntheticNamePrefix}fromRdfResource: ${objectType.staticModuleName}.${syntheticNamePrefix}fromRdfResource, ${syntheticNamePrefix}fromRdfTypes: ${fromRdfTypes.length > 0 ? code `[${joinCode(fromRdfTypes, { on: ", " })}]` : "[]"} }`;
95
94
  };
96
95
  switch (objectType.kind) {
97
96
  case "ObjectType": {
@@ -100,13 +99,13 @@ ${methodSignatures.objects.name}Sync(${methodSignatures.objects.parameters}): ${
100
99
  return this.${syntheticNamePrefix}objectsSync<${objectType.name}, ${objectType.filterType}, ${objectType.identifierTypeAlias}>(${runtimeObjectType(objectType.filterFunction, objectType)}, query);
101
100
  }`);
102
101
  }
103
- case "ObjectUnionType":
102
+ case "NamedObjectUnionType":
104
103
  return delegatingMethods.concat(code `\
105
104
  ${methodSignatures.objects.name}Sync(${methodSignatures.objects.parameters}): ${imports.Either}<Error, readonly ${objectType.name}[]> {
106
105
  return this.${syntheticNamePrefix}objectUnionsSync<${objectType.name}, ${objectType.filterType}, ${objectType.identifierTypeAlias}>([
107
- ${joinCode(objectType.memberTypes
108
- .filter((memberType) => !memberType.abstract)
109
- .map((memberType) => runtimeObjectType(objectType.filterFunction, memberType)), { on: ", " })}
106
+ ${joinCode(objectType.members
107
+ .filter((member) => !member.type.abstract)
108
+ .map((member) => runtimeObjectType(objectType.filterFunction, member.type)), { on: ", " })}
110
109
  ], query);
111
110
  }`);
112
111
  default:
@@ -126,7 +125,7 @@ protected ${syntheticNamePrefix}objectsSync<${typeParameters.ObjectT}, ${typePar
126
125
  let offset = query?.offset ?? 0;
127
126
  if (offset < 0) { offset = 0; }
128
127
 
129
- const fromRdfOptions: ${snippets_FromRdfOptions} = { graph, objectSet: this, preferredLanguages: query?.preferredLanguages };
128
+ const fromRdfResourceOptions: Parameters<${snippets.FromRdfResourceFunction}<ObjectT>>[1] = { graph, objectSet: this, preferredLanguages: query?.preferredLanguages };
130
129
 
131
130
  let resources: { object?: ObjectT, resource: ${imports.Resource} }[];
132
131
  const resourceSet = this.${syntheticNamePrefix}resourceSet(); // Access once, in case it's instantiated lazily
@@ -169,7 +168,7 @@ protected ${syntheticNamePrefix}objectsSync<${typeParameters.ObjectT}, ${typePar
169
168
  identifierSet.add(quad.subject);
170
169
  const resource = resourceSet.resource(quad.subject);
171
170
  // Eagerly eliminate the majority of resources that won't match the object type
172
- objectType.${syntheticNamePrefix}fromRdf(resource, fromRdfOptions).ifRight(object => {
171
+ objectType.${syntheticNamePrefix}fromRdfResource(resource, fromRdfResourceOptions).ifRight(object => {
173
172
  resources.push({ object, resource });
174
173
  });
175
174
  }
@@ -184,7 +183,7 @@ protected ${syntheticNamePrefix}objectsSync<${typeParameters.ObjectT}, ${typePar
184
183
  const objects: ObjectT[] = [];
185
184
  for (let { object, resource } of resources) {
186
185
  if (!object) {
187
- const objectEither = objectType.${syntheticNamePrefix}fromRdf(resource, fromRdfOptions);
186
+ const objectEither = objectType.${syntheticNamePrefix}fromRdfResource(resource, fromRdfResourceOptions);
188
187
  if (objectEither.isLeft()) {
189
188
  return objectEither;
190
189
  }
@@ -206,7 +205,7 @@ protected ${syntheticNamePrefix}objectsSync<${typeParameters.ObjectT}, ${typePar
206
205
  }`,
207
206
  ]
208
207
  : []),
209
- ...(objectUnionTypes.length > 0
208
+ ...(namedObjectUnionTypes.length > 0
210
209
  ? [
211
210
  code `\
212
211
  protected ${syntheticNamePrefix}objectUnionsSync<${typeParameters.ObjectT}, ${typeParameters.ObjectFilterT}, ${typeParameters.ObjectIdentifierT}>(objectTypes: readonly ${objectTypeType}[], ${parameters.query}): ${imports.Either}<Error, readonly ObjectT[]> {
@@ -218,7 +217,7 @@ protected ${syntheticNamePrefix}objectUnionsSync<${typeParameters.ObjectT}, ${ty
218
217
  let offset = query?.offset ?? 0;
219
218
  if (offset < 0) { offset = 0; }
220
219
 
221
- const fromRdfOptions: ${snippets_FromRdfOptions} = { graph, objectSet: this, preferredLanguages: query?.preferredLanguages };
220
+ const fromRdfResourceOptions: Parameters<${snippets.FromRdfResourceFunction}<ObjectT>>[1] = { graph, objectSet: this, preferredLanguages: query?.preferredLanguages };
222
221
 
223
222
  let resources: { object?: ObjectT, objectType?: ${objectTypeType}, resource: ${imports.Resource} }[];
224
223
  const resourceSet = this.${syntheticNamePrefix}resourceSet(); // Access once, in case it's instantiated lazily
@@ -264,7 +263,7 @@ protected ${syntheticNamePrefix}objectUnionsSync<${typeParameters.ObjectT}, ${ty
264
263
  // Eagerly eliminate the majority of resources that won't match the object types
265
264
  const resource = resourceSet.resource(quad.subject);
266
265
  for (const objectType of objectTypes) {
267
- if (objectType.${syntheticNamePrefix}fromRdf(resource, fromRdfOptions).ifRight(object => {
266
+ if (objectType.${syntheticNamePrefix}fromRdfResource(resource, fromRdfResourceOptions).ifRight(object => {
268
267
  resources.push({ object, objectType, resource });
269
268
  }).isRight()) {
270
269
  break;
@@ -284,11 +283,11 @@ protected ${syntheticNamePrefix}objectUnionsSync<${typeParameters.ObjectT}, ${ty
284
283
  if (!object) {
285
284
  let objectEither: ${imports.Either}<Error, ObjectT>;
286
285
  if (objectType) {
287
- objectEither = objectType.${syntheticNamePrefix}fromRdf(resource, fromRdfOptions);
286
+ objectEither = objectType.${syntheticNamePrefix}fromRdfResource(resource, fromRdfResourceOptions);
288
287
  } else {
289
288
  objectEither = ${imports.Left}(new Error("no object types"));
290
289
  for (const tryObjectType of objectTypes) {
291
- objectEither = tryObjectType.${syntheticNamePrefix}fromRdf(resource, fromRdfOptions);
290
+ objectEither = tryObjectType.${syntheticNamePrefix}fromRdfResource(resource, fromRdfResourceOptions);
292
291
  if (objectEither.isRight()) {
293
292
  objectType = tryObjectType;
294
293
  break;
@@ -34,9 +34,12 @@ export declare const snippets: {
34
34
  filterNumeric: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
35
35
  filterString: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
36
36
  filterTerm: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
37
- FromRdfOptions: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
37
+ FocusSparqlConstructTriplesFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
38
+ FocusSparqlWherePatternsFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
38
39
  fromRdfLanguageIn: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
39
40
  fromRdfPreferredLanguages: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
41
+ FromRdfResourceFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
42
+ FromRdfResourceValuesFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
40
43
  Hasher: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
41
44
  IdentifierFilter: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
42
45
  identifierFromString: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
@@ -71,7 +74,8 @@ export declare const snippets: {
71
74
  NumericFilter: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
72
75
  NumericSchema: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
73
76
  numericSparqlWherePatterns: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
74
- PropertiesFromRdfParameters: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
77
+ PropertiesFromRdfResourceFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
78
+ PropertyPath: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
75
79
  RdfVocabularies: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
76
80
  shaclPropertyFromRdf: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
77
81
  ShaclPropertySchema: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
@@ -80,16 +84,12 @@ export declare const snippets: {
80
84
  setSparqlConstructTriples: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
81
85
  setSparqlWherePatterns: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
82
86
  sortSparqlPatterns: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
83
- SparqlConstructTriplesFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
84
- SparqlConstructTriplesFunctionParameters: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
85
87
  SparqlFilterPattern: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
86
88
  sparqlInstancesOfPattern: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
87
89
  SparqlPattern_isSolutionGenerating: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
88
90
  SparqlPattern: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
89
91
  sparqlPropertyPath: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
90
92
  sparqlValueInPattern: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
91
- SparqlWherePatternsFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
92
- SparqlWherePatternsFunctionParameters: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
93
93
  strictEquals: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
94
94
  StringFilter: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
95
95
  StringSchema: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
@@ -99,6 +99,10 @@ export declare const snippets: {
99
99
  TermSchema: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
100
100
  termSchemaSparqlPatterns: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
101
101
  termSparqlWherePatterns: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
102
+ ToRdfResourceFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
103
+ ToRdfResourceValuesFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
102
104
  UnwrapR: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
105
+ ValueSparqlConstructTriplesFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
106
+ ValueSparqlWherePatternsFunction: import("ts-poet/build/ConditionalOutput.js").ConditionalOutput;
103
107
  };
104
108
  //# sourceMappingURL=snippets.d.ts.map
@@ -21,7 +21,10 @@ import { snippets_decodeBigDecimalLiteral } from "./_snippets/snippets_decodeBig
21
21
  import { snippets_deduplicateSparqlPatterns } from "./_snippets/snippets_deduplicateSparqlPatterns.js";
22
22
  import { snippets_defaultValueSparqlWherePatterns } from "./_snippets/snippets_defaultValueSparqlWherePatterns.js";
23
23
  import { snippets_EqualsResult } from "./_snippets/snippets_EqualsResult.js";
24
- import { snippets_FromRdfOptions } from "./_snippets/snippets_FromRdfOptions.js";
24
+ import { snippets_FocusSparqlConstructTriplesFunction } from "./_snippets/snippets_FocusSparqlConstructTriplesFunction.js";
25
+ import { snippets_FocusSparqlWherePatternsFunction } from "./_snippets/snippets_FocusSparqlWherePatternsFunction.js";
26
+ import { snippets_FromRdfResourceFunction } from "./_snippets/snippets_FromRdfResourceFunction.js";
27
+ import { snippets_FromRdfResourceValuesFunction } from "./_snippets/snippets_FromRdfResourceValuesFunction.js";
25
28
  import { snippets_filterArray } from "./_snippets/snippets_filterArray.js";
26
29
  import { snippets_filterBigDecimal } from "./_snippets/snippets_filterBigDecimal.js";
27
30
  import { snippets_filterBlankNode } from "./_snippets/snippets_filterBlankNode.js";
@@ -70,16 +73,13 @@ import { snippets_NumericFilter } from "./_snippets/snippets_NumericFilter.js";
70
73
  import { snippets_NumericSchema } from "./_snippets/snippets_NumericSchema.js";
71
74
  import { snippets_normalizeSparqlWherePatterns } from "./_snippets/snippets_normalizeSparqlWherePatterns.js";
72
75
  import { snippets_numericSparqlWherePatterns } from "./_snippets/snippets_numericSparqlWherePatterns.js";
73
- import { snippets_PropertiesFromRdfParameters } from "./_snippets/snippets_PropertiesFromRdfParameters.js";
76
+ import { snippets_PropertiesFromRdfResourceFunction } from "./_snippets/snippets_PropertiesFromRdfResourceFunction.js";
77
+ import { snippets_PropertyPath } from "./_snippets/snippets_PropertyPath.js";
74
78
  import { snippets_RdfVocabularies } from "./_snippets/snippets_RdfVocabularies.js";
75
79
  import { snippets_ShaclPropertySchema } from "./_snippets/snippets_ShaclPropertySchema.js";
76
- import { snippets_SparqlConstructTriplesFunction } from "./_snippets/snippets_SparqlConstructTriplesFunction.js";
77
- import { snippets_SparqlConstructTriplesFunctionParameters } from "./_snippets/snippets_SparqlConstructTriplesFunctionParameters.js";
78
80
  import { snippets_SparqlFilterPattern } from "./_snippets/snippets_SparqlFilterPattern.js";
79
81
  import { snippets_SparqlPattern } from "./_snippets/snippets_SparqlPattern.js";
80
82
  import { snippets_SparqlPattern_isSolutionGenerating } from "./_snippets/snippets_SparqlPattern_isSolutionGenerating.js";
81
- import { snippets_SparqlWherePatternsFunction } from "./_snippets/snippets_SparqlWherePatternsFunction.js";
82
- import { snippets_SparqlWherePatternsFunctionParameters } from "./_snippets/snippets_SparqlWherePatternsFunctionParameters.js";
83
83
  import { snippets_StringFilter } from "./_snippets/snippets_StringFilter.js";
84
84
  import { snippets_StringSchema } from "./_snippets/snippets_StringSchema.js";
85
85
  import { snippets_setSparqlConstructTriples } from "./_snippets/snippets_setSparqlConstructTriples.js";
@@ -95,10 +95,14 @@ import { snippets_strictEquals } from "./_snippets/snippets_strictEquals.js";
95
95
  import { snippets_stringSparqlWherePatterns } from "./_snippets/snippets_stringSparqlWherePatterns.js";
96
96
  import { snippets_TermFilter } from "./_snippets/snippets_TermFilter.js";
97
97
  import { snippets_TermSchema } from "./_snippets/snippets_TermSchema.js";
98
+ import { snippets_ToRdfResourceFunction } from "./_snippets/snippets_ToRdfResourceFunction.js";
99
+ import { snippets_ToRdfResourceValuesFunction } from "./_snippets/snippets_ToRdfResourceValuesFunction.js";
98
100
  import { snippets_termFilterSparqlPatterns } from "./_snippets/snippets_termFilterSparqlPatterns.js";
99
101
  import { snippets_termSchemaSparqlPatterns } from "./_snippets/snippets_termSchemaSparqlPatterns.js";
100
102
  import { snippets_termSparqlWherePatterns } from "./_snippets/snippets_termSparqlWherePatterns.js";
101
103
  import { snippets_UnwrapR } from "./_snippets/snippets_UnwrapR.js";
104
+ import { snippets_ValueSparqlConstructTriplesFunction } from "./_snippets/snippets_ValueSparqlConstructTriplesFunction.js";
105
+ import { snippets_ValueSparqlWherePatternsFunction } from "./_snippets/snippets_ValueSparqlWherePatternsFunction.js";
102
106
  export const snippets = {
103
107
  arrayIntersection: snippets_arrayIntersection,
104
108
  arrayEquals: snippets_arrayEquals,
@@ -135,9 +139,12 @@ export const snippets = {
135
139
  filterNumeric: snippets_filterNumeric,
136
140
  filterString: snippets_filterString,
137
141
  filterTerm: snippets_filterTerm,
138
- FromRdfOptions: snippets_FromRdfOptions,
142
+ FocusSparqlConstructTriplesFunction: snippets_FocusSparqlConstructTriplesFunction,
143
+ FocusSparqlWherePatternsFunction: snippets_FocusSparqlWherePatternsFunction,
139
144
  fromRdfLanguageIn: snippets_fromRdfLanguageIn,
140
145
  fromRdfPreferredLanguages: snippets_fromRdfPreferredLanguages,
146
+ FromRdfResourceFunction: snippets_FromRdfResourceFunction,
147
+ FromRdfResourceValuesFunction: snippets_FromRdfResourceValuesFunction,
141
148
  Hasher: snippets_Hasher,
142
149
  IdentifierFilter: snippets_IdentifierFilter,
143
150
  identifierFromString: snippets_identifierFromString,
@@ -172,7 +179,8 @@ export const snippets = {
172
179
  NumericFilter: snippets_NumericFilter,
173
180
  NumericSchema: snippets_NumericSchema,
174
181
  numericSparqlWherePatterns: snippets_numericSparqlWherePatterns,
175
- PropertiesFromRdfParameters: snippets_PropertiesFromRdfParameters,
182
+ PropertiesFromRdfResourceFunction: snippets_PropertiesFromRdfResourceFunction,
183
+ PropertyPath: snippets_PropertyPath,
176
184
  RdfVocabularies: snippets_RdfVocabularies,
177
185
  shaclPropertyFromRdf: snippets_shaclPropertyFromRdf,
178
186
  ShaclPropertySchema: snippets_ShaclPropertySchema,
@@ -181,16 +189,12 @@ export const snippets = {
181
189
  setSparqlConstructTriples: snippets_setSparqlConstructTriples,
182
190
  setSparqlWherePatterns: snippets_setSparqlWherePatterns,
183
191
  sortSparqlPatterns: snippets_sortSparqlPatterns,
184
- SparqlConstructTriplesFunction: snippets_SparqlConstructTriplesFunction,
185
- SparqlConstructTriplesFunctionParameters: snippets_SparqlConstructTriplesFunctionParameters,
186
192
  SparqlFilterPattern: snippets_SparqlFilterPattern,
187
193
  sparqlInstancesOfPattern: snippets_sparqlInstancesOfPattern,
188
194
  SparqlPattern_isSolutionGenerating: snippets_SparqlPattern_isSolutionGenerating,
189
195
  SparqlPattern: snippets_SparqlPattern,
190
196
  sparqlPropertyPath: snippets_sparqlPropertyPath,
191
197
  sparqlValueInPattern: snippets_sparqlValueInPattern,
192
- SparqlWherePatternsFunction: snippets_SparqlWherePatternsFunction,
193
- SparqlWherePatternsFunctionParameters: snippets_SparqlWherePatternsFunctionParameters,
194
198
  strictEquals: snippets_strictEquals,
195
199
  StringFilter: snippets_StringFilter,
196
200
  StringSchema: snippets_StringSchema,
@@ -200,6 +204,10 @@ export const snippets = {
200
204
  TermSchema: snippets_TermSchema,
201
205
  termSchemaSparqlPatterns: snippets_termSchemaSparqlPatterns,
202
206
  termSparqlWherePatterns: snippets_termSparqlWherePatterns,
207
+ ToRdfResourceFunction: snippets_ToRdfResourceFunction,
208
+ ToRdfResourceValuesFunction: snippets_ToRdfResourceValuesFunction,
203
209
  UnwrapR: snippets_UnwrapR,
210
+ ValueSparqlConstructTriplesFunction: snippets_ValueSparqlConstructTriplesFunction,
211
+ ValueSparqlWherePatternsFunction: snippets_ValueSparqlWherePatternsFunction,
204
212
  };
205
213
  //# sourceMappingURL=snippets.js.map
@@ -1,8 +1,8 @@
1
+ import type { NamedObjectUnionType } from "./NamedObjectUnionType.js";
1
2
  import type { ObjectType } from "./ObjectType.js";
2
- import type { ObjectUnionType } from "./ObjectUnionType.js";
3
3
  import { type Code } from "./ts-poet-wrapper.js";
4
- export declare function sparqlObjectSetClassDeclaration({ objectTypes, objectUnionTypes, }: {
4
+ export declare function sparqlObjectSetClassDeclaration({ objectTypes, namedObjectUnionTypes, }: {
5
5
  objectTypes: readonly ObjectType[];
6
- objectUnionTypes: readonly ObjectUnionType[];
6
+ namedObjectUnionTypes: readonly NamedObjectUnionType[];
7
7
  }): Code;
8
8
  //# sourceMappingURL=sparqlObjectSetClassDeclaration.d.ts.map
@@ -4,16 +4,15 @@ import { snippets } from "./snippets.js";
4
4
  import { syntheticNamePrefix } from "./syntheticNamePrefix.js";
5
5
  import { code, joinCode } from "./ts-poet-wrapper.js";
6
6
  import { unsupportedObjectSetMethodDeclarations } from "./unsupportedObjectSetMethodDeclarations.js";
7
- export function sparqlObjectSetClassDeclaration({ objectTypes, objectUnionTypes, }) {
8
- const sparqlWherePatternsFunctionType = code `(parameters: { filter: ObjectFilterT | undefined; focusIdentifier: ${imports.NamedNode} | ${imports.Variable}; ignoreRdfType: boolean; preferredLanguages: readonly string[] | undefined; variablePrefix: string; }) => readonly ${imports.sparqljs}.Pattern[]`;
7
+ export function sparqlObjectSetClassDeclaration({ objectTypes, namedObjectUnionTypes, }) {
9
8
  const parameters = {
10
9
  constructObjectType: code `objectType: {\
11
- ${syntheticNamePrefix}fromRdf: (resource: ${imports.Resource}, options: { graph?: Exclude<${imports.Quad_Graph}, ${imports.Variable}>; objectSet: ${syntheticNamePrefix}ObjectSet; preferredLanguages?: readonly string[]; }) => ${imports.Either}<Error, ObjectT>;
10
+ ${syntheticNamePrefix}focusSparqlWherePatterns: ${snippets.FocusSparqlWherePatternsFunction}<ObjectFilterT>;
11
+ ${syntheticNamePrefix}fromRdfResource: ${snippets.FromRdfResourceFunction}<ObjectT>;
12
12
  ${syntheticNamePrefix}sparqlConstructQueryString: (parameters: { filter?: ObjectFilterT; subject: ${imports.NamedNode} | ${imports.Variable}; } & Omit<${imports.sparqljs}.ConstructQuery, "prefixes" | "queryType" | "type"> & ${imports.sparqljs}.GeneratorOptions) => string;
13
- ${syntheticNamePrefix}sparqlWherePatterns: ${sparqlWherePatternsFunctionType};
14
13
  }`,
15
14
  query: code `query?: ${syntheticNamePrefix}SparqlObjectSet.Query<ObjectFilterT, ObjectIdentifierT>`,
16
- selectObjectTypeType: code `objectType: { ${syntheticNamePrefix}sparqlWherePatterns: ${sparqlWherePatternsFunctionType} }`,
15
+ selectObjectTypeType: code `objectType: { ${syntheticNamePrefix}focusSparqlWherePatterns: ${snippets.FocusSparqlWherePatternsFunction}<ObjectFilterT> }`,
17
16
  };
18
17
  const typeParameters = {
19
18
  ObjectT: code `ObjectT extends { readonly $identifier: ObjectIdentifierT }`,
@@ -31,7 +30,7 @@ export class ${syntheticNamePrefix}SparqlObjectSet implements ${syntheticNamePre
31
30
  this.graph = options?.graph;
32
31
  }
33
32
 
34
- ${joinCode([...objectTypes, ...objectUnionTypes].flatMap((objectType) => {
33
+ ${joinCode([...objectTypes, ...namedObjectUnionTypes].flatMap((objectType) => {
35
34
  if (!objectType.features.has("sparql")) {
36
35
  return Object.values(unsupportedObjectSetMethodDeclarations({
37
36
  objectType,
@@ -162,7 +161,7 @@ async ${methodSignatures.objects.name}(${methodSignatures.objects.parameters}):
162
161
  const dataset = ${imports.datasetFactory}.dataset(quads.concat());
163
162
  const objects: ObjectT[] = [];
164
163
  for (const identifier of identifiers) {
165
- objects.push(await liftEither(objectType.${syntheticNamePrefix}fromRdf(new ${imports.Resource}(dataset, identifier as ${imports.NamedNode}), { objectSet: this, preferredLanguages: query?.preferredLanguages })));
164
+ objects.push(await liftEither(objectType.${syntheticNamePrefix}fromRdfResource(new ${imports.Resource}(dataset, identifier as ${imports.NamedNode}), { objectSet: this, preferredLanguages: query?.preferredLanguages })));
166
165
  }
167
166
  return objects;
168
167
  });
@@ -211,7 +210,7 @@ async ${methodSignatures.objects.name}(${methodSignatures.objects.parameters}):
211
210
  patterns = patterns.concat(query.where(this.${syntheticNamePrefix}objectVariable));
212
211
  }
213
212
 
214
- patterns = patterns.concat(objectType.${syntheticNamePrefix}sparqlWherePatterns({ filter: query?.filter, focusIdentifier: this.${syntheticNamePrefix}objectVariable, ignoreRdfType: false, preferredLanguages: query?.preferredLanguages, variablePrefix: this.${syntheticNamePrefix}objectVariable.value }));
213
+ patterns = patterns.concat(objectType.${syntheticNamePrefix}focusSparqlWherePatterns({ filter: query?.filter, focusIdentifier: this.${syntheticNamePrefix}objectVariable, ignoreRdfType: false, preferredLanguages: query?.preferredLanguages, variablePrefix: this.${syntheticNamePrefix}objectVariable.value }));
215
214
 
216
215
  patterns = ${snippets.normalizeSparqlWherePatterns}(patterns).concat();
217
216
 
@@ -1,9 +1,9 @@
1
+ import { NamedObjectUnionType } from "./NamedObjectUnionType.js";
1
2
  import type { ObjectType } from "./ObjectType.js";
2
- import { ObjectUnionType } from "./ObjectUnionType.js";
3
3
  /**
4
4
  * Synthesize the $Object union.
5
5
  */
6
6
  export declare function synthesizeUberObjectUnionType(parameters: {
7
7
  objectTypes: readonly ObjectType[];
8
- }): ObjectUnionType;
8
+ }): NamedObjectUnionType;
9
9
  //# sourceMappingURL=synthesizeUberObjectUnionType.d.ts.map
@@ -1,14 +1,16 @@
1
1
  import { Maybe } from "purify-ts";
2
+ import { invariant } from "ts-invariant";
2
3
  import { BlankNodeType } from "./BlankNodeType.js";
3
4
  import { IdentifierType } from "./IdentifierType.js";
4
5
  import { IriType } from "./IriType.js";
5
- import { ObjectUnionType } from "./ObjectUnionType.js";
6
+ import { NamedObjectUnionType } from "./NamedObjectUnionType.js";
6
7
  import { syntheticNamePrefix } from "./syntheticNamePrefix.js";
7
8
  /**
8
9
  * Synthesize the $Object union.
9
10
  */
10
11
  export function synthesizeUberObjectUnionType(parameters) {
11
12
  const objectTypes = parameters.objectTypes.filter((objectType) => !objectType.extern);
13
+ invariant(objectTypes.length > 0);
12
14
  const nodeKinds = objectTypes.reduce((nodeKinds, objectType) => {
13
15
  for (const nodeKind of objectType.identifierType.nodeKinds) {
14
16
  nodeKinds.add(nodeKind);
@@ -40,9 +42,8 @@ export function synthesizeUberObjectUnionType(parameters) {
40
42
  break;
41
43
  }
42
44
  }
43
- return new ObjectUnionType({
45
+ return new NamedObjectUnionType({
44
46
  comment: Maybe.empty(),
45
- export_: true,
46
47
  features: objectTypes.reduce((features, objectType) => {
47
48
  for (const feature of objectType.features) {
48
49
  features.add(feature);
@@ -52,8 +53,12 @@ export function synthesizeUberObjectUnionType(parameters) {
52
53
  }, new Set()),
53
54
  identifierType,
54
55
  label: Maybe.empty(),
55
- memberTypes: objectTypes,
56
+ members: objectTypes.map((objectType) => ({
57
+ discriminantValue: Maybe.empty(),
58
+ type: objectType,
59
+ })),
56
60
  name: `${syntheticNamePrefix}Object`,
61
+ recursive: false,
57
62
  });
58
63
  }
59
64
  //# sourceMappingURL=synthesizeUberObjectUnionType.js.map
@@ -31,7 +31,6 @@ export declare class NodeShape extends ShaclAstNodeShape<any, Ontology, Property
31
31
  get comment(): Maybe<string>;
32
32
  get descendantNodeShapes(): Either<Error, readonly NodeShape[]>;
33
33
  get discriminantValue(): Maybe<string>;
34
- get export(): Maybe<boolean>;
35
34
  get extern(): Maybe<boolean>;
36
35
  get fromRdfType(): Maybe<NamedNode>;
37
36
  get identifierIn(): readonly NamedNode[];
@@ -55,9 +55,6 @@ export class NodeShape extends ShaclAstNodeShape {
55
55
  get discriminantValue() {
56
56
  return this.generatedNodeShape.discriminantValue;
57
57
  }
58
- get export() {
59
- return this.generatedNodeShape.export_;
60
- }
61
58
  get extern() {
62
59
  return this.generatedNodeShape.extern;
63
60
  }
@@ -1,4 +1,4 @@
1
- import { ShapesGraph as _ShapesGraph } from "@shaclmate/shacl-ast";
1
+ import { ShapesGraph as _ShapesGraph, type CurieFactory } from "@shaclmate/shacl-ast";
2
2
  import type { Either } from "purify-ts";
3
3
  import type { Resource } from "rdfjs-resource";
4
4
  import { NodeShape, Ontology, PropertyGroup, PropertyShape, type Shape } from "./index.js";
@@ -15,7 +15,8 @@ export declare namespace ShapesGraph {
15
15
  protected createPropertyGroup({ resource, }: {
16
16
  resource: Resource;
17
17
  }): Either<Error, PropertyGroup>;
18
- protected createPropertyShape({ resource, shapesGraph, }: {
18
+ protected createPropertyShape({ curieFactory, resource, shapesGraph, }: {
19
+ curieFactory: CurieFactory;
19
20
  resource: Resource;
20
21
  shapesGraph: ShapesGraph;
21
22
  }): Either<Error, PropertyShape>;
@@ -1,4 +1,4 @@
1
- import { ShapesGraph as _ShapesGraph } from "@shaclmate/shacl-ast";
1
+ import { ShapesGraph as _ShapesGraph, } from "@shaclmate/shacl-ast";
2
2
  import { owl, rdf, rdfs } from "@tpluscode/rdf-ns-builders";
3
3
  import { ancestorClassIris } from "./ancestorClassIris.js";
4
4
  import { descendantClassIris } from "./descendantClassIris.js";
@@ -8,7 +8,7 @@ export var ShapesGraph;
8
8
  (function (ShapesGraph) {
9
9
  class Factory extends _ShapesGraph.Factory {
10
10
  createNodeShape({ resource, shapesGraph, }) {
11
- return generated.NodeShape.$fromRdf(resource, {
11
+ return generated.NodeShape.$fromRdfResource(resource, {
12
12
  ignoreRdfType: true,
13
13
  preferredLanguages: this.preferredLanguages,
14
14
  }).map((generatedShape) => {
@@ -38,22 +38,27 @@ export var ShapesGraph;
38
38
  });
39
39
  }
40
40
  createOntology({ resource, }) {
41
- return generated.Ontology.$fromRdf(resource, {
41
+ return generated.Ontology.$fromRdfResource(resource, {
42
42
  ignoreRdfType: true,
43
43
  preferredLanguages: this.preferredLanguages,
44
44
  }).map((generatedOntology) => new Ontology(generatedOntology));
45
45
  }
46
46
  createPropertyGroup({ resource, }) {
47
- return generated.PropertyGroup.$fromRdf(resource, {
47
+ return generated.PropertyGroup.$fromRdfResource(resource, {
48
48
  ignoreRdfType: true,
49
49
  preferredLanguages: this.preferredLanguages,
50
50
  }).map((generatedPropertyGroup) => new PropertyGroup(generatedPropertyGroup));
51
51
  }
52
- createPropertyShape({ resource, shapesGraph, }) {
53
- return generated.PropertyShape.$fromRdf(resource, {
52
+ createPropertyShape({ curieFactory, resource, shapesGraph, }) {
53
+ return generated.PropertyShape.$fromRdfResource(resource, {
54
54
  ignoreRdfType: true,
55
55
  preferredLanguages: this.preferredLanguages,
56
- }).map((generatedShape) => new PropertyShape(generatedShape, shapesGraph));
56
+ }).map((generatedShape) => new PropertyShape({
57
+ ...generatedShape,
58
+ path: (generatedShape.path.termType === "NamedNode"
59
+ ? curieFactory.create(generatedShape.path).extract()
60
+ : undefined) ?? generatedShape.path,
61
+ }, shapesGraph));
57
62
  }
58
63
  }
59
64
  const factory = new Factory();