- From: Irene Polikoff <irene@topquadrant.com>
- Date: Thu, 4 Jun 2020 10:59:12 -0400
- To: Vladimir Alexiev <vladimir.alexiev@ontotext.com>
- Cc: Public Shacl W3C <public-shacl@w3.org>
- Message-Id: <51A379CA-8291-4297-9C05-1EB802A68115@topquadrant.com>
> On Jun 4, 2020, at 10:31 AM, Vladimir Alexiev <vladimir.alexiev@ontotext.com> wrote: > > A node may be targeted by several shapes, right? Then all matching shapes are applied? Correct > > We plan to use some distribution of property shapes along a class hierarchy, eg: > - ex:PersonShape checks for field ex:name > - ex:PoliticianShape checks for extra fields ex:party and ex:politics. Our normal practice is to declare classes to be node shapes - implicit targets and use the class hierarchy exactly as you describe. > > The targeting could be done with RDFS inheritance (ex:PoliticianShape rdfs:subClassOf ex:PersonShape) > or the more flexible "semantic type targeting" we discussed before. As long as ex:PoliticianShape a rdfs:Class (or owl:Class) which is what the rdfs:subClassOf entails. The inheritance works through instances. In other words: If class 1 has some property shapes and its subclass class 2 has some additional property shapes, then an instance of class 2 will be a target of shapes declared at class 1 and class 2 - because it is also an instance of class 1. > > What to do if I want to say that a politician can have only those 3 props (plus rdf:type) and no other? Hmm… If your instances are members of these shape/classes, then I think it would be a problem because they would not conform to the shapes at parent classes. If they are members of some other classes and your targets are explicit, then I do not think it is a problem. But I am not sure what you will be accomplishing by using subclasses. You may also want to check out sh:node. > I can't apply sh:closed to either of the shapes because it would close each one individually but I need them closed collectively. > > Guess I could use sh:and to put the two shapes together, but that would double the work of checking ex:name > (because a politician also matches ex:PersonShape) > > -- > Vladimir Alexiev, PhD, PMP > Chief Data Architect > Sirma AI, trading as Ontotext: https://www.ontotext.com <https://www.ontotext.com/>, LinkedIn <https://www.linkedin.com/company-beta/208070>, Twitter <https://twitter.com/ontotext>, Rate GraphDB <http://www.capterra.com/database-management-software/reviews/157533/Graph%20DB/Ontotext/new>Email: vladimir.alexiev@ontotext.com <mailto:vladimir.alexiev@ontotext.com>, skype:valexiev1 > Mobile: +359 888 568 132, SMS: 359888568132@sms.mtel.net <mailto:359888568132@sms.mtel.net> > Calendar: https://www.google.com/calendar/embed?src=vladimir.alexiev@ontotext.com <https://www.google.com/calendar/embed?src=vladimir.alexiev@ontotext.com> > Publications and CV: https://github.com/VladimirAlexiev/my <https://github.com/VladimirAlexiev/my>
Received on Thursday, 4 June 2020 14:59:31 UTC