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>



[cid:image001.gif@01D617DD.68764140]<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 
Jan Voskuil
Verzonden: Tuesday, April 21, 2020 12:58 PM
Aan: 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>



[cid:image001.gif@01D617DD.68764140]<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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/571a1193e9374cf6bda93cc5e0479f46%40tno.nl.

Reply via email to