如何在 ShEx 中声明多个类型约束?

How do state multiple type constraints in ShEx?

如果我有这样的数据

@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]
}

与一种类型的弧约束相比,您不需要做任何不同的事情;只需添加另一个 my:*Player 值集:

PREFIX my: <http://example.com/>
my:person {
  a [my:Student my:Teacher];
  a [my:FootballPlayer my:BaseballPlayer my:RugbyPlayer]+
}

demo