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.
- {shacl2code-0.0.18 → shacl2code-0.0.19}/PKG-INFO +1 -1
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/classes.go.j2 +24 -14
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/reflistproperty.go.j2 +17 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/shaclobjectset.go.j2 +63 -6
- shacl2code-0.0.19/src/shacl2code/version.py +1 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/Doxyfile +1 -1
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/Makefile +3 -3
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/test-context-validate.cpp +2 -2
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/test-context.pc +1 -1
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/Doxyfile +1 -1
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/Makefile +3 -3
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/test-validate.cpp +2 -2
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/test.pc +1 -1
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/classes.go +116 -40
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/reflistproperty.go +17 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/shaclobjectset.go +63 -6
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/classes.go +116 -40
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/reflistproperty.go +17 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/shaclobjectset.go +63 -6
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/make_expect.py +13 -8
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/test_cpp.py +5 -0
- shacl2code-0.0.18/src/shacl2code/version.py +0 -1
- {shacl2code-0.0.18 → shacl2code-0.0.19}/.flake8 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/.github/workflows/coverage-generate.yaml +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/.github/workflows/coverage-report.yaml +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/.github/workflows/publish.yaml +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/.github/workflows/test.yaml +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/.gitignore +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/LICENSE +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/README.md +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/pyproject.toml +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/__init__.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/__main__.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/context.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/__init__.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/common.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/cpp.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/golang.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/jinja.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/jsonschema.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/lang.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/python.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/sources/cpp/json.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/Doxyfile.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/Makefile.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/api.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/datetime.cpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/datetime.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/decode.cpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/decode.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/encode.cpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/encode.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/errorhandler.cpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/errorhandler.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/exceptions.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/extensible.cpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/extensible.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/header.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/jsonld-header.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/jsonld-source.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/link.cpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/link.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/namedindividual.cpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/namedindividual.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/object.cpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/object.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/objectpath.cpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/objectpath.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/objectset.cpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/objectset.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/pkgconfig.pc.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/prop.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/property.cpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/property.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/propertyvalue.cpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/propertyvalue.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/ref.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/refproperty.cpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/refproperty.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/source.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/type.cpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/type.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/util.cpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/util.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/validate.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/cpp/walk.hpp.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/decode.go.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/encode.go.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/errorhandler.go.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/errors.go.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/extensible.go.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/linkstate.go.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/listproperty.go.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/optional.go.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/path.go.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/property.go.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/ref.go.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/refproperty.go.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/shaclobject.go.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/shacltype.go.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/util.go.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/validator.go.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/jsonschema.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/python.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/main.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/model.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/urlcontext.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/testfixtures/testfixtures/__init__.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/testfixtures/testfixtures/httpserver.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/testfixtures/testfixtures/jsonvalidation.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/testfixtures/testfixtures/timetests.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/testfixtures/testfixtures/utils.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/conftest.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/abort.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/bad-id.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/bad-node-kind.ttl +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/bad-pattern-class.ttl +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/bad-pattern-integer.ttl +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/bad-prop-type.ttl +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/bad-reference.jsonld +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/context-url.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/context.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/links.json +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/missing-range.ttl +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/model/test-context.json +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/model/test.ttl +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/python/bad-object-type-inline.json +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/python/bad-object-type-ref-after.json +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/python/bad-object-type-ref-before.json +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/raw.j2 +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/data/roundtrip.json +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/api.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/datetime.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/datetime.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/decode.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/decode.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/encode.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/encode.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/errorhandler.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/errorhandler.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/exceptions.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/extensible.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/extensible.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/link.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/link.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/namedindividual.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/namedindividual.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/object.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/object.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/objectpath.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/objectpath.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/objectset.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/objectset.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/prop.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/property.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/property.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/propertyvalue.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/propertyvalue.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/ref.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/refproperty.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/refproperty.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/test-context-jsonld.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/test-context-jsonld.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/test-context.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/test-context.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/type.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/type.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/util.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/util.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/context/walk.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/api.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/datetime.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/datetime.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/decode.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/decode.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/encode.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/encode.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/errorhandler.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/errorhandler.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/exceptions.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/extensible.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/extensible.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/link.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/link.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/namedindividual.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/namedindividual.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/object.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/object.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/objectpath.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/objectpath.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/objectset.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/objectset.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/prop.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/property.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/property.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/propertyvalue.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/propertyvalue.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/ref.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/refproperty.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/refproperty.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/test-jsonld.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/test-jsonld.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/test.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/test.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/type.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/type.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/util.cpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/util.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/cpp/nocontext/walk.hpp +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/decode.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/encode.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/errorhandler.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/errors.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/extensible.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/linkstate.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/listproperty.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/optional.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/path.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/property.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/ref.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/refproperty.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/shaclobject.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/shacltype.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/util.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/validator.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/decode.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/encode.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/errorhandler.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/errors.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/extensible.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/linkstate.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/listproperty.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/optional.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/path.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/property.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/ref.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/refproperty.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/shaclobject.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/shacltype.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/util.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/nocontext/test/validator.go +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/jsonschema/context/test-context.json +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/jsonschema/nocontext/test.json +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/python/context/test-context.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/python/nocontext/test.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/raw/context/test-context.txt +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/raw/nocontext/test.txt +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/test_cli.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/test_common_jinja.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/test_common_prefix.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/test_context.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/test_golang.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/test_jsonschema.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/test_model_source.py +0 -0
- {shacl2code-0.0.18 → shacl2code-0.0.19}/tests/test_python.py +0 -0
|
@@ -148,13 +148,17 @@ type {{ interface_name(class) }} interface {
|
|
|
148
148
|
SHACLObject
|
|
149
149
|
{%- endif %}
|
|
150
150
|
{%- for prop in class.properties %}
|
|
151
|
-
{
|
|
152
|
-
|
|
153
|
-
{%-
|
|
154
|
-
|
|
155
|
-
{%-
|
|
156
|
-
|
|
157
|
-
{
|
|
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
|
-
{
|
|
264
|
-
|
|
265
|
-
{%-
|
|
266
|
-
|
|
267
|
-
{%-
|
|
268
|
-
|
|
269
|
-
{
|
|
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 {
|
{shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/reflistproperty.go.j2
RENAMED
|
@@ -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
|
+
|
{shacl2code-0.0.18 → shacl2code-0.0.19}/src/shacl2code/lang/templates/golang/shaclobjectset.go.j2
RENAMED
|
@@ -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
|
-
|
|
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
|
-
|
|
169
|
-
|
|
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(
|
|
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
|
|
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
|
|
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.
|
|
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.
|
|
26
|
-
ln -s libtest-context.so.0.0.
|
|
27
|
-
ln -s libtest-context.so.0.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.
|
|
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.
|
|
119
|
+
std::cout << "0.0.1" << std::endl;
|
|
120
120
|
return 0;
|
|
121
121
|
|
|
122
122
|
case '?':
|
|
@@ -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.
|
|
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.
|
|
26
|
-
ln -s libtest.so.0.0.
|
|
27
|
-
ln -s libtest.so.0.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.
|
|
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.
|
|
119
|
+
std::cout << "0.0.1" << std::endl;
|
|
120
120
|
return 0;
|
|
121
121
|
|
|
122
122
|
case '?':
|
|
@@ -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()
|
|
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] {
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
func (self *LinkClassObject)
|
|
1020
|
-
|
|
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] {
|
|
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()
|
|
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] {
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
func (self *TestClassObject)
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
func (self *TestClassObject)
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
func (self *TestClassObject)
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
func (self *TestClassObject)
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
func (self *TestClassObject)
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
func (self *TestClassObject)
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
func (self *TestClassObject)
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
func (self *TestClassObject)
|
|
2653
|
-
|
|
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] {
|
|
2998
|
-
|
|
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] {
|
|
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] {
|
|
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] {
|
|
3564
|
-
|
|
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 {
|
{shacl2code-0.0.18 → shacl2code-0.0.19}/tests/expect/golang/context/test-context/reflistproperty.go
RENAMED
|
@@ -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
|
+
|