scoping of ShEx validation and FIBO questions

Dean,

After our meeting today, I thought about what could a pretty "cut and dry” deciding factor for FIBO and other users who have some ontologies with classes that they want to use. Before I could write about it, the e-mail below came. It alludes to similar expectations.

SHACL has a scoping mechanism that many users expect. In case, of FIBO, for example, users can say that a constraint applies to all instances of fibo:Contract (the namespace is probably incorrect, but you get the idea). And it also applies to all instances of its subclasses e.g., fibo:MultipartyContract, etc. With ShEx, scoping is done through a map that specifies what shape to apply on a resource by resource basis. 

Further, with SHACL users can say that a range of some relationship e.g., fibo:participant must be an instance of some class such as fibo:Party. This also includes instances of subclasses. ShEx can support this to some extent, but in a more “hard coded” way than SHACL. With ShEx users would have to use nested shapes and say that a resource in the range must have rdf:type fibo:Party. If they want to include the subclasses, they have to include each one explicitly. And if the class hierarchy changes, they have to change the shapes.

There are probably users for which neither of these two differentiators matter much as their focus is only on predicates and they do not use classes at all or in a very minimal way. But I don’t believe this is the case for FIBO. I think that in medical informatics classes are also used extensively. 

The items above are mentioned in my comparison, but, perhaps, they should be the second and third item in the comparison, right after the W3C standard vs CG effort. Because it will be up there in the deciding factors for some users and the difference is easy to understand.

Irene

> Begin forwarded message:
> 
> From: Gregg Kellogg <gregg@greggkellogg.net>
> Subject: Re: ShEx 2.0 Candidate Release
> Date: March 29, 2017 at 1:20:23 PM EDT
> To: Lukas Rosenstock <lukas@cloudobjects.io>
> Cc: W3C Semantic Web IG <semantic-web@w3.org>, public-rdf-shapes@w3.org, public-shex@w3.org
> Resent-From: public-rdf-shapes@w3.org
> 
>> On Mar 29, 2017, at 3:25 AM, Lukas Rosenstock <lukas@cloudobjects.io <mailto:lukas@cloudobjects.io>> wrote:
>> 
>> Hello!
>> ShEx looks interesting and seems to fill a gap in terms of defining constraints for RDF documents!
>> 
>> I have a quick question in terms of understanding the semantics and how they relate to existing RDF, apologies in advance if it’s a dumb question.
>> 
>> I’m basing this on the example in the Quick Start of the Primer.
>> 
>> There is inst:Student1. Where is it defined that inst:Student1 is to be validated against ex:Enrollee?
> 
> The ShEx API [1] allows two mechanisms for validating graph nodes:
> 
> * Pass in shapeMap which maps graph nodes to shapes
> * Create a start shape in the schema, and pass one or more focusNodes, which are evaluated against the start shape.
> 
> The ShapeMap is defined in section 5.2 [2] of the specification. The primer discussed a “shape map” in section 2.1 [3].
> 
> ShEx would be invoked with a shape map associating inst:Student1 with school:Enrollee.
> 
> Results are returned using a variation on the same map, with node and shape, along with the result, and a possible Reason.
> 
>> My understanding would be that it would have to be stated that inst:Student1 rdf:type ex:Enrollee.,
>> which implies that ex:Enrollee rdf:type rdfs:Class, shex:Shape. or even shex:Shape rdfs:subClassOf rdfs:Class..
> 
> No, the shape makes no assertions about type, the two IRIs are in different locations, inst:Student1 is in the graph to be checked, and school:Enrollee is the label of a shape in the schema. By mapping these together, we’re asserting that inst:Student1 has that shape, which that there be at least one and at most two statements where the graph node has the ex:hasGuardian predicate, and an object which is an IRI.
> 
>> Does that make any sense or am I going in a wrong direction with my thinking?
> 
> It can be helpful to use the “try it” button to open the example and play with variations on the schema and graph.
> 
> Hope that clarifies it.
> 
> Gregg
> 
> [1] http://shex.io/shex-semantics/index.html#the-application-programming-interface <http://shex.io/shex-semantics/index.html#the-application-programming-interface>
> [2] http://shex.io/shex-semantics/index.html#shape-map <http://shex.io/shex-semantics/index.html#shape-map>
> [3] http://shex.io/shex-primer/index.html#validation <http://shex.io/shex-primer/index.html#validation>
> 
>> Regards,
>> 
>> Lukas Rosenstock
>> 
>>> Am 28.03.2017 um 10:43 schrieb Gregg Kellogg <gregg@greggkellogg.net <mailto:gregg@greggkellogg.net>>:
>>> 
>>> he ShEx Community Group would like to invite public review of three deliverables:
>>> 
>>>  Shape Expressions (ShEx) Primer http://shex.io/shex-primer/ <http://shex.io/shex-primer/>
>>>  Shape Expressions Language 2.0 http://shex.io/shex-semantics/ <http://shex.io/shex-semantics/>
>>>  Shape Expressions Test Suite https://github.com/shexSpec/shexTest/ <https://github.com/shexSpec/shexTest/> including:
>>>  * 337 schemas in three representations:
>>>      ShExC: compact syntax
>>>      ShExJ: JSON-LD 1.0 syntax
>>>      ShExR: Turtle syntax
>>>  * 927 validation tests.
>>>  * 101 ShExC negative syntax tests
>>>  * 7 negative structure tests.
>>> 
>>> The test suite has a Implementation Report including 4 of the 5 implementations:
>>>  http://shexspec.github.io/shexTest/reports/ <http://shexspec.github.io/shexTest/reports/>
>>> 
>>> For feature requests please note the features in the 2.1 milestone:
>>>  https://github.com/shexSpec/shex/issues?q=is%3Aopen+is%3Aissue+milestone%3A2.1 <https://github.com/shexSpec/shex/issues?q=is%3Aopen+is%3Aissue+milestone%3A2.1>
>>> 
>>> Many of these have been implemented and tested but are not in this version of
>>> the specification. We invite feedback from the community on issues with the
>>> documents or tests, new feature prioritization and new feature use cases.
>>> 
>>> Comments are welcome on the ShEx Community Group mailing list (archived):
>>>  public-shex@w3.org <mailto:public-shex@w3.org>
>>> 
>>> Readers may also wish to join the ShEx Community Group:
>>>  https://www.w3.org/community/shex/join <https://www.w3.org/community/shex/join>
>>> 
>>> Sincerely,
>>>  Andra Waagmeester
>>>  Dimitris Kontokostas
>>>  Eric Prud'hommeaux
>>>  Gregg Kellogg
>>>  Harold Solbrig
>>>  Iovka Boneva
>>>  Jose Emilio Labra Gayo 
>>>  Karen Coyle
>>>  Katherine Thornton
>>>  Tom Baker
>>> 
>> 
> 

Received on Wednesday, 29 March 2017 17:49:49 UTC