W3C home > Mailing lists > Public > public-rdf-shapes@w3.org > June 2017

Choice between patterns

From: Peter Bruhn Andersen <bruhn.andersen@webspeed.dk>
Date: Sat, 17 Jun 2017 20:00:19 +0200
To: public-rdf-shapes@w3.org
Message-ID: <c51f71cd-81cd-fccc-6b03-17be3a01e41e@webspeed.dk>
As I understand it we can use (at least) two patterns to define a shape 
for a class. Using the examples in the specification we can declare a 
shape for the class ex:Person either by directly declaring ex:Person as 
type sh:NodeShape

ex:Person

*a *rdfs:Class, sh:NodeShape .

or we can declare a nodeshape class that use sh:targetClass with 
ex:Person as object

ex:PersonShape

a sh:NodeShape ;

sh:targetClass ex:Person ;

What would be the implication of each of these two patterns?

Are there any pro and cons to the two?

In which situations should I choose the first instead of the latter?

Regards,

Peter
Received on Saturday, 17 June 2017 18:00:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:02:50 UTC