Thx, see in red.

Van: topbraid-users@googlegroups.com <topbraid-users@googlegroups.com> Namens 
Irene Polikoff
Verzonden: Thursday, April 2, 2020 4:57 PM
Aan: topbraid-users@googlegroups.com
Onderwerp: Re: [topbraid-users] shacl mapping question for domain/ranges

Further to David’s responses, some more below


On Apr 2, 2020, at 10:06 AM, 'Bohms, H.M. (Michel)' via TopBraid Suite Users 
<topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com>> wrote:


In RDFS:

ex:someproperty
  a rdf:Property ;
  rdfs:domain ex:somedomainclass ;
  rdfs:range ex:somerangeclass ;

In SHACL:

ex:someproperty
  a rdf:Property, sh:PropertyShape ;
  ….?

No. A property is not a property shape

> ok, clear!



Or not possible and need for:

ex:somepropertyShape1
  a sh:PropertyShape ;
  sh:targetSubjectsOf ex:someproperty ;
  sh:class ex:somedomainclass .

ex:somepropertyShape1
  a sh:PropertyShape ;
  sh:targetObjectsOf ex:someproperty ;
  sh:class ex:somerangeclass .


A property shape must have sh:path

If you were to change the first property shape to

ex:somepropertyShape1
  a sh:PropertyShape ;
   ex:path ex:someproperty ;
  sh:targetSubjectsOf ex:someproperty ;
  sh:class ex:somedomainclass .

> ok

You would be saying that for each triple

?s ex:someproperty ?o

There must be a triple

?o a ex:somedomainclass.

> I do not get that..... it says: sh:targetSubjectsOf
> so why not: ?s ex:somedomainclass

Which is not what you want to say.

You would need to either use an inverse path on ex:someproperty - see 
https://www.w3.org/TR/shacl/#property-path-inverse or, alternatively, use 
sh:class ex:somerangeclass.

If you make these changes to your property shapes, you will get the validation 
to ensure the "right values" for the subjects and objects of triples. However, 
RDFS is not about validation, it is about inferencing. For inferencing you'd 
need to use SHACL rules.

Since the intention of SHACL constraints is different from the intention of 
RDFS domain/range, the literal translation (I think) you are trying to 
accomplish here would be into SHACL rules. On the other hand, if one were to 
reinterpret RDFS domain/range axioms into constraints, the most common way of 
doing this would be something like:

ex:somdomainclass a rdfs:Class, sh:NodeShape;
sh:property [sh:path ex:someproperty;
                                     sh:class ex:somerangeclass].

> ok, I will do that! Solves also my next issue on unions of classes for 
> domains (for each domain class I willspecify...)

And, as David mentioned, the common conversion patterns are described at 
https://spinrdf.org/shacl-and-owl.html. They are also implemented by TopBraid 
EDG. Conversion will be done automatically - see 
https://www.topquadrant.com/from-owl-to-shacl-in-an-automated-way/.

> Ok, guess the above is only needed in situations like functional etc. that is 
> really for all doamins/ranges etc.


THx! 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


<image001.gif>
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/ce25c5df596b4406a7311e9f27dfcb34%40tno.nl.

--
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/46055CA9-E7F3-49F7-A58B-58979F11FA3A%40topquadrant.com<https://groups.google.com/d/msgid/topbraid-users/46055CA9-E7F3-49F7-A58B-58979F11FA3A%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/2ee6397ea3064d78bb95289a2a967365%40tno.nl.

Reply via email to