shacl2code 0.0.18__tar.gz → 0.0.19__tar.gz

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 (255) hide show
  1. {shacl2code-0.0.18 → shacl2code-0.0.19}/PKG-INFO +1 -1
  2. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/classes.go.j2 +24 -14
  3. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/reflistproperty.go.j2 +17 -0
  4. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/shaclobjectset.go.j2 +63 -6
  5. shacl2code-0.0.19/src/shacl2code/version.py +1 -0
  6. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/Doxyfile +1 -1
  7. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/Makefile +3 -3
  8. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/test-context-validate.cpp +2 -2
  9. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/test-context.pc +1 -1
  10. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/Doxyfile +1 -1
  11. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/Makefile +3 -3
  12. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/test-validate.cpp +2 -2
  13. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/test.pc +1 -1
  14. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/classes.go +116 -40
  15. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/reflistproperty.go +17 -0
  16. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/shaclobjectset.go +63 -6
  17. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/classes.go +116 -40
  18. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/reflistproperty.go +17 -0
  19. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/shaclobjectset.go +63 -6
  20. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/make_expect.py +13 -8
  21. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/test_cpp.py +5 -0
  22. shacl2code-0.0.18/src/shacl2code/version.py +0 -1
  23. {shacl2code-0.0.18 → shacl2code-0.0.19}/.flake8 +0 -0
  24. {shacl2code-0.0.18 → shacl2code-0.0.19}/.github/workflows/coverage-generate.yaml +0 -0
  25. {shacl2code-0.0.18 → shacl2code-0.0.19}/.github/workflows/coverage-report.yaml +0 -0
  26. {shacl2code-0.0.18 → shacl2code-0.0.19}/.github/workflows/publish.yaml +0 -0
  27. {shacl2code-0.0.18 → shacl2code-0.0.19}/.github/workflows/test.yaml +0 -0
  28. {shacl2code-0.0.18 → shacl2code-0.0.19}/.gitignore +0 -0
  29. {shacl2code-0.0.18 → shacl2code-0.0.19}/LICENSE +0 -0
  30. {shacl2code-0.0.18 → shacl2code-0.0.19}/README.md +0 -0
  31. {shacl2code-0.0.18 → shacl2code-0.0.19}/pyproject.toml +0 -0
  32. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/__init__.py +0 -0
  33. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/__main__.py +0 -0
  34. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/context.py +0 -0
  35. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/__init__.py +0 -0
  36. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/common.py +0 -0
  37. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/cpp.py +0 -0
  38. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/golang.py +0 -0
  39. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/jinja.py +0 -0
  40. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/jsonschema.py +0 -0
  41. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/lang.py +0 -0
  42. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/python.py +0 -0
  43. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/sources/cpp/json.hpp +0 -0
  44. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/Doxyfile.j2 +0 -0
  45. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/Makefile.j2 +0 -0
  46. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/api.hpp.j2 +0 -0
  47. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/datetime.cpp.j2 +0 -0
  48. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/datetime.hpp.j2 +0 -0
  49. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/decode.cpp.j2 +0 -0
  50. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/decode.hpp.j2 +0 -0
  51. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/encode.cpp.j2 +0 -0
  52. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/encode.hpp.j2 +0 -0
  53. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/errorhandler.cpp.j2 +0 -0
  54. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/errorhandler.hpp.j2 +0 -0
  55. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/exceptions.hpp.j2 +0 -0
  56. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/extensible.cpp.j2 +0 -0
  57. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/extensible.hpp.j2 +0 -0
  58. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/header.j2 +0 -0
  59. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/jsonld-header.j2 +0 -0
  60. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/jsonld-source.j2 +0 -0
  61. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/link.cpp.j2 +0 -0
  62. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/link.hpp.j2 +0 -0
  63. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/namedindividual.cpp.j2 +0 -0
  64. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/namedindividual.hpp.j2 +0 -0
  65. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/object.cpp.j2 +0 -0
  66. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/object.hpp.j2 +0 -0
  67. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/objectpath.cpp.j2 +0 -0
  68. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/objectpath.hpp.j2 +0 -0
  69. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/objectset.cpp.j2 +0 -0
  70. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/objectset.hpp.j2 +0 -0
  71. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/pkgconfig.pc.j2 +0 -0
  72. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/prop.hpp.j2 +0 -0
  73. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/property.cpp.j2 +0 -0
  74. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/property.hpp.j2 +0 -0
  75. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/propertyvalue.cpp.j2 +0 -0
  76. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/propertyvalue.hpp.j2 +0 -0
  77. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/ref.hpp.j2 +0 -0
  78. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/refproperty.cpp.j2 +0 -0
  79. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/refproperty.hpp.j2 +0 -0
  80. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/source.j2 +0 -0
  81. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/type.cpp.j2 +0 -0
  82. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/type.hpp.j2 +0 -0
  83. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/util.cpp.j2 +0 -0
  84. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/util.hpp.j2 +0 -0
  85. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/validate.j2 +0 -0
  86. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/walk.hpp.j2 +0 -0
  87. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/decode.go.j2 +0 -0
  88. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/encode.go.j2 +0 -0
  89. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/errorhandler.go.j2 +0 -0
  90. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/errors.go.j2 +0 -0
  91. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/extensible.go.j2 +0 -0
  92. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/linkstate.go.j2 +0 -0
  93. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/listproperty.go.j2 +0 -0
  94. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/optional.go.j2 +0 -0
  95. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/path.go.j2 +0 -0
  96. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/property.go.j2 +0 -0
  97. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/ref.go.j2 +0 -0
  98. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/refproperty.go.j2 +0 -0
  99. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/shaclobject.go.j2 +0 -0
  100. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/shacltype.go.j2 +0 -0
  101. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/util.go.j2 +0 -0
  102. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/validator.go.j2 +0 -0
  103. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/jsonschema.j2 +0 -0
  104. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/python.j2 +0 -0
  105. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/main.py +0 -0
  106. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/model.py +0 -0
  107. {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/urlcontext.py +0 -0
  108. {shacl2code-0.0.18 → shacl2code-0.0.19}/testfixtures/testfixtures/__init__.py +0 -0
  109. {shacl2code-0.0.18 → shacl2code-0.0.19}/testfixtures/testfixtures/httpserver.py +0 -0
  110. {shacl2code-0.0.18 → shacl2code-0.0.19}/testfixtures/testfixtures/jsonvalidation.py +0 -0
  111. {shacl2code-0.0.18 → shacl2code-0.0.19}/testfixtures/testfixtures/timetests.py +0 -0
  112. {shacl2code-0.0.18 → shacl2code-0.0.19}/testfixtures/testfixtures/utils.py +0 -0
  113. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/conftest.py +0 -0
  114. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/abort.j2 +0 -0
  115. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/bad-id.j2 +0 -0
  116. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/bad-node-kind.ttl +0 -0
  117. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/bad-pattern-class.ttl +0 -0
  118. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/bad-pattern-integer.ttl +0 -0
  119. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/bad-prop-type.ttl +0 -0
  120. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/bad-reference.jsonld +0 -0
  121. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/context-url.j2 +0 -0
  122. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/context.j2 +0 -0
  123. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/links.json +0 -0
  124. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/missing-range.ttl +0 -0
  125. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/model/test-context.json +0 -0
  126. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/model/test.ttl +0 -0
  127. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/python/bad-object-type-inline.json +0 -0
  128. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/python/bad-object-type-ref-after.json +0 -0
  129. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/python/bad-object-type-ref-before.json +0 -0
  130. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/raw.j2 +0 -0
  131. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/roundtrip.json +0 -0
  132. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/api.hpp +0 -0
  133. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/datetime.cpp +0 -0
  134. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/datetime.hpp +0 -0
  135. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/decode.cpp +0 -0
  136. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/decode.hpp +0 -0
  137. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/encode.cpp +0 -0
  138. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/encode.hpp +0 -0
  139. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/errorhandler.cpp +0 -0
  140. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/errorhandler.hpp +0 -0
  141. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/exceptions.hpp +0 -0
  142. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/extensible.cpp +0 -0
  143. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/extensible.hpp +0 -0
  144. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/link.cpp +0 -0
  145. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/link.hpp +0 -0
  146. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/namedindividual.cpp +0 -0
  147. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/namedindividual.hpp +0 -0
  148. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/object.cpp +0 -0
  149. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/object.hpp +0 -0
  150. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/objectpath.cpp +0 -0
  151. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/objectpath.hpp +0 -0
  152. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/objectset.cpp +0 -0
  153. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/objectset.hpp +0 -0
  154. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/prop.hpp +0 -0
  155. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/property.cpp +0 -0
  156. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/property.hpp +0 -0
  157. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/propertyvalue.cpp +0 -0
  158. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/propertyvalue.hpp +0 -0
  159. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/ref.hpp +0 -0
  160. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/refproperty.cpp +0 -0
  161. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/refproperty.hpp +0 -0
  162. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/test-context-jsonld.cpp +0 -0
  163. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/test-context-jsonld.hpp +0 -0
  164. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/test-context.cpp +0 -0
  165. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/test-context.hpp +0 -0
  166. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/type.cpp +0 -0
  167. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/type.hpp +0 -0
  168. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/util.cpp +0 -0
  169. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/util.hpp +0 -0
  170. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/walk.hpp +0 -0
  171. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/api.hpp +0 -0
  172. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/datetime.cpp +0 -0
  173. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/datetime.hpp +0 -0
  174. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/decode.cpp +0 -0
  175. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/decode.hpp +0 -0
  176. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/encode.cpp +0 -0
  177. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/encode.hpp +0 -0
  178. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/errorhandler.cpp +0 -0
  179. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/errorhandler.hpp +0 -0
  180. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/exceptions.hpp +0 -0
  181. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/extensible.cpp +0 -0
  182. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/extensible.hpp +0 -0
  183. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/link.cpp +0 -0
  184. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/link.hpp +0 -0
  185. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/namedindividual.cpp +0 -0
  186. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/namedindividual.hpp +0 -0
  187. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/object.cpp +0 -0
  188. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/object.hpp +0 -0
  189. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/objectpath.cpp +0 -0
  190. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/objectpath.hpp +0 -0
  191. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/objectset.cpp +0 -0
  192. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/objectset.hpp +0 -0
  193. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/prop.hpp +0 -0
  194. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/property.cpp +0 -0
  195. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/property.hpp +0 -0
  196. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/propertyvalue.cpp +0 -0
  197. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/propertyvalue.hpp +0 -0
  198. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/ref.hpp +0 -0
  199. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/refproperty.cpp +0 -0
  200. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/refproperty.hpp +0 -0
  201. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/test-jsonld.cpp +0 -0
  202. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/test-jsonld.hpp +0 -0
  203. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/test.cpp +0 -0
  204. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/test.hpp +0 -0
  205. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/type.cpp +0 -0
  206. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/type.hpp +0 -0
  207. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/util.cpp +0 -0
  208. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/util.hpp +0 -0
  209. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/walk.hpp +0 -0
  210. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/decode.go +0 -0
  211. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/encode.go +0 -0
  212. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/errorhandler.go +0 -0
  213. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/errors.go +0 -0
  214. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/extensible.go +0 -0
  215. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/linkstate.go +0 -0
  216. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/listproperty.go +0 -0
  217. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/optional.go +0 -0
  218. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/path.go +0 -0
  219. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/property.go +0 -0
  220. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/ref.go +0 -0
  221. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/refproperty.go +0 -0
  222. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/shaclobject.go +0 -0
  223. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/shacltype.go +0 -0
  224. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/util.go +0 -0
  225. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/validator.go +0 -0
  226. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/decode.go +0 -0
  227. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/encode.go +0 -0
  228. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/errorhandler.go +0 -0
  229. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/errors.go +0 -0
  230. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/extensible.go +0 -0
  231. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/linkstate.go +0 -0
  232. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/listproperty.go +0 -0
  233. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/optional.go +0 -0
  234. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/path.go +0 -0
  235. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/property.go +0 -0
  236. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/ref.go +0 -0
  237. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/refproperty.go +0 -0
  238. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/shaclobject.go +0 -0
  239. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/shacltype.go +0 -0
  240. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/util.go +0 -0
  241. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/validator.go +0 -0
  242. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/jsonschema/context/test-context.json +0 -0
  243. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/jsonschema/nocontext/test.json +0 -0
  244. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/python/context/test-context.py +0 -0
  245. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/python/nocontext/test.py +0 -0
  246. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/raw/context/test-context.txt +0 -0
  247. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/raw/nocontext/test.txt +0 -0
  248. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/test_cli.py +0 -0
  249. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/test_common_jinja.py +0 -0
  250. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/test_common_prefix.py +0 -0
  251. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/test_context.py +0 -0
  252. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/test_golang.py +0 -0
  253. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/test_jsonschema.py +0 -0
  254. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/test_model_source.py +0 -0
  255. {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/test_python.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shacl2code
3
- Version: 0.0.18
3
+ Version: 0.0.19
4
4
  Summary: Convert SHACL model file to code bindings
5
5
  Project-URL: Homepage, https://github.com/JPEWdev/shacl2code
6
6
  Project-URL: Repository, https://github.com/JPEWdev/shacl2code.git
@@ -148,13 +148,17 @@ type {{ interface_name(class) }} interface {
148
148
  SHACLObject
149
149
  {%- endif %}
150
150
  {%- for prop in class.properties %}
151
- {%- if prop_is_list(prop) %}
152
- {{ varname(prop.varname) }}() ListPropertyInterface[{{ prop_go_type(prop, classes) }}]
153
- {%- elif not prop.enum_values and prop.class_id %}
154
- {{ varname(prop.varname) }}() RefPropertyInterface[{{ interface_name(classes.get(prop.class_id)) }}]
155
- {%- else %}
156
- {{ varname(prop.varname) }}() PropertyInterface[{{ prop_go_type(prop, classes) }}]
157
- {%- endif %}
151
+ {{ varname(prop.varname) }}() {% if not prop.enum_values and prop.class_id -%}
152
+ Ref
153
+ {%- endif %}{% if prop_is_list(prop) -%}
154
+ List
155
+ {%- endif %}PropertyInterface[
156
+ {%- if not prop.enum_values and prop.class_id -%}
157
+ {{ interface_name(classes.get(prop.class_id)) }}
158
+ {%- else -%}
159
+ {{ prop_go_type(prop, classes) }}
160
+ {%- endif -%}
161
+ ]
158
162
  {%- endfor %}
159
163
  }
160
164
 
@@ -260,13 +264,19 @@ func (self *{{ struct_name(class) }}) Link(state *LinkState) error {
260
264
  }
261
265
 
262
266
  {% for prop in class.properties %}
263
- {%- if prop_is_list(prop) %}
264
- func (self *{{ struct_name(class) }}) {{ varname(prop.varname) }}() ListPropertyInterface[{{ prop_go_type(prop, classes) }}] { return &self.{{ prop_name(prop) }} }
265
- {%- elif not prop.enum_values and prop.class_id %}
266
- func (self *{{ struct_name(class) }}) {{ varname(prop.varname) }}() RefPropertyInterface[{{ interface_name(classes.get(prop.class_id)) }}] { return &self.{{ prop_name(prop) }} }
267
- {%- else %}
268
- func (self *{{ struct_name(class) }}) {{ varname(prop.varname) }}() PropertyInterface[{{ prop_go_type(prop, classes) }}] { return &self.{{ prop_name(prop) }} }
269
- {%- endif %}
267
+ func (self *{{ struct_name(class) }}) {{ varname(prop.varname) }}() {% if not prop.enum_values and prop.class_id -%}
268
+ Ref
269
+ {%- endif %}{% if prop_is_list(prop) -%}
270
+ List
271
+ {%- endif %}PropertyInterface[
272
+ {%- if not prop.enum_values and prop.class_id -%}
273
+ {{ interface_name(classes.get(prop.class_id)) }}
274
+ {%- else -%}
275
+ {{ prop_go_type(prop, classes) }}
276
+ {%- endif -%}
277
+ ] {
278
+ return &self.{{ prop_name(prop) }}
279
+ }
270
280
  {%- endfor %}
271
281
 
272
282
  func (self *{{ struct_name(class) }}) EncodeProperties(data map[string]interface{}, path Path, state *EncodeState) error {
@@ -8,6 +8,12 @@ vim: ft=go
8
8
 
9
9
  package {{ package }}
10
10
 
11
+ type RefListPropertyInterface[T SHACLObject] interface {
12
+ ListPropertyInterface[Ref[T]]
13
+ AppendObj(obj T) error
14
+ AppendIRI(iri string) error
15
+ }
16
+
11
17
  type RefListProperty[T SHACLObject] struct {
12
18
  ListProperty[Ref[T]]
13
19
  }
@@ -43,3 +49,14 @@ func (self *RefListProperty[T]) Link(state *LinkState) error {
43
49
  return nil
44
50
  }
45
51
 
52
+ func (self *RefListProperty[T]) AppendObj(obj T) error {
53
+ // Shorthand to append an object by making a reference to it
54
+ return self.Append(MakeObjectRef(obj))
55
+ }
56
+
57
+ func (self *RefListProperty[T]) AppendIRI(iri string) error {
58
+ // Shorthand to append an IRI by making a reference to it
59
+ return self.Append(MakeIRIRef[T](iri))
60
+ }
61
+
62
+
@@ -11,6 +11,7 @@ package {{ package }}
11
11
  import (
12
12
  "encoding/json"
13
13
  "fmt"
14
+ "sort"
14
15
  )
15
16
 
16
17
  type SHACLObjectSet interface {
@@ -29,6 +30,46 @@ type SHACLObjectSetObject struct {
29
30
  missingIDs map[string]bool
30
31
  }
31
32
 
33
+
34
+ type shaclObjectList struct {
35
+ v []SHACLObject
36
+ idx map[SHACLObject]int
37
+ }
38
+
39
+ func makeshaclObjectList(lst []SHACLObject) shaclObjectList {
40
+ idx := make(map[SHACLObject]int)
41
+ for i, o := range lst {
42
+ idx[o] = i
43
+ }
44
+
45
+ return shaclObjectList{lst, idx}
46
+ }
47
+
48
+ func (v shaclObjectList) Len() int {
49
+ return len(v.v)
50
+ }
51
+
52
+ func (v shaclObjectList) Swap(i, j int) {
53
+ v.v[i], v.v[j] = v.v[j], v.v[i]
54
+ }
55
+
56
+ func (v shaclObjectList) Less(i, j int) bool {
57
+ if v.v[i].ID().IsSet() {
58
+ if v.v[j].ID().IsSet() {
59
+ return v.v[i].ID().Get() < v.v[j].ID().Get()
60
+ } else {
61
+ return false;
62
+ }
63
+ } else {
64
+ if v.v[j].ID().IsSet() {
65
+ return true
66
+ } else {
67
+ // Neither has an ID. Preserve original insertion order
68
+ return v.idx[v.v[i]] < v.idx[v.v[j]]
69
+ }
70
+ }
71
+ }
72
+
32
73
  func (self *SHACLObjectSetObject) Objects(yield func(SHACLObject) bool) {
33
74
  for _, o := range self.objects {
34
75
  if !yield(o) {
@@ -129,6 +170,7 @@ func (self *SHACLObjectSetObject) Encode(encoder *json.Encoder) error {
129
170
  }
130
171
 
131
172
  ref_counts := make(map[SHACLObject]int)
173
+ top_objects := make(map[SHACLObject]bool)
132
174
 
133
175
  // Count references
134
176
  self.Walk(func (path Path, v any) {
@@ -151,6 +193,7 @@ func (self *SHACLObjectSetObject) Encode(encoder *json.Encoder) error {
151
193
  ref_counts[o] = ref_counts[o] + 1
152
194
  })
153
195
 
196
+ // Assign blank nodes to objects that have more than one reference
154
197
  blank_count := 0
155
198
  for o, count := range ref_counts {
156
199
  if count <= 1 {
@@ -161,27 +204,41 @@ func (self *SHACLObjectSetObject) Encode(encoder *json.Encoder) error {
161
204
  continue
162
205
  }
163
206
 
164
- o.ID().Set(fmt.Sprintf("_:%d", blank_count))
207
+
208
+ o.ID().Set(fmt.Sprintf("_:%s%d", o.GetType().GetCompactTypeIRI().GetDefault(""), blank_count))
165
209
  blank_count += 1
210
+ top_objects[o] = true
166
211
  }
167
212
 
168
- if len(self.objects) == 1 {
169
- err := self.objects[0].EncodeProperties(data, path, &state)
213
+ for _, o := range self.objects {
214
+ top_objects[o] = true
215
+ }
216
+
217
+ // Convert to a list and sort
218
+ top_list := []SHACLObject{}
219
+ for o, _ := range top_objects {
220
+ top_list = append(top_list, o)
221
+ }
222
+
223
+ sort.Sort(makeshaclObjectList(top_list))
224
+
225
+ if len(top_list) == 1 {
226
+ err := top_list[0].EncodeProperties(data, path, &state)
170
227
  if err != nil {
171
228
  return err
172
229
  }
173
- } else if len(self.objects) > 1 {
230
+ } else if len(top_objects) > 1 {
174
231
  // All objects directly added to the object set should be written as
175
232
  // top level objects, so mark then as written until they are ready to
176
233
  // be serialized, which will force them to be referenced by IRI until
177
234
  // we are ready
178
- for _, o := range self.objects {
235
+ for _, o := range top_list {
179
236
  state.Written[o] = true
180
237
  }
181
238
 
182
239
  graph_path := path.PushPath("@graph")
183
240
  lst := []interface{}{}
184
- for idx, o := range self.objects {
241
+ for idx, o := range top_list {
185
242
  // Remove this object from the written set now so it gets serialized
186
243
  delete(state.Written, o)
187
244
 
@@ -0,0 +1 @@
1
+ VERSION = "0.0.19"
@@ -38,7 +38,7 @@ PROJECT_NAME = "test-context"
38
38
  # could be handy for archiving the generated documentation or if some version
39
39
  # control system is used.
40
40
 
41
- PROJECT_NUMBER = "0.0.18"
41
+ PROJECT_NUMBER = "0.0.1"
42
42
 
43
43
  # Using the PROJECT_BRIEF tag one can provide an optional one line description
44
44
  # for a project that appears at the top of each page and should give viewer a
@@ -22,9 +22,9 @@ clean:
22
22
  install: libtest-context.so libtest-context.a docs
23
23
  # Library
24
24
  $(INSTALL) -d $(DESTDIR)/$(PREFIX)/lib
25
- $(INSTALL) -m 0755 libtest-context.so $(DESTDIR)/$(PREFIX)/lib/libtest-context.so.0.0.18
26
- ln -s libtest-context.so.0.0.18 $(DESTDIR)/$(PREFIX)/lib/libtest-context.so
27
- ln -s libtest-context.so.0.0.18 $(DESTDIR)/$(PREFIX)/lib/libtest-context.so.0
25
+ $(INSTALL) -m 0755 libtest-context.so $(DESTDIR)/$(PREFIX)/lib/libtest-context.so.0.0.1
26
+ ln -s libtest-context.so.0.0.1 $(DESTDIR)/$(PREFIX)/lib/libtest-context.so
27
+ ln -s libtest-context.so.0.0.1 $(DESTDIR)/$(PREFIX)/lib/libtest-context.so.0
28
28
 
29
29
  $(INSTALL) -m 0644 libtest-context.a $(DESTDIR)/$(PREFIX)/lib/
30
30
 
@@ -106,7 +106,7 @@ int main(int argc, char* argv[]) {
106
106
  switch (opt) {
107
107
  case 'h':
108
108
  std::cout << "Validate test-context" << std::endl
109
- << "Version 0.0.18" << std::endl
109
+ << "Version 0.0.1" << std::endl
110
110
  << std::endl;
111
111
  showHelp(argv[0]);
112
112
  return 0;
@@ -116,7 +116,7 @@ int main(int argc, char* argv[]) {
116
116
  break;
117
117
 
118
118
  case 'V':
119
- std::cout << "0.0.18" << std::endl;
119
+ std::cout << "0.0.1" << std::endl;
120
120
  return 0;
121
121
 
122
122
  case '?':
@@ -5,6 +5,6 @@ libdir=${exec_prefix}/lib
5
5
 
6
6
  Name: test-context
7
7
  Description: shacl2code generated binding test-context
8
- Version: 0.0.18
8
+ Version: 0.0.1
9
9
  Cflags: -I${includedir} -DSHACL2CODE_TEST_CONTEXT_DLL
10
10
  Libs: -L${libdir} -ltest-context
@@ -38,7 +38,7 @@ PROJECT_NAME = "test"
38
38
  # could be handy for archiving the generated documentation or if some version
39
39
  # control system is used.
40
40
 
41
- PROJECT_NUMBER = "0.0.18"
41
+ PROJECT_NUMBER = "0.0.1"
42
42
 
43
43
  # Using the PROJECT_BRIEF tag one can provide an optional one line description
44
44
  # for a project that appears at the top of each page and should give viewer a
@@ -22,9 +22,9 @@ clean:
22
22
  install: libtest.so libtest.a docs
23
23
  # Library
24
24
  $(INSTALL) -d $(DESTDIR)/$(PREFIX)/lib
25
- $(INSTALL) -m 0755 libtest.so $(DESTDIR)/$(PREFIX)/lib/libtest.so.0.0.18
26
- ln -s libtest.so.0.0.18 $(DESTDIR)/$(PREFIX)/lib/libtest.so
27
- ln -s libtest.so.0.0.18 $(DESTDIR)/$(PREFIX)/lib/libtest.so.0
25
+ $(INSTALL) -m 0755 libtest.so $(DESTDIR)/$(PREFIX)/lib/libtest.so.0.0.1
26
+ ln -s libtest.so.0.0.1 $(DESTDIR)/$(PREFIX)/lib/libtest.so
27
+ ln -s libtest.so.0.0.1 $(DESTDIR)/$(PREFIX)/lib/libtest.so.0
28
28
 
29
29
  $(INSTALL) -m 0644 libtest.a $(DESTDIR)/$(PREFIX)/lib/
30
30
 
@@ -106,7 +106,7 @@ int main(int argc, char* argv[]) {
106
106
  switch (opt) {
107
107
  case 'h':
108
108
  std::cout << "Validate test" << std::endl
109
- << "Version 0.0.18" << std::endl
109
+ << "Version 0.0.1" << std::endl
110
110
  << std::endl;
111
111
  showHelp(argv[0]);
112
112
  return 0;
@@ -116,7 +116,7 @@ int main(int argc, char* argv[]) {
116
116
  break;
117
117
 
118
118
  case 'V':
119
- std::cout << "0.0.18" << std::endl;
119
+ std::cout << "0.0.1" << std::endl;
120
120
  return 0;
121
121
 
122
122
  case '?':
@@ -5,6 +5,6 @@ libdir=${exec_prefix}/lib
5
5
 
6
6
  Name: test
7
7
  Description: shacl2code generated binding test
8
- Version: 0.0.18
8
+ Version: 0.0.1
9
9
  Cflags: -I${includedir} -DSHACL2CODE_TEST_DLL
10
10
  Libs: -L${libdir} -ltest
@@ -927,7 +927,7 @@ func ConstructLinkClassObject(o *LinkClassObject, typ SHACLType) *LinkClassObjec
927
927
  type LinkClass interface {
928
928
  SHACLObject
929
929
  LinkClassExtensible() RefPropertyInterface[ExtensibleClass]
930
- LinkClassLinkListProp() ListPropertyInterface[Ref[LinkClass]]
930
+ LinkClassLinkListProp() RefListPropertyInterface[LinkClass]
931
931
  LinkClassLinkProp() RefPropertyInterface[LinkClass]
932
932
  LinkClassLinkPropNoClass() RefPropertyInterface[LinkClass]
933
933
  LinkClassTag() PropertyInterface[string]
@@ -1013,11 +1013,21 @@ func (self *LinkClassObject) Link(state *LinkState) error {
1013
1013
  }
1014
1014
 
1015
1015
 
1016
- func (self *LinkClassObject) LinkClassExtensible() RefPropertyInterface[ExtensibleClass] { return &self.linkClassExtensible }
1017
- func (self *LinkClassObject) LinkClassLinkListProp() ListPropertyInterface[Ref[LinkClass]] { return &self.linkClassLinkListProp }
1018
- func (self *LinkClassObject) LinkClassLinkProp() RefPropertyInterface[LinkClass] { return &self.linkClassLinkProp }
1019
- func (self *LinkClassObject) LinkClassLinkPropNoClass() RefPropertyInterface[LinkClass] { return &self.linkClassLinkPropNoClass }
1020
- func (self *LinkClassObject) LinkClassTag() PropertyInterface[string] { return &self.linkClassTag }
1016
+ func (self *LinkClassObject) LinkClassExtensible() RefPropertyInterface[ExtensibleClass] {
1017
+ return &self.linkClassExtensible
1018
+ }
1019
+ func (self *LinkClassObject) LinkClassLinkListProp() RefListPropertyInterface[LinkClass] {
1020
+ return &self.linkClassLinkListProp
1021
+ }
1022
+ func (self *LinkClassObject) LinkClassLinkProp() RefPropertyInterface[LinkClass] {
1023
+ return &self.linkClassLinkProp
1024
+ }
1025
+ func (self *LinkClassObject) LinkClassLinkPropNoClass() RefPropertyInterface[LinkClass] {
1026
+ return &self.linkClassLinkPropNoClass
1027
+ }
1028
+ func (self *LinkClassObject) LinkClassTag() PropertyInterface[string] {
1029
+ return &self.linkClassTag
1030
+ }
1021
1031
 
1022
1032
  func (self *LinkClassObject) EncodeProperties(data map[string]interface{}, path Path, state *EncodeState) error {
1023
1033
  if err := self.SHACLObjectBase.EncodeProperties(data, path, state); err != nil {
@@ -1655,7 +1665,9 @@ func (self *RequiredAbstractObject) Link(state *LinkState) error {
1655
1665
  }
1656
1666
 
1657
1667
 
1658
- func (self *RequiredAbstractObject) RequiredAbstractAbstractClassProp() RefPropertyInterface[AbstractClass] { return &self.requiredAbstractAbstractClassProp }
1668
+ func (self *RequiredAbstractObject) RequiredAbstractAbstractClassProp() RefPropertyInterface[AbstractClass] {
1669
+ return &self.requiredAbstractAbstractClassProp
1670
+ }
1659
1671
 
1660
1672
  func (self *RequiredAbstractObject) EncodeProperties(data map[string]interface{}, path Path, state *EncodeState) error {
1661
1673
  if err := self.SHACLObjectBase.EncodeProperties(data, path, state); err != nil {
@@ -2311,7 +2323,7 @@ type TestClass interface {
2311
2323
  Import() PropertyInterface[string]
2312
2324
  TestClassAnyuriProp() PropertyInterface[string]
2313
2325
  TestClassBooleanProp() PropertyInterface[bool]
2314
- TestClassClassListProp() ListPropertyInterface[Ref[TestClass]]
2326
+ TestClassClassListProp() RefListPropertyInterface[TestClass]
2315
2327
  TestClassClassProp() RefPropertyInterface[TestClass]
2316
2328
  TestClassClassPropNoClass() RefPropertyInterface[TestClass]
2317
2329
  TestClassDatetimeListProp() ListPropertyInterface[time.Time]
@@ -2625,32 +2637,84 @@ func (self *TestClassObject) Link(state *LinkState) error {
2625
2637
  }
2626
2638
 
2627
2639
 
2628
- func (self *TestClassObject) Encode() PropertyInterface[string] { return &self.encode }
2629
- func (self *TestClassObject) Import() PropertyInterface[string] { return &self.import_ }
2630
- func (self *TestClassObject) TestClassAnyuriProp() PropertyInterface[string] { return &self.testClassAnyuriProp }
2631
- func (self *TestClassObject) TestClassBooleanProp() PropertyInterface[bool] { return &self.testClassBooleanProp }
2632
- func (self *TestClassObject) TestClassClassListProp() ListPropertyInterface[Ref[TestClass]] { return &self.testClassClassListProp }
2633
- func (self *TestClassObject) TestClassClassProp() RefPropertyInterface[TestClass] { return &self.testClassClassProp }
2634
- func (self *TestClassObject) TestClassClassPropNoClass() RefPropertyInterface[TestClass] { return &self.testClassClassPropNoClass }
2635
- func (self *TestClassObject) TestClassDatetimeListProp() ListPropertyInterface[time.Time] { return &self.testClassDatetimeListProp }
2636
- func (self *TestClassObject) TestClassDatetimeScalarProp() PropertyInterface[time.Time] { return &self.testClassDatetimeScalarProp }
2637
- func (self *TestClassObject) TestClassDatetimestampScalarProp() PropertyInterface[time.Time] { return &self.testClassDatetimestampScalarProp }
2638
- func (self *TestClassObject) TestClassEnumListProp() ListPropertyInterface[string] { return &self.testClassEnumListProp }
2639
- func (self *TestClassObject) TestClassEnumProp() PropertyInterface[string] { return &self.testClassEnumProp }
2640
- func (self *TestClassObject) TestClassEnumPropNoClass() PropertyInterface[string] { return &self.testClassEnumPropNoClass }
2641
- func (self *TestClassObject) TestClassFloatProp() PropertyInterface[float64] { return &self.testClassFloatProp }
2642
- func (self *TestClassObject) TestClassIntegerProp() PropertyInterface[int] { return &self.testClassIntegerProp }
2643
- func (self *TestClassObject) NamedProperty() PropertyInterface[string] { return &self.namedProperty }
2644
- func (self *TestClassObject) TestClassNonShape() RefPropertyInterface[NonShapeClass] { return &self.testClassNonShape }
2645
- func (self *TestClassObject) TestClassNonnegativeIntegerProp() PropertyInterface[int] { return &self.testClassNonnegativeIntegerProp }
2646
- func (self *TestClassObject) TestClassPositiveIntegerProp() PropertyInterface[int] { return &self.testClassPositiveIntegerProp }
2647
- func (self *TestClassObject) TestClassRegex() PropertyInterface[string] { return &self.testClassRegex }
2648
- func (self *TestClassObject) TestClassRegexDatetime() PropertyInterface[time.Time] { return &self.testClassRegexDatetime }
2649
- func (self *TestClassObject) TestClassRegexDatetimestamp() PropertyInterface[time.Time] { return &self.testClassRegexDatetimestamp }
2650
- func (self *TestClassObject) TestClassRegexList() ListPropertyInterface[string] { return &self.testClassRegexList }
2651
- func (self *TestClassObject) TestClassStringListNoDatatype() ListPropertyInterface[string] { return &self.testClassStringListNoDatatype }
2652
- func (self *TestClassObject) TestClassStringListProp() ListPropertyInterface[string] { return &self.testClassStringListProp }
2653
- func (self *TestClassObject) TestClassStringScalarProp() PropertyInterface[string] { return &self.testClassStringScalarProp }
2640
+ func (self *TestClassObject) Encode() PropertyInterface[string] {
2641
+ return &self.encode
2642
+ }
2643
+ func (self *TestClassObject) Import() PropertyInterface[string] {
2644
+ return &self.import_
2645
+ }
2646
+ func (self *TestClassObject) TestClassAnyuriProp() PropertyInterface[string] {
2647
+ return &self.testClassAnyuriProp
2648
+ }
2649
+ func (self *TestClassObject) TestClassBooleanProp() PropertyInterface[bool] {
2650
+ return &self.testClassBooleanProp
2651
+ }
2652
+ func (self *TestClassObject) TestClassClassListProp() RefListPropertyInterface[TestClass] {
2653
+ return &self.testClassClassListProp
2654
+ }
2655
+ func (self *TestClassObject) TestClassClassProp() RefPropertyInterface[TestClass] {
2656
+ return &self.testClassClassProp
2657
+ }
2658
+ func (self *TestClassObject) TestClassClassPropNoClass() RefPropertyInterface[TestClass] {
2659
+ return &self.testClassClassPropNoClass
2660
+ }
2661
+ func (self *TestClassObject) TestClassDatetimeListProp() ListPropertyInterface[time.Time] {
2662
+ return &self.testClassDatetimeListProp
2663
+ }
2664
+ func (self *TestClassObject) TestClassDatetimeScalarProp() PropertyInterface[time.Time] {
2665
+ return &self.testClassDatetimeScalarProp
2666
+ }
2667
+ func (self *TestClassObject) TestClassDatetimestampScalarProp() PropertyInterface[time.Time] {
2668
+ return &self.testClassDatetimestampScalarProp
2669
+ }
2670
+ func (self *TestClassObject) TestClassEnumListProp() ListPropertyInterface[string] {
2671
+ return &self.testClassEnumListProp
2672
+ }
2673
+ func (self *TestClassObject) TestClassEnumProp() PropertyInterface[string] {
2674
+ return &self.testClassEnumProp
2675
+ }
2676
+ func (self *TestClassObject) TestClassEnumPropNoClass() PropertyInterface[string] {
2677
+ return &self.testClassEnumPropNoClass
2678
+ }
2679
+ func (self *TestClassObject) TestClassFloatProp() PropertyInterface[float64] {
2680
+ return &self.testClassFloatProp
2681
+ }
2682
+ func (self *TestClassObject) TestClassIntegerProp() PropertyInterface[int] {
2683
+ return &self.testClassIntegerProp
2684
+ }
2685
+ func (self *TestClassObject) NamedProperty() PropertyInterface[string] {
2686
+ return &self.namedProperty
2687
+ }
2688
+ func (self *TestClassObject) TestClassNonShape() RefPropertyInterface[NonShapeClass] {
2689
+ return &self.testClassNonShape
2690
+ }
2691
+ func (self *TestClassObject) TestClassNonnegativeIntegerProp() PropertyInterface[int] {
2692
+ return &self.testClassNonnegativeIntegerProp
2693
+ }
2694
+ func (self *TestClassObject) TestClassPositiveIntegerProp() PropertyInterface[int] {
2695
+ return &self.testClassPositiveIntegerProp
2696
+ }
2697
+ func (self *TestClassObject) TestClassRegex() PropertyInterface[string] {
2698
+ return &self.testClassRegex
2699
+ }
2700
+ func (self *TestClassObject) TestClassRegexDatetime() PropertyInterface[time.Time] {
2701
+ return &self.testClassRegexDatetime
2702
+ }
2703
+ func (self *TestClassObject) TestClassRegexDatetimestamp() PropertyInterface[time.Time] {
2704
+ return &self.testClassRegexDatetimestamp
2705
+ }
2706
+ func (self *TestClassObject) TestClassRegexList() ListPropertyInterface[string] {
2707
+ return &self.testClassRegexList
2708
+ }
2709
+ func (self *TestClassObject) TestClassStringListNoDatatype() ListPropertyInterface[string] {
2710
+ return &self.testClassStringListNoDatatype
2711
+ }
2712
+ func (self *TestClassObject) TestClassStringListProp() ListPropertyInterface[string] {
2713
+ return &self.testClassStringListProp
2714
+ }
2715
+ func (self *TestClassObject) TestClassStringScalarProp() PropertyInterface[string] {
2716
+ return &self.testClassStringScalarProp
2717
+ }
2654
2718
 
2655
2719
  func (self *TestClassObject) EncodeProperties(data map[string]interface{}, path Path, state *EncodeState) error {
2656
2720
  if err := self.ParentClassObject.EncodeProperties(data, path, state); err != nil {
@@ -2994,8 +3058,12 @@ func (self *TestClassRequiredObject) Link(state *LinkState) error {
2994
3058
  }
2995
3059
 
2996
3060
 
2997
- func (self *TestClassRequiredObject) TestClassRequiredStringListProp() ListPropertyInterface[string] { return &self.testClassRequiredStringListProp }
2998
- func (self *TestClassRequiredObject) TestClassRequiredStringScalarProp() PropertyInterface[string] { return &self.testClassRequiredStringScalarProp }
3061
+ func (self *TestClassRequiredObject) TestClassRequiredStringListProp() ListPropertyInterface[string] {
3062
+ return &self.testClassRequiredStringListProp
3063
+ }
3064
+ func (self *TestClassRequiredObject) TestClassRequiredStringScalarProp() PropertyInterface[string] {
3065
+ return &self.testClassRequiredStringScalarProp
3066
+ }
2999
3067
 
3000
3068
  func (self *TestClassRequiredObject) EncodeProperties(data map[string]interface{}, path Path, state *EncodeState) error {
3001
3069
  if err := self.TestClassObject.EncodeProperties(data, path, state); err != nil {
@@ -3120,7 +3188,9 @@ func (self *TestDerivedClassObject) Link(state *LinkState) error {
3120
3188
  }
3121
3189
 
3122
3190
 
3123
- func (self *TestDerivedClassObject) TestDerivedClassStringProp() PropertyInterface[string] { return &self.testDerivedClassStringProp }
3191
+ func (self *TestDerivedClassObject) TestDerivedClassStringProp() PropertyInterface[string] {
3192
+ return &self.testDerivedClassStringProp
3193
+ }
3124
3194
 
3125
3195
  func (self *TestDerivedClassObject) EncodeProperties(data map[string]interface{}, path Path, state *EncodeState) error {
3126
3196
  if err := self.TestClassObject.EncodeProperties(data, path, state); err != nil {
@@ -3244,7 +3314,9 @@ func (self *UsesExtensibleAbstractClassObject) Link(state *LinkState) error {
3244
3314
  }
3245
3315
 
3246
3316
 
3247
- func (self *UsesExtensibleAbstractClassObject) UsesExtensibleAbstractClassProp() RefPropertyInterface[ExtensibleAbstractClass] { return &self.usesExtensibleAbstractClassProp }
3317
+ func (self *UsesExtensibleAbstractClassObject) UsesExtensibleAbstractClassProp() RefPropertyInterface[ExtensibleAbstractClass] {
3318
+ return &self.usesExtensibleAbstractClassProp
3319
+ }
3248
3320
 
3249
3321
  func (self *UsesExtensibleAbstractClassObject) EncodeProperties(data map[string]interface{}, path Path, state *EncodeState) error {
3250
3322
  if err := self.SHACLObjectBase.EncodeProperties(data, path, state); err != nil {
@@ -3560,8 +3632,12 @@ func (self *ExtensibleClassObject) Link(state *LinkState) error {
3560
3632
  }
3561
3633
 
3562
3634
 
3563
- func (self *ExtensibleClassObject) ExtensibleClassProperty() PropertyInterface[string] { return &self.extensibleClassProperty }
3564
- func (self *ExtensibleClassObject) ExtensibleClassRequired() PropertyInterface[string] { return &self.extensibleClassRequired }
3635
+ func (self *ExtensibleClassObject) ExtensibleClassProperty() PropertyInterface[string] {
3636
+ return &self.extensibleClassProperty
3637
+ }
3638
+ func (self *ExtensibleClassObject) ExtensibleClassRequired() PropertyInterface[string] {
3639
+ return &self.extensibleClassRequired
3640
+ }
3565
3641
 
3566
3642
  func (self *ExtensibleClassObject) EncodeProperties(data map[string]interface{}, path Path, state *EncodeState) error {
3567
3643
  if err := self.LinkClassObject.EncodeProperties(data, path, state); err != nil {
@@ -6,6 +6,12 @@
6
6
 
7
7
  package model
8
8
 
9
+ type RefListPropertyInterface[T SHACLObject] interface {
10
+ ListPropertyInterface[Ref[T]]
11
+ AppendObj(obj T) error
12
+ AppendIRI(iri string) error
13
+ }
14
+
9
15
  type RefListProperty[T SHACLObject] struct {
10
16
  ListProperty[Ref[T]]
11
17
  }
@@ -40,3 +46,14 @@ func (self *RefListProperty[T]) Link(state *LinkState) error {
40
46
  }
41
47
  return nil
42
48
  }
49
+
50
+ func (self *RefListProperty[T]) AppendObj(obj T) error {
51
+ // Shorthand to append an object by making a reference to it
52
+ return self.Append(MakeObjectRef(obj))
53
+ }
54
+
55
+ func (self *RefListProperty[T]) AppendIRI(iri string) error {
56
+ // Shorthand to append an IRI by making a reference to it
57
+ return self.Append(MakeIRIRef[T](iri))
58
+ }
59
+