equiv. in shacl

16 views
Skip to first unread message

Bohms, H.M. (Michel)

unread,
Jul 7, 2020, 10:41:39 AM7/7/20
to topbrai...@googlegroups.com

Having an owl-rl restriction like:

 

  owl:equivalentClass [

      rdf:type owl:Class ;

      owl:intersectionOf (

          :SomeOtherClass

          [

            rdf:type owl:Restriction ;

            owl:hasValue :v1 ;

            owl:onProperty :p1 ;

          ]

 

How would that best translate to SHACL? (under an inference assumption, not just checking).

 

Should I use SHACL-AF sparql construct for each direction?

Or can I reuse some AF syntactic sugar construct in one or both directions?

 

Thx Michel

 

 

 

Dr. ir. H.M. (Michel) Böhms
Senior Data Scientist

+31888663107
+31630381220
michel...@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.

 

 

 

 

Irene Polikoff

unread,
Jul 7, 2020, 10:58:48 AM7/7/20
to topbrai...@googlegroups.com
For inferencing, I would associate a rule with :SomeOtherClass to infer membership in :ExampleClass (made up name since you did not give one) if the hasValue condition is met.

It is similar to the below example where type Square is inferred for a rectangle with the same width and height.

ex:Rectangle a rdfs:Class, sh:NodeShape ;
rdfs:label "Rectangle" ;
sh:property  [ sh:path ex:height ;
  sh:datatype xsd:integer ;
  sh:maxCount 1 ;
  sh:minCount 1 ;
  sh:name "height" ; ] ;
sh:property [ sh:path ex:width ;
  sh:datatype xsd:integer ;
  sh:maxCount 1 ;
  sh:minCount 1 ;
  sh:name "width" ; ] ;
sh:rule [ a sh:TripleRule ;
  sh:subject sh:this ;
                sh:predicate rdf:type ;
  sh:object ex:Square ;
  sh:condition [ sh:property [ sh:path ex:width ; sh:equals ex:height ; ] ; ] ; ] .

Of course, you would use sh:hasValue instead of sh:equals.

For constraint checking, you need to have the following for :ExampleClass

hasValue :v1 constraint for :p1 path and 
hasValue  :SomeOtherClass constraint for rdf:type/rdfs:subClassOf* path.

On Jul 7, 2020, at 10:41 AM, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:

Having an owl-rl restriction like:
 
  owl:equivalentClass [
      rdf:type owl:Class ;
      owl:intersectionOf (
          :SomeOtherClass
          [
            rdf:type owl:Restriction ;
            owl:hasValue :v1 ;
            owl:onProperty :p1 ;
          ]
 
How would that best translate to SHACL? (under an inference assumption, not just checking).
 
Should I use SHACL-AF sparql construct for each direction?
Or can I reuse some AF syntactic sugar construct in one or both directions?
 
Thx 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.
 
 
 
 

-- 
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/74333520d9ad48e6a4f5e7ebb8c596a0%40tno.nl.

Bohms, H.M. (Michel)

unread,
Jul 7, 2020, 11:08:07 AM7/7/20
to topbrai...@googlegroups.com

Thx, for the way back I guess using sh:values? (at someotherclass)

 

 

 

 

 

Dr. ir. H.M. (Michel) Böhms
Senior Data Scientist

+31888663107
+31630381220
michel...@tno.nl

Location

 

Irene Polikoff

unread,
Jul 7, 2020, 12:02:43 PM7/7/20
to topbrai...@googlegroups.com
I would use Triple Rule as in the example. I typically do not recommend sh:values for df:type because this makes it calculated only, no way to enter a value.

On Jul 7, 2020, at 11:08 AM, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:

Thx, for the way back I guess using sh:values? (at someotherclass)
 
 
Dr. ir. H.M. (Michel) Böhms
Senior Data Scientist

Reply all
Reply to author
Forward
0 new messages