如果我有这样的数据
@prefix my: <http://example.com/>
my:student1 a my:Student .
my:student1 a my:FoodballPlayer .
my:teacher2 a my:Teacher .
my:teacher2 a my:BaseballPlayer .
my:teacher2 a my:RugbyPlayer .我想说的是,这些科目要么是学生,要么是教师,他们可能是零或更多的足球、棒球或橄榄球运动员,我怎么用ShEx来写呢?我知道这适用于一种类型的弧线:
my:person {
a [my:Student my:Teacher]
}发布于 2017-10-10 22:25:36
您不需要对一种类型的弧形约束执行任何不同的操作;只需添加带有my:*Player值集的另一种约束:
PREFIX my: <http://example.com/>
my:person {
a [my:Student my:Teacher];
a [my:FootballPlayer my:BaseballPlayer my:RugbyPlayer]+
}演示
https://stackoverflow.com/questions/46675985
复制相似问题