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....
|
|||||||||||||||||
|
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-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/33cb2621c13641ffbf7e027bf9111354%40tno.nl.
I’ll add the labels indeed!
Wrt shacl: what is the target of this shape?
No need to add sh:targetSubjectsOf ex:loadLevel ?
|
|
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/DD08E718-3A78-4210-B9B1-3C48353AC734%40topquadrant.com.
On 21 Apr 2020, at 11:44, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com> 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
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/8409ddee1bd54e5db478c913152392d0%40tno.nl.
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
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/8409ddee1bd54e5db478c913152392d0%40tno.nl.
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
|
|
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/8F4DDAD0-E2DA-43EE-AE3A-341CFECEFAE4%40topquadrant.com.
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)
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/AM0PR03MB3745ABBEA5DFDB887ED0D226E9D50%40AM0PR03MB3745.eurprd03.prod.outlook.com.
On 21 Apr 2020, at 12:04, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@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
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: topbrai...@googlegroups.com <topbrai...@googlegroups.com> Namens Jan Voskuil
Verzonden: Tuesday, April 21, 2020 12:58 PM
Aan: topbrai...@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. -jFrom: 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com>
Sent: 21 April 2020 12:45
To: topbrai...@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
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/571a1193e9374cf6bda93cc5e0479f46%40tno.nl.
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.
So...shouldnt a range always be modelled separately from the domain nodeshape, in general as a property shape.
(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?)
|
|
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/65FE3370-2B73-451A-A9B7-2E4599BEDE49%40topquadrant.com.
On 21 Apr 2020, at 12:41, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@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.
So...shouldnt a range always be modelled separately from the domain nodeshape, in general as a property shape.
(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?)
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/0e0b3e2c50ba42ad9c754c2fd8d04c28%40tno.nl.
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?
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)
|
|
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/81B156B6-9026-421F-B337-32C0DB51AB01%40topquadrant.com.
On Apr 21, 2020, at 11:12 AM, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:Hi DavidI 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:accuracya rdf:Property ;.ex:accuracyShapea 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?
ex:accuracyShapea sh:PropertyShape ;
sh:targetObjectsOf ex:accuracy ;
sh:class smls:QuantityValue ;.
ex:accuracyShapea 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)
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/210e7f8d1a584bf5a958ed190fa1b3da%40tno.nl.
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
|
|
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/C030B170-1E05-495A-8916-31F2ED36DA4F%40topquadrant.com.
On 22 Apr 2020, at 08:23, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote: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
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: topbrai...@googlegroups.com <topbrai...@googlegroups.com> Namens Irene Polikoff
Verzonden: Tuesday, April 21, 2020 5:46 PM
Aan: topbrai...@googlegroups.com
Onderwerp: Re: [topbraid-users] owl:oneOf to shacl ?See belowOn Apr 21, 2020, at 11:12 AM, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:Hi DavidI 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.
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/e47d144744c3419fb6b00345243f12d6%40tno.nl.
Thx David
- path, that would make sense...but I have mixed message now...
- performance, again mixed messages, anyway I like to focus on the logic- considerations
- universal: with universal I mean restrictions that are on the property not on the class. So domain and range I see as universal restrictions. When going to shacl the domain can be trivially become a property shape within a node shape based on “relevance”. But for the range it is more complex: the range holds independent of the domain so assuming there is no domain the best thing you can do is an explicit propertyshape (with targetSubjectsOf and path). In case there IS a domain you can assume the range constraint is most relevant there (although formally not ONLY there) and make the range sh:class into an implicit or explicit property shape. Does this makes sense?
|
|
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/7CDA510D-EC10-4562-BA8C-D351FC6B7A7A%40topquadrant.com.
ex:accuracyShape
a sh:NodeShape ;
sh:targetObjectsOf ex:accuracy ;
sh:class smls:QuantityValue ;
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
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/e47d144744c3419fb6b00345243f12d6%40tno.nl.
Ahh ok, now I see the equivalence
So I guess your alternative is preferred (shorter)
|
|
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/008D3A22-1EFD-4E66-89FA-E687F754F158%40topquadrant.com.
Agreed, although “logically better” would in my view always prevail over “performance better”.
Of course logic can be compromised for performance reasons but then that should be made as explicit as possible.
(beyond that I think David also argued that performance was here not such a big issue in EDG)
gr
|
|||||||||||||||||
|
Van: topbrai...@googlegroups.com <topbrai...@googlegroups.com>
Namens Irene Polikoff
Verzonden: Wednesday, April 22, 2020 3:06 PM
Aan: topbrai...@googlegroups.com
Onderwerp: Re: [topbraid-users] owl:oneOf to shacl ?
You asked “what is better”. To me, answering this question requires considering the context of use from which come criteria for what it means to be better.
--
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-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/83B7FCFA-A606-4989-BF4B-531E9A19D061%40topquadrant.com.