shexSpec / shexTest

ShEx test suite
https://shexspec.github.io/shexTest/
Other
3 stars 4 forks source link

sh:ShapeMap doesn't permit one node with two shapes #19

Open ericprud opened 7 years ago

ericprud commented 7 years ago
{
  "http://example/issue1": "http://schema.example/IssueShape",
  "http://example/issue2": "http://schema.example/IssueShape",
  "http://example/issue3": "http://schema.example/IssueShape"
}

doesn't permit one to ask e.g. is issue1 a IssueShape and a PersonShape.

gkellogg commented 7 years ago

I believe that the value can be an array of URIs, specifically to address this use case.

gkellogg commented 7 years ago

A ShapeMap is a mapping from node to a set of shapes (Node1: [Shape2, Shape3, …]) where node is an RDF node, and Shapen is a shape label from a schema.

ericprud commented 7 years ago

Should the sh:ShapeMap instead look like:?

{
  "http://example/issue1": ["http://schema.example/IssueShape"],
  "http://example/issue2": ["http://schema.example/IssueShape"],
  "http://example/issue3": ["http://schema.example/IssueShape"]
}
gkellogg commented 7 years ago

I guess I'd see either a URI or an array of URIs, but if we needed to choose, an array of URIs. My implementation will always lift a single URI to an array form in any case.