SHACL规则验证不匹配类型的数据文件

发布于 2025-02-10 07:12:28 字数 708 浏览 2 评论 0 原文

我有一组SHACL规则来验证传入的数据文件。问题是,当数据文件中的记录类型与SHACL TargetClass不匹配时,将无法进行验证,而SHACL验证引擎仅报告成功。我从这个网站获得了一个解决方案,但对我不起作用。我已经在此处发布了我的SHACL规则和简单数据:

https://s.zazuko.com/b8887fz

数据类型“ DatainVentoryRecord”(右图中的数据行20)是正确的;当我更改目标类型时,例如将其更改为“ datainVentoryRecord2”,我期望有错误,但没有报告错误。

我从下面的帖子中获得了唱片的想法,该帖子由Holger Knublauch回答:

如何使用SHACL检查许多课堂实例

任何帮助都将不胜感激!

I have a set of Shacl rules to validate the incoming data files. The issue is when the type of a record in the data file mismatches with the Shacl targetClass, no validation will be done and the Shacl validation engine just reports Success. I got a solution from this website, but it does not work for me. I have posted my Shacl rules and simple data here:

https://s.zazuko.com/b887FZ

The data type "DataInventoryRecord" (data row 20 from the right panel) is correct; when I change the target type, for example changing it to "dataInventoryRecord2", I expect an error, but no error is reported.

I got the idea of recordCountShape from the following post which was answered by Holger Knublauch:

How to check for a number of class instances with SHACL

Any help will be greatly appreciated!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

好久不见√ 2025-02-17 07:12:28

形状的定义对我来说看起来不错,并且似乎也可以在(旧的)shacl Playground

The shape definitions look fine to me and also seem to work on the (old) SHACL Playground https://shacl.org/playground/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文