Car is not a subclass of nen2660:RealObject but of ex:Car which is a subclass 
of ex:RealObject. So the constraint(s) don’t apply.

Also please make sure to use the sh: owl:import including the trailing #

We’ll look into why the quit violation appears.

HTH
Holger



> On 16 Jun 2022, at 12:44 am, 'Bohms, H.M. (Michel)' via TopBraid Suite Users 
> <[email protected]> wrote:
> 
>  
> Sorry/thx
>  
> Test file: test2 importing nen2660-shacl importing nen2660-rdfs.
>  
> I expected a shacl error saying your car instance has a part (ex:NoRO_1 – No 
> RealObject) that is not allowed since in imported shacl it says:
>  
> nen2660:RealObject
>   a sh:NodeShape ;
>   sh:property [
>       sh:path nen2660:consistsOf ;
>       sh:xone ( [ sh:class nen2660:Matter] [sh:class nen2660:MatterPortion ] 
> ) ;
>     ] ;
>   sh:property [
>       sh:path nen2660:hasPart ;
>       sh:xone ( [ sh:class nen2660:RealObject] [ sh:class nen2660:Port ] ) ;
>     ] ;
> .
>  
>  
> Note:
>  
> There IS another sh-validation error on qudt’ s quantity kind that I do not 
> understand, but that is another issue.
>  
>  
> Michel Böhms
> Data Scientist
> Unit Buildings, Infrastructure & Maritime
> 
> Mobile +31 630381220
> E-mail  [email protected] <mailto:[email protected]>      
> Location <https://nextdelft.com/>
> 
>  
> <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.
>  
> <image002.png>
>  
>  
> From: [email protected] <[email protected]> On 
> Behalf Of Holger Knublauch
> Sent: woensdag 15 juni 2022 14:39
> To: [email protected]
> Subject: Re: [topbraid-users] shacl validation
>  
> To further such discussion topics, please attach the complete file and 
> details about what you would expect. It takes too much guessing bandwidth 
> otherwise.
>  
> Holger
>  
>  
> 
> 
> On 15 Jun 2022, at 10:11 pm, 'Bohms, H.M. (Michel)' via TopBraid Suite Users 
> <[email protected] <mailto:[email protected]>> 
> wrote:
>  
> My second variant makes Door and Window a subclass of an EXTERNAL 
> nen2660:RealObject:
>  
> nen2660:RealObject
>   a sh:NodeShape ;
>   sh:property [
>       sh:path nen2660:consistsOf ;
>       sh:xone ( [ sh:class nen2660:Matter] [sh:class nen2660:MatterPortion ] 
> ) ;
>     ] ;
>   sh:property [
>       sh:path nen2660:hasPart ;
>       sh:xone ( [ sh:class nen2660:RealObject] [ sh:class nen2660:Port ] ) ;
>     ] ;
> .
>  
> So the 3 errors disappeared as expected.
> But I expected one to appear new on my extended data:
>  
> ex:Car_1 rdf:type ex:Car ;
>               ex:hasPart ex:Wheel_1 ;
>               ex:hasPart ex:Wheel_2 ;
>               ex:hasPart ex:Door_1 ;
>               ex:hasPart ex:NoRO_1 .
>              
> ex:Wheel_1 rdf:type ex:Wheel .
> ex:Wheel_2 rdf:type ex:Wheel .
> ex:Door_1 rdf:type ex:Door .
> ex:NoRO_1 rdf:type ex:NoRO .
>  
> (NoRO not being a subclass of RealObject!).
>  
>  
>  
> Michel Böhms
> Data Scientist
> Unit Buildings, Infrastructure & Maritime
> 
> Mobile +31 630381220
> E-mail  [email protected] <mailto:[email protected]>      
> Location <https://nextdelft.com/>
> 
>  
> <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.
>  
> <image002.png>
>  
>  
> From: [email protected] 
> <mailto:[email protected]> <[email protected] 
> <mailto:[email protected]>> On Behalf Of Holger Knublauch
> Sent: woensdag 15 juni 2022 13:34
> To: [email protected] <mailto:[email protected]>
> Subject: Re: [topbraid-users] shacl validation
>  
> As background, the TopBraid SHACL engine needs to know which constraint 
> components exist, and those are then used to control the actual validation 
> process. The constraint components are declared as instances of 
> sh:ConstraintComponent in the sh namespace graph. The dash namespace 
> owl:imports sh: so it should be enough to just import dash.
>  
> Holger
>  
> 
> 
> 
> On 15 Jun 2022, at 9:30 pm, 'Bohms, H.M. (Michel)' via TopBraid Suite Users 
> <[email protected] <mailto:[email protected]>> 
> wrote:
>  
> Actually it was the whole file 😊
>  
> Thought sh was only essential…
>  
> Added dash too
>  
> But no change in behaviour…
>  
> Adding the sh import however did ……
>  
> (also without dash that I deleted again)
>  
> THX!
>  
>  
>  
>  
> Michel Böhms
> Data Scientist
> Unit Buildings, Infrastructure & Maritime
> 
> Mobile +31 630381220
> E-mail  [email protected] <mailto:[email protected]>      
> Location <https://nextdelft.com/>
> 
>  
> <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.
>  
> <image002.png>
>  
>  
> From: [email protected] 
> <mailto:[email protected]> <[email protected] 
> <mailto:[email protected]>> On Behalf Of Holger Knublauch
> Sent: woensdag 15 juni 2022 13:17
> To: [email protected] <mailto:[email protected]>
> Subject: Re: [topbraid-users] shacl validation
>  
>  
> 
> 
> 
> 
> On 15 Jun 2022, at 5:06 pm, 'Bohms, H.M. (Michel)' via TopBraid Suite Users 
> <[email protected] <mailto:[email protected]>> 
> wrote:
>  
> Hi Holger
>  
> In this variant where Door and Wheel are not (yet) subclasses of RealObject I 
> would expect indeed 4 errors (contrary to my expected 2 other error I 
> expected but now understand):
> a car having two wheels where one is allowed.
> 3 parts that are not real objects
>  
> But there is nothing when I check in TBC (v 7.1.1):
>  
> <image003.png>
>  
> Guess I miss a setting?
>  
> You didn’t send the whole file, so I can only speculate that the file doesn’t 
> owl:import the dash namespace?
>  
> Holger
>  
>  
> 
> 
> 
> 
>  
> Thx Michel
>  
>  
>  
> Michel Böhms
> Data Scientist
> Unit Buildings, Infrastructure & Maritime
> 
> Mobile +31 630381220
> E-mail  [email protected] <mailto:[email protected]>      
> Location <https://nextdelft.com/>
> 
>  
> <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.
>  
> <image002.png>
>  
>  
> From: [email protected] 
> <mailto:[email protected]> <[email protected] 
> <mailto:[email protected]>> On Behalf Of Holger Knublauch
> Sent: woensdag 15 juni 2022 00:07
> To: [email protected] <mailto:[email protected]>
> Subject: Re: [topbraid-users] shacl validation
>  
>  
> 
> 
> 
> 
> 
> On 14 Jun 2022, at 10:25 pm, 'Bohms, H.M. (Michel)' via TopBraid Suite Users 
> <[email protected] <mailto:[email protected]>> 
> wrote:
>  
> I am doing something wrong?
>  
> This depends on what you expect. I see 4 constraint violations, and they are 
> because Wheel and Door are not declared as rdfs:subClassOf RealObject.
>  
> You state that you don’t get any violations, so which process/tool are you 
> using?
>  
> Holger
>  
>  
> 
> 
> 
> 
> 
>  
> Why no shac validation error (2x: two wheels and an inappropr. door) on data 
> for:
>  
> (I would at least expect 1 error for the maxCount; maybe not for Door since 
> independent needing second property shape maxcard=0 for door?))
>  
> @prefix rdfs: http://www.w3.org/2000/01/rdf-schema# 
> <http://www.w3.org/2000/01/rdf-schema> .
> @prefix sh: http://www.w3.org/ns/shacl# <http://www.w3.org/ns/shacl> .
> @prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# 
> <http://www.w3.org/1999/02/22-rdf-syntax-ns> .
> @prefix ex: http://example.org/def/ <http://example.org/def/> .
> @prefix owl: http://www.w3.org/2002/07/owl# <http://www.w3.org/2002/07/owl> .
>  
> ex: a owl:Ontology .
>  
> ex:hasPart
>   a owl:ObjectProperty .
>  
> ex:RealObject
>   a sh:NodeShape, owl:Class ;
>   sh:property [
>       sh:path ex:hasPart ;
>                 sh:class ex:RealObject 
>     ] ; .
>  
> ex:Car
>   a sh:NodeShape, owl:Class ;
>   rdfs:subClassOf ex:RealObject ;
>   sh:property  [sh:path  ex:hasPart ;
>                             sh:qualifiedMinCount 1 ;
>                             sh:qualifiedMaxCount 1 ;
>                             sh:qualifiedValueShape [ sh:class ex:Wheel ] ;
>     ] ; .
>  
> ex:Wheel
>   a sh:NodeShape, owl:Class .
>  
> ex:Door
>   a sh:NodeShape, owl:Class .
>  
> ex:hasPart
>   a owl:ObjectProperty .
>  
> ex:Car_1 rdf:type ex:Car ;
>               ex:hasPart ex:Wheel_1 ;
>               ex:hasPart ex:Wheel_2 ;
>               ex:hasPart ex:Door_1 .
>               
> ex:Wheel_1 rdf:type ex:Wheel .
> ex:Wheel_2 rdf:type ex:Wheel .
> ex:Door_1 rdf:type ex:Door .
>  
>  
>  
> Michel Böhms
> Data Scientist
> Unit Buildings, Infrastructure & Maritime
> 
> Mobile +31 630381220
> E-mail  [email protected] <mailto:[email protected]>      
> Location <https://nextdelft.com/>
> 
>  
> <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.
>  
> <image002.png>
>  
>  
>  
> -- 
> 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/5642ddb307dc46b0ac4c08bc37d81a33%40tno.nl
>  
> <https://groups.google.com/d/msgid/topbraid-users/5642ddb307dc46b0ac4c08bc37d81a33%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 [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/0B1C19E8-EB66-48CA-9A29-410D74887526%40topquadrant.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/0B1C19E8-EB66-48CA-9A29-410D74887526%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/32899f49b3df4329b3365e8a1725549e%40tno.nl
>  
> <https://groups.google.com/d/msgid/topbraid-users/32899f49b3df4329b3365e8a1725549e%40tno.nl?utm_medium=email&utm_source=footer>.
> <test.ttl>
>  
> -- 
> 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 [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/2BB151B4-0CAA-45F8-B60C-C8D4E3EFB5BB%40topquadrant.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/2BB151B4-0CAA-45F8-B60C-C8D4E3EFB5BB%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/19414ee6396d4084bb2fffc7cd21ce98%40tno.nl
>  
> <https://groups.google.com/d/msgid/topbraid-users/19414ee6396d4084bb2fffc7cd21ce98%40tno.nl?utm_medium=email&utm_source=footer>.
> <test.ttl>
>  
> -- 
> 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 [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/1A410C60-3EF5-4867-9CB7-70558C80AE23%40topquadrant.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/1A410C60-3EF5-4867-9CB7-70558C80AE23%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/81745650ce864e3484d3689688af5147%40tno.nl
>  
> <https://groups.google.com/d/msgid/topbraid-users/81745650ce864e3484d3689688af5147%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 [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/847E90AA-AE5C-44C8-A295-20C205C678F4%40topquadrant.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/847E90AA-AE5C-44C8-A295-20C205C678F4%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/6a829f9d3ed5477285496265c13f3d17%40tno.nl
>  
> <https://groups.google.com/d/msgid/topbraid-users/6a829f9d3ed5477285496265c13f3d17%40tno.nl?utm_medium=email&utm_source=footer>.
> <test2.ttl><nen2660-shacl.ttl><nen2660-rdfs.ttl>

-- 
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/769B9F0A-F108-4E84-87E8-77C92503FE94%40topquadrant.com.

Reply via email to