RE: [topbraid-users] right owl2shacl-mapping?

2021-08-31 Thread 'Bohms, H.M. (Michel)' via TopBraid Suite Users
Hi Holger

The pattern I showed is a proposal by someone as a replacement for our current:

sml:AllDisjointClassesShape_1
  a sh:NodeShape ;
  sh:targetSubjectsOf rdf:type ;
  sh:property [
sh:path rdf:type ;
sh:qualifiedValueShape [
  sh:zeroOrMorePath rdfs:subClassOf ;
  sh:in (
sml:PhysicalObject
sml:InformationObject
sml:State
sml:Event
sml:Activity
  ) ;
] ;
sh:qualifiedMaxCount 1 ;
  ] ;
.

Would the current way be less cumbersome to check?

How applied? In our current CEN SML ontology we have one such dimension for the 
main archetypes (as above) and for some of them some orthogonal dimensions with 
less items (#2): planned/realized, space/object, functional/technical).

That is also the reason multiple typing is always relevant and cannot be closed 
(ie ‘maxcard rdf:type being 1’ is not possible).

dash:allDisjoint would be an interesting  but ‘limited standard’ option I 
guess…isn’t there room in the evolving (in future more standard) shacl-af for 
such a construct?

Michel



Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bo...@tno.nl

Location



[cid:image001.gif@01D79F0E.7E987C40]

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  Namens 
Holger Knublauch
Verzonden: woensdag 1 september 2021 01:58
Aan: topbraid-users@googlegroups.com
Onderwerp: Re: [topbraid-users] right owl2shacl-mapping?


This (interesting) design may work technically, but it can be very slow because 
it will traverse all rdf:type triples everywhere and use a rather complex 
algorithm with nested (qualified) shapes. A better solution would indeed start 
with exactly the instances of one of those classes. The solution that David 
mentioned certainly works OK if you have few disjoint classes each, but for 
long lists even the OWL 2 standard introduced a more compact syntax, using 
owl:AllDisjointClasses.

I guess the syntactically ideal replacement would be to declare a reusable 
constraint component using SHACL-SPARQL (which is part of the SHACL standard 
1.0). You could even leave the existing owl:DisjointClasses in place, but I 
don't like that they are using rdf:Lists which would need to be traversed 
repeatedly and that is very slow too. owl:members here should simply point at 
the classes IMHO.

But something like that should be fine:

sml:AllDisjointClasses_1
a sh:NodeShape ;
sh:targetClass sml:PhysicalObject, sml:InformationObject, sml:Activity, 
sml:Event, sml:State ;
dash:allDisjoint true .

where dash:allDisjoint would be a constraint component that would walk through 
the targetClasses of $currentShape in $shapesGraph.

How many such cases (of large disjointness clusters) do you actually have? Is 
this even a sensible concept... I mean how would this exclude anyone else from 
adding more classes that you don't know about yet. If you want to close off 
your instances, just give them a sh:maxCount 1 on rdf:type.

Holger


On 2021-08-31 10:28 pm, 'Bohms, H.M. (Michel)' via TopBraid Suite Users wrote:
(we were looking for an approach not needing rdfs-entailment)

sml:AllDisjointClasses_1
  a owl:AllDisjointClasses ;
  owl:members (
  sml:PhysicalObject
  sml:InformationObject
  sml:Activity
  sml:Event
  sml:State
) ;
.

In shacl (?):

sml:DisjointClassesShape_1 a sh:NodeShape ;
  sh:targetSubjectsOf rdf:type ;
  sh:property [
sh:path ( rdf:type [ sh:zeroOrMorePath rdfs:subClassOf ] ) ;
sh:qualifiedValueShape [
  sh:in (
sml:PhysicalObject
sml:InformationObject
sml:State
sml:Event
sml:Activity
  ) ;
] ;
sh:qualifiedMaxCount 1 ;
  ] ;
.

Any issues with this mapping?

Thx Michel




Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bo...@tno.nl

Location



[cid:image001.gif@01D79F0E.7E987C40]

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 subscrib

Re: [topbraid-users] right owl2shacl-mapping?

2021-08-31 Thread Holger Knublauch
This (interesting) design may work technically, but it can be very slow 
because it will traverse all rdf:type triples everywhere and use a 
rather complex algorithm with nested (qualified) shapes. A better 
solution would indeed start with exactly the instances of one of those 
classes. The solution that David mentioned certainly works OK if you 
have few disjoint classes each, but for long lists even the OWL 2 
standard introduced a more compact syntax, using owl:AllDisjointClasses.


I guess the syntactically ideal replacement would be to declare a 
reusable constraint component using SHACL-SPARQL (which is part of the 
SHACL standard 1.0). You could even leave the existing 
owl:DisjointClasses in place, but I don't like that they are using 
rdf:Lists which would need to be traversed repeatedly and that is very 
slow too. owl:members here should simply point at the classes IMHO.


But something like that should be fine:

sml:AllDisjointClasses_1
    a sh:NodeShape ;
    sh:targetClass sml:PhysicalObject, sml:InformationObject, 
sml:Activity, sml:Event, sml:State ;

    dash:allDisjoint true .

where dash:allDisjoint would be a constraint component that would walk 
through the targetClasses of $currentShape in $shapesGraph.


How many such cases (of large disjointness clusters) do you actually 
have? Is this even a sensible concept... I mean how would this exclude 
anyone else from adding more classes that you don't know about yet. If 
you want to close off your instances, just give them a sh:maxCount 1 on 
rdf:type.


Holger


On 2021-08-31 10:28 pm, 'Bohms, H.M. (Michel)' via TopBraid Suite Users 
wrote:


(we were looking for an approach not needing rdfs-entailment)

sml:AllDisjointClasses_1

  a owl:AllDisjointClasses ;

owl:members (

sml:PhysicalObject

sml:InformationObject

sml:Activity

sml:Event

sml:State

) ;

.

In shacl (?):

sml:DisjointClassesShape_1 a sh:NodeShape ;

  sh:targetSubjectsOf rdf:type ;

  sh:property [

    sh:path ( rdf:type [ sh:zeroOrMorePath rdfs:subClassOf ] ) ;

sh:qualifiedValueShape [

  sh:in (

sml:PhysicalObject

sml:InformationObject

    sml:State

    sml:Event

sml:Activity

  ) ;

    ] ;

    sh:qualifiedMaxCount 1 ;

  ] ;

.

Any issues with this mapping?

Thx Michel



Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability



T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bo...@tno.nl 



Location 



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 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/9eedba7e10534409ac1eec4e3d3704b1%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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/31454882-3bee-6ae1-1a58-62a3264c5ca2%40topquadrant.com.


RE: [topbraid-users] right owl2shacl-mapping?

2021-08-31 Thread 'Bohms, H.M. (Michel)' via TopBraid Suite Users
Hi David

Your solution (as generated) needs quite some code in case of more than two 
items and also in a distributed way.
We hoped to cover it with more generic template code…

Wrt shacl AF: if we can do it in shacl core (being a recommendation) that would 
be preferred. Furthermore I would not quickly see how to define a triple rule 
that does the same as the shacl core nodeshape proposal.

(I do see your visibility issue though…)

Gr michel



Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bo...@tno.nl

Location



[cid:image001.gif@01D79E80.866A87D0]

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  Namens 
David Price
Verzonden: dinsdag 31 augustus 2021 15:46
Aan: topbraid-users@googlegroups.com
Onderwerp: Re: [topbraid-users] right owl2shacl-mapping?

I don’t like creating a separate instance to control disjointedness as it’s not 
immediately visible in the relevant class form. The NodeShape being proposed 
has the same issue.

I usually use a pattern like this:

unnamed:Thing_1
  rdf:type owl:Class ;
  rdfs:subClassOf owl:Thing ;
  owl:disjointWith unnamed:Thing_2 ;
  owl:disjointWith unnamed:Thing_3 ;

and then EDG owl2shacl does this: For each owl:disjointWith from class A to B, 
create one constraint at A with the pattern sh:not [ sh:class B ].

You could generate sh:not from the approach you mention too, of course. I did 
not test the mentioned approach but it does appear that it or something similar 
would work.

Also, if Advanced SHACL is supported in your tools a TripleRule could likely 
handle this need.

https://w3c.github.io/shacl/shacl-af/#TripleRule

Cheers,
David


On 31 Aug 2021, at 13:28, 'Bohms, H.M. (Michel)' via TopBraid Suite Users 
mailto:topbraid-users@googlegroups.com>> wrote:

(we were looking for an approach not needing rdfs-entailment)

sml:AllDisjointClasses_1
  a owl:AllDisjointClasses ;
  owl:members (
  sml:PhysicalObject
  sml:InformationObject
  sml:Activity
  sml:Event
  sml:State
) ;
.

In shacl (?):

sml:DisjointClassesShape_1 a sh:NodeShape ;
  sh:targetSubjectsOf rdf:type ;
  sh:property [
sh:path ( rdf:type [ sh:zeroOrMorePath rdfs:subClassOf ] ) ;
sh:qualifiedValueShape [
  sh:in (
sml:PhysicalObject
sml:InformationObject
sml:State
sml:Event
sml:Activity
  ) ;
] ;
sh:qualifiedMaxCount 1 ;
  ] ;
.

Any issues with this mapping?

Thx Michel




Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bo...@tno.nl

Location





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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/9eedba7e10534409ac1eec4e3d3704b1%40tno.nl.

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 
topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/642FE359-E3CF-4FF8-881E-26AC0C1D201B%40topquadrant.com.

-- 
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 topbr

Re: [topbraid-users] right owl2shacl-mapping?

2021-08-31 Thread David Price
I don’t like creating a separate instance to control disjointedness as it’s not 
immediately visible in the relevant class form. The NodeShape being proposed 
has the same issue.

I usually use a pattern like this:

unnamed:Thing_1
  rdf:type owl:Class ;
  rdfs:subClassOf owl:Thing ;
  owl:disjointWith unnamed:Thing_2 ;
  owl:disjointWith unnamed:Thing_3 ;

and then EDG owl2shacl does this: For each owl:disjointWith from class A to B, 
create one constraint at A with the pattern sh:not [ sh:class B ].

You could generate sh:not from the approach you mention too, of course. I did 
not test the mentioned approach but it does appear that it or something similar 
would work.

Also, if Advanced SHACL is supported in your tools a TripleRule could likely 
handle this need.

https://w3c.github.io/shacl/shacl-af/#TripleRule

Cheers,
David

> On 31 Aug 2021, at 13:28, 'Bohms, H.M. (Michel)' via TopBraid Suite Users 
>  wrote:
> 
> (we were looking for an approach not needing rdfs-entailment)
>  
> sml:AllDisjointClasses_1
>   a owl:AllDisjointClasses ;
>   owl:members (
>   sml:PhysicalObject
>   sml:InformationObject
>   sml:Activity
>   sml:Event
>   sml:State
> ) ;
> .
>  
> In shacl (?):
>  
> sml:DisjointClassesShape_1 a sh:NodeShape ;
>   sh:targetSubjectsOf rdf:type ;
>   sh:property [
> sh:path ( rdf:type [ sh:zeroOrMorePath rdfs:subClassOf ] ) ;
> sh:qualifiedValueShape [
>   sh:in (
> sml:PhysicalObject
> sml:InformationObject
> sml:State
> sml:Event
> sml:Activity
>   ) ;
> ] ;
> sh:qualifiedMaxCount 1 ;
>   ] ;
> .
>  
> Any issues with this mapping?
>  
> Thx Michel
>  
>  
>  
> Dr. ir. H.M. (Michel) Bohms
> Scientist Specialist
> Structural Reliability
> T +31 (0)88 866 31 07
> M +31 (0)63 038 12 20
> E michel.bo...@tno.nl 
> Location 
> 
>  
>  
> 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 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/9eedba7e10534409ac1eec4e3d3704b1%40tno.nl
>  
> .

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 topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/642FE359-E3CF-4FF8-881E-26AC0C1D201B%40topquadrant.com.


[topbraid-users] right owl2shacl-mapping?

2021-08-31 Thread 'Bohms, H.M. (Michel)' via TopBraid Suite Users
(we were looking for an approach not needing rdfs-entailment)

sml:AllDisjointClasses_1
  a owl:AllDisjointClasses ;
  owl:members (
  sml:PhysicalObject
  sml:InformationObject
  sml:Activity
  sml:Event
  sml:State
) ;
.

In shacl (?):

sml:DisjointClassesShape_1 a sh:NodeShape ;
  sh:targetSubjectsOf rdf:type ;
  sh:property [
sh:path ( rdf:type [ sh:zeroOrMorePath rdfs:subClassOf ] ) ;
sh:qualifiedValueShape [
  sh:in (
sml:PhysicalObject
sml:InformationObject
sml:State
sml:Event
sml:Activity
  ) ;
] ;
sh:qualifiedMaxCount 1 ;
  ] ;
.

Any issues with this mapping?

Thx Michel




Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E michel.bo...@tno.nl

Location



[cid:image001.gif@01D79E74.69501590]

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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/9eedba7e10534409ac1eec4e3d3704b1%40tno.nl.