Thx Irene - so red should be in, clear! - leaving out the path was new to me. So this is the default semantics when no (other) path is specified? Guess there is some rule “if no path then use property indicated by targetSubjectsOf”? Is that somewhere specified in the shacl spec? - wrt range in case of also domain: I did not argue based on performance just on logic: if it is always separate also in case of domain there would be one simple rule and not a rule like: “if there is no domain map range to propertyshape with allSubjectsFRom, if there is a domain (or domains) map range to propertyshape used by node shape”. - an as said: the dealing with the range would be independent of whether there is a domain or not. - anyway, apart from this logic, I see the practical interpretation that you are in general especially interested in the range IN CASE of the domain is relevant so I will also stick to the second more complex mapping. Guess this is also more in line with the CWA-situation you map towards.
Best regards Michel Dr. ir. H.M. (Michel) Böhms Senior Data Scientist T +31888663107 M +31630381220 E michel.bo...@tno.nl<mailto:michel.bo...@tno.nl> Location<https://www.google.com/maps/place/TNO+-+Locatie+Delft+-+Stieltjesweg/@52.000788,4.3745183,17z/data=!3m1!4b1!4m5!3m4!1s0x47c5b58c52869997:0x56681566be3b8c88!8m2!3d52.000788!4d4.376707> [cid:image001.gif@01D61887.A19B4F10]<http://www.tno.nl/> This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages. Van: topbraid-users@googlegroups.com <topbraid-users@googlegroups.com> Namens Irene Polikoff Verzonden: Tuesday, April 21, 2020 5:46 PM Aan: topbraid-users@googlegroups.com Onderwerp: Re: [topbraid-users] owl:oneOf to shacl ? See below On Apr 21, 2020, at 11:12 AM, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com>> wrote: Hi David I see the need for often context (domain)-sepcific constraints. But my question is about universal constraints like an rdfs:range or a property being functional etc. In https://spinrdf.org/shacl-and-owl.html there is the example for functional. I used this approach for the range: ex:accuracy a rdf:Property ; . ex:accuracyShape a sh:PropertyShape ; sh:targetSubjectsOf ex:accuracy ; sh:path ex:accuracy ; sh:class smls:QuantityValue ; . There are now 2 issues. Issue 1: - is the red needed or not? If you plan on using a property shape stand alone, outside of a node shape, it needs a target. Otherwise, it gets a target from the node shape. ex:accuracyShape a sh:PropertyShape ; sh:targetObjectsOf ex:accuracy ; sh:class smls:QuantityValue ; . Is the same as ex:accuracyShape a sh:PropertyShape ; sh:targetSubjectsOf ex:accuracy ; sh:path ex:accuracy ; sh:class smls:QuantityValue ; . Issue 2: - even if there is a domain so this constraint can be modelled in the context of a nodeshape, wouldn’t it be better to do it as above (since domain and range are completely independent, so the range constraint also holds for instances of the property not of type domain) Better for what? For tools? I would not say so. With this approach, there is more figuring out to do in order to identify the applicability of a property and the allowed values when you are dealing with a resource. If one needs to have highly responsive user interface, this will slow it down considerably and add complexity. Even just from the validation perspective and assuming you do not need real time validation, checking for all possible options and running them will take more time. If performance is never an issue, then, pile on whatever you want. Dr. ir. H.M. (Michel) Böhms Senior Data Scientist T +31888663107 M +31630381220 E michel.bo...@tno.nl<mailto:michel.bo...@tno.nl> Location<https://www.google.com/maps/place/TNO+-+Locatie+Delft+-+Stieltjesweg/@52.000788,4.3745183,17z/data=!3m1!4b1!4m5!3m4!1s0x47c5b58c52869997:0x56681566be3b8c88!8m2!3d52.000788!4d4.376707> <image001.gif><http://www.tno.nl/> This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages. Van: topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com> <topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com>> Namens dprice Verzonden: Tuesday, April 21, 2020 4:28 PM Aan: topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com> Onderwerp: Re: [topbraid-users] owl:oneOf to shacl ? On 21 Apr 2020, at 12:41, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com>> wrote: What I meant was: domain and range are independent so if I have only a range, I HAVE to make it an explicit Propertyshape (with as I think: a allSubjectsFrom...). But if I have a domain AND a range, I can do the range via sh:property/sh:class/sh:datatype in the NodeShape (as we did now). My issue is: the range restriction does not only hold in the domain case: it always holds..its independent of that domain. I’m not sure why this is an issue. A named PS can use sh:class or sh:datatype to specify the required “range" with no mention of “domain”. I’m not sure I agree - see below. So...shouldnt a range always be modelled separately from the domain nodeshape, in general as a property shape. Not necessarily. Some PropertyShapes (i.e. properties) only make sense in the context of a specific NodeShape (i.e. Class). The US has Social Security Number with a required NNN-NN-NNNN pattern and only instances of class USPerson (i.e. U.S. citizens, permanent residents, and temporary (working) residents) can have that - class Dog cannot, so not necessary to model it outside the context of Person. In fact, you might argue that making it a separate named PS with just a sh:path and sh:datatype creates the potential for misuse by other modellers using your shapes, and therefore choose not to do so. (subissue being then whether sh:allSubjectsOf is needed or not, see reply Jan; I am still unsure there: you have to give a path and that path should start at some target or is there some kind of default in play here?) In your simple case, all that's required in SHACL is that PS sh:path should be the IRI of the predicate (plus the sh:class or sh:datatype). You can then say more in the NodeShapes that control where the PS is used. Cheers, David Dr. ir. H.M. (Michel) Böhms Senior Data Scientist T +31888663107 M +31630381220 E michel.bo...@tno.nl<mailto:michel.bo...@tno.nl> Location<https://www.google.com/maps/place/TNO+-+Locatie+Delft+-+Stieltjesweg/@52.000788,4.3745183,17z/data=!3m1!4b1!4m5!3m4!1s0x47c5b58c52869997:0x56681566be3b8c88!8m2!3d52.000788!4d4.376707> <image001.gif><http://www.tno.nl/> This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages. Van: topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com> <topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com>> Namens dprice Verzonden: Tuesday, April 21, 2020 1:17 PM Aan: topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com> Onderwerp: Re: [topbraid-users] owl:oneOf to shacl ? Technically, x:Vehicle-loadLevel is independent which may not be exactly what you want. Since you had a domain on the property, you’ve said it is not independent of subject - so I used the PS name to make the intent clear. I personally prefer the sh:property style of modelling because I can look at the NodeShape and it’s superclasses to find every property shape that comes into play. That does mean when focusing on the PS I have to do a search to “Find references” for the NS (but by using the PS naming convention of Class-Property I don’t actually need to do that to know where the PS is used). Cheers, David On 21 Apr 2020, at 12:04, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com>> wrote: Hmmm...I thought that you would use sh:targetSubjectsOf if you want to constrain independent from the type of subject! (so just any subject having the property) (In david example the target was ex:Vehicle, so he used the property shape in the context of a sh:NodeShape) Dr. ir. H.M. (Michel) Böhms Senior Data Scientist T +31888663107 M +31630381220 E michel.bo...@tno.nl<mailto:michel.bo...@tno.nl> Location<https://www.google.com/maps/place/TNO+-+Locatie+Delft+-+Stieltjesweg/@52.000788,4.3745183,17z/data=!3m1!4b1!4m5!3m4!1s0x47c5b58c52869997:0x56681566be3b8c88!8m2!3d52.000788!4d4.376707> <image001.gif><http://www.tno.nl/> This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages. Van: topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com> <topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com>> Namens Jan Voskuil Verzonden: Tuesday, April 21, 2020 12:58 PM Aan: topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com> Onderwerp: RE: [topbraid-users] owl:oneOf to shacl ? The shape is a property shape. Wherever the property in the property path occurs (i.e. ex:loadLevel), the constraint will be checked/validated. So, no need to specify sh:targetSubjectsOf --- unless you want the constraint to hold only if a specific type of subject is present. -j From: 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com>> Sent: 21 April 2020 12:45 To: topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com> Subject: RE: [topbraid-users] owl:oneOf to shacl ? I’ll add the labels indeed! Wrt shacl: what is the target of this shape? No need to add sh:targetSubjectsOf ex:loadLevel ? Dr. ir. H.M. (Michel) Böhms Senior Data Scientist T +31888663107 M +31630381220 E michel.bo...@tno.nl<mailto:michel.bo...@tno.nl> Location<https://www.google.com/maps/place/TNO+-+Locatie+Delft+-+Stieltjesweg/@52.000788,4.3745183,17z/data=!3m1!4b1!4m5!3m4!1s0x47c5b58c52869997:0x56681566be3b8c88!8m2!3d52.000788!4d4.376707> <image001.gif><http://www.tno.nl/> This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages. Van: topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com> <topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com>> Namens dprice Verzonden: Tuesday, April 21, 2020 11:56 AM Aan: topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com> Onderwerp: Re: [topbraid-users] owl:oneOf to shacl ? Not sure about “best” but I did this and it works great and aligns with your model: 1) Added to ensure drop-down lists show the right instances for selection in a UI ex:Heavy a ex:LoadLevelType ; rdfs:label "Heavy" ; . ex:Light a ex:LoadLevelType ; rdfs:label "Light" ; . ex:Normal a ex:LoadLevelType ; rdfs:label "Normal" ; . 2) sh:in in the PropertyShape gives me a violation if I go in and make an instance with anything other than the 3 selections ex:Vehicle-loadLevel a sh:PropertyShape ; sh:path ex:loadLevel ; sh:class ex:LoadLevelType ; sh:in ( ex:Light ex:Normal ex:Heavy ) ; . Cheers, David On 21 Apr 2020, at 10:07, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com>> wrote: If I want to move: ex:loadLevel a rdf:Property ; rdfs:domain ex:Vehicle ; rdfs:range ex:LoadLevelType ; . ex:LoadLevelType a rdfs:Class ; rdfs:subClassOf smls:EnumerationType ; owl:oneOf ( ex:Light ex:Normal ex:Heavy ) ; . To SHACL; what is the best way to handle the owl:oneOf? 1. in a property shape for loadLevel involving sh:targetSubjectsOf with sh:in 2. in the nodeshape for vehicle with sh:in on with path ex:loadLevel For rdfs ranges I use 2. in case there is also a domain and 1. In case there is no domain, but here the constraint is more generic on the range class. Thx Michel Ps Related: In general wouldn’t it be more precise to always map a range to a property shape (involving targetSubjectsOf) so also in case there is a domain clause...since domain and range are fully independent.... Dr. ir. H.M. (Michel) Böhms Senior Data Scientist T +31888663107 M +31630381220 E michel.bo...@tno.nl<mailto:michel.bo...@tno.nl> Location<https://www.google.com/maps/place/TNO+-+Locatie+Delft+-+Stieltjesweg/@52.000788,4.3745183,17z/data=!3m1!4b1!4m5!3m4!1s0x47c5b58c52869997:0x56681566be3b8c88!8m2!3d52.000788!4d4.376707> <image001.gif><http://www.tno.nl/> This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages. -- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-users+unsubscr...@googlegroups.com<mailto:topbraid-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/33cb2621c13641ffbf7e027bf9111354%40tno.nl<https://groups.google.com/d/msgid/topbraid-users/33cb2621c13641ffbf7e027bf9111354%40tno.nl?utm_medium=email&utm_source=footer>. UK +44 (0) 7788 561308 US +1 (336) 283-0808 -- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-users+unsubscr...@googlegroups.com<mailto:topbraid-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/DD08E718-3A78-4210-B9B1-3C48353AC734%40topquadrant.com<https://groups.google.com/d/msgid/topbraid-users/DD08E718-3A78-4210-B9B1-3C48353AC734%40topquadrant.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-users+unsubscr...@googlegroups.com<mailto:topbraid-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/8409ddee1bd54e5db478c913152392d0%40tno.nl<https://groups.google.com/d/msgid/topbraid-users/8409ddee1bd54e5db478c913152392d0%40tno.nl?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-users+unsubscr...@googlegroups.com<mailto:topbraid-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/AM0PR03MB3745ABBEA5DFDB887ED0D226E9D50%40AM0PR03MB3745.eurprd03.prod.outlook.com<https://groups.google.com/d/msgid/topbraid-users/AM0PR03MB3745ABBEA5DFDB887ED0D226E9D50%40AM0PR03MB3745.eurprd03.prod.outlook.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-users+unsubscr...@googlegroups.com<mailto:topbraid-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/571a1193e9374cf6bda93cc5e0479f46%40tno.nl<https://groups.google.com/d/msgid/topbraid-users/571a1193e9374cf6bda93cc5e0479f46%40tno.nl?utm_medium=email&utm_source=footer>. UK +44 (0) 7788 561308 US +1 (336) 283-0808 -- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-users+unsubscr...@googlegroups.com<mailto:topbraid-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/65FE3370-2B73-451A-A9B7-2E4599BEDE49%40topquadrant.com<https://groups.google.com/d/msgid/topbraid-users/65FE3370-2B73-451A-A9B7-2E4599BEDE49%40topquadrant.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-users+unsubscr...@googlegroups.com<mailto:topbraid-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/0e0b3e2c50ba42ad9c754c2fd8d04c28%40tno.nl<https://groups.google.com/d/msgid/topbraid-users/0e0b3e2c50ba42ad9c754c2fd8d04c28%40tno.nl?utm_medium=email&utm_source=footer>. UK +44 (0) 7788 561308 US +1 (336) 283-0808 -- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-users+unsubscr...@googlegroups.com<mailto:topbraid-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/81B156B6-9026-421F-B337-32C0DB51AB01%40topquadrant.com<https://groups.google.com/d/msgid/topbraid-users/81B156B6-9026-421F-B337-32C0DB51AB01%40topquadrant.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-users+unsubscr...@googlegroups.com<mailto:topbraid-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/210e7f8d1a584bf5a958ed190fa1b3da%40tno.nl<https://groups.google.com/d/msgid/topbraid-users/210e7f8d1a584bf5a958ed190fa1b3da%40tno.nl?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-users+unsubscr...@googlegroups.com<mailto:topbraid-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/C030B170-1E05-495A-8916-31F2ED36DA4F%40topquadrant.com<https://groups.google.com/d/msgid/topbraid-users/C030B170-1E05-495A-8916-31F2ED36DA4F%40topquadrant.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/e47d144744c3419fb6b00345243f12d6%40tno.nl.