How to reference a property of an Object Relation?

18 views
Skip to first unread message

Andrew Arnold

unread,
Feb 9, 2023, 6:39:15 PM2/9/23
to TopBraid Suite Users
Hi,

I have  a property shape that specifies the property levelElevation for the class 'Asset'. The property shape presently specifies levelElecation as an Object Relation to a class 'Level'. I want it to refence the the elevation property of the Level class.  

How can I do this?

thanks,

Andrew
 
--------------------------------------------------------------------------
Current property shape specificiation:

test_harness_1:Asset-levelElevation
  a sh:PropertyShape ;
  sh:path test_harness_1:levelElevation ;
  sh:class test_harness_1:Level ;
  sh:group test_harness_1:DataPropertyGroup ;
  sh:name "level_elevation" ;
  sh:order -3.5 ;

David Price

unread,
Feb 9, 2023, 6:55:51 PM2/9/23
to 'Felix Sasaki' via TopBraid Suite Users
Hi Andrew,

Seems like you do not actually want a relationship (i.e. object property). Seems like you want a derived property value that follows a path through the graph.

The SHACL syntax for that is:

ex:Asset-levelElevation
  a sh:PropertyShape ;
  sh:path (
      ex:onLevel
      ex:elevation
    ) ;
  sh:datatype xsd:string ;
  sh:name “level elevation" ;
.

where onLevel is a property of Asset and elevation is a property of Level.

Cheers,
David
--
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/951392aa-b93e-489d-ad3b-64521efe6979n%40googlegroups.com.

Bohms, H.M. (Michel)

unread,
Feb 10, 2023, 3:04:20 AM2/10/23
to topbrai...@googlegroups.com

This is weird.

Yesterday I made an example and I was in doubt whether to check if I did it right here.

A SHACL coding example for the fact that the underlying datatype for the attribute ‘dbl:numberOfBuildingUnits’ for a dbl:Building is an xsd:integer:

 

dbl:Building a rdfs:Class, sh:NodeShape ;

      sh:property [

            sh:path (dbl:numberOfBuildingUnits qudt:numericValue) ;

            sh:datatype xsd:integer ;

      ] .

Quite a similar example, also for an asset as below!

 

Chance does not exist? 😊

 

Anyway, David, my example is also ok?

 

Thx michel

 

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.

Reply all
Reply to author
Forward
0 new messages