Looks nice But Wrt owl:AllDifferent
did you mean?: owl:AllDisjointClasses 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@01D5F794.F3571A50]<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 Holger Knublauch Verzonden: Tuesday, March 10, 2020 11:11 PM Aan: topbraid-users@googlegroups.com Onderwerp: Re: [topbraid-users] shacl-rep? Hi Michel, I am attaching a solution that should work for the general case. It defines a NodeShape that has owl:AllDifferent as its target class, and then does pairwise comparison of all mentioned classes, and then reports instances that have multiple of those types: [cid:image002.png@01D5F794.F3571A50] on alldifferent:AllDifferent1 rdf:type owl:AllDifferent ; rdfs:label "All different1" ; owl:members ( schema:Person schema:Product schema:Event ) . and sample instance alldifferent:CarPerson rdf:type schema:Person ; rdf:type schema:Vehicle ; rdfs:label "Car Person" . The main shape is alldifferent:AllDifferentShape rdf:type sh:NodeShape ; rdfs:label "All different shape" ; sh:sparql [ sh:message "{?class1} and {?class2} cannot share instances but {?value} has types {?type1} and {?type2}" ; sh:prefixes <http://example.org/alldifferent><http://example.org/alldifferent> ; sh:select """SELECT $this ?class1 ?class2 (?instance AS ?value) ?type1 ?type2 WHERE { { $this owl:members ?membersList . # Go through all combinations ?members rdf:rest*/rdf:first ?class1 . ?members rdf:rest*/rdf:first ?class2 . FILTER (?class1 != ?class2) . FILTER (str(?class1) < str(?class2)) # Avoid duplicates in both directions } ?type1 rdfs:subClassOf* ?class1 . ?instance a ?type1 . ?instance a ?type2 . ?type2 rdfs:subClassOf* ?class2 . }""" ; ] ; sh:targetClass owl:AllDifferent ; . This solution simply reuses the OWL vocabulary, so you don't need to change your model. Any similar solution would need to introduce another vocabulary, so for those who don't want to reuse owl:AllDifferent here, just make up your own instance vocabulary. HTH Holger On 10/03/2020 18:44, 'Bohms, H.M. (Michel)' via TopBraid Suite Users wrote: Hi Holger Would this become a global PropertyShape then? For the smls upper ontology itself it holds but in general not for the userdefined ontologies importing smls. (which will have subclasses for say PhysicalObject that are non-disjunst). 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<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@01D5F794.F3571A50]<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 Holger Knublauch Verzonden: Monday, March 9, 2020 11:36 PM Aan: topbraid-users@googlegroups.com<mailto:topbraid-users@googlegroups.com> Onderwerp: Re: [topbraid-users] shacl-rep? Can any of them have multiple types at all? If not, just set sh:maxCount 1 at rdf:type. As Irene indicated the scenario wasn't deemed important enough by the SHACL WG to include a built-in constraint type into the core language. However, it would be possible to define a custom constraint component in SHACL-SPARQL. Holger On 10/03/2020 04:55, 'Bohms, H.M. (Michel)' via TopBraid Suite Users wrote: Is there a shacl counterpart for: [ a owl:AllDisjointClasses ; owl:members ( smls:PhysicalObject smls:InformationObject smls:State smls:Event smls:TemporalRegion smls:SpatialRegion smls:Activity ) ; ]. 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<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@01D5F794.F3571A50]<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/32830e3367084dfbabe6fc80390c3962%40tno.nl<https://groups.google.com/d/msgid/topbraid-users/32830e3367084dfbabe6fc80390c3962%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/05a8285a-0491-0057-63e9-42fd4c1f245b%40topquadrant.com<https://groups.google.com/d/msgid/topbraid-users/05a8285a-0491-0057-63e9-42fd4c1f245b%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/70f21a2c16a847a88361cf890bacc73e%40tno.nl<https://groups.google.com/d/msgid/topbraid-users/70f21a2c16a847a88361cf890bacc73e%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/75d31960-9bb6-129b-cdbf-1a40701118a4%40topquadrant.com<https://groups.google.com/d/msgid/topbraid-users/75d31960-9bb6-129b-cdbf-1a40701118a4%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/f7b248a9676d413caa56a13dfa37d219%40tno.nl.