Hi David,
Ahh, ok, great, exactly as I had it now (only with explicit nodeshape and
anonymous sh:property):
ex:Vehicle
a rdfs:Class ;
rdfs:subClassOf smls:PhysicalObject ;
.
ex:VehicleShape
a sh:NodeShape ;
sh:targetClass ex:Vehicle ;
sh:property [
sh:path ex:loadLevel ;
sh:class ex:LoadLevelType ;
sh:in (ex:Light ex:Normal ex:Heavy ) ;
] ;
.
So the only potential issue I saw with this approach:
Now this constraint is modelled only in the context of Vehicle, being the
domain.
But actually the range always holds also in case the ex:loadLevel is a property
of something not of type domain (here ex:Vehicle)....(this is still possible
since domain means “at least” and not “only” ...)
So I thought...maybe it would be more accurate to make it into a property shape
for sh:allSubjectsOf this property....
What do you think of this?
Thx again, Michel
Dr. ir. H.M. (Michel) Böhms
Senior Data Scientist
T +31888663107
M +31630381220
E [email protected]<mailto:[email protected]>
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:[email protected]]<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: [email protected] <[email protected]> Namens
dprice
Verzonden: Tuesday, April 21, 2020 12:49 PM
Aan: [email protected]
Onderwerp: Re: [topbraid-users] owl:oneOf to shacl ?
Oops - also had this:
ex:Vehicle
a sh:NodeShape ;
sh:property ex:Vehicle-loadLevel ;
.
ex:LoadLevelType
a sh:NodeShape ;
.
Cheers,
David
On 21 Apr 2020, at 11:44, 'Bohms, H.M. (Michel)' via TopBraid Suite Users
<[email protected]<mailto:[email protected]>> wrote:
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 [email protected]<mailto:[email protected]>
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: [email protected]<mailto:[email protected]>
<[email protected]<mailto:[email protected]>>
Namens dprice
Verzonden: Tuesday, April 21, 2020 11:56 AM
Aan: [email protected]<mailto:[email protected]>
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
<[email protected]<mailto:[email protected]>> 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 [email protected]<mailto:[email protected]>
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
[email protected]<mailto:[email protected]>.
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
[email protected]<mailto:[email protected]>.
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
[email protected]<mailto:[email protected]>.
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>.
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
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/8F4DDAD0-E2DA-43EE-AE3A-341CFECEFAE4%40topquadrant.com<https://groups.google.com/d/msgid/topbraid-users/8F4DDAD0-E2DA-43EE-AE3A-341CFECEFAE4%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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/1789b053109d4687851749282e9b110f%40tno.nl.