Does EDG support modeling Attributes of Properties?

67 views
Skip to first unread message

Jennifer Schmich

unread,
May 11, 2023, 11:16:02 AM5/11/23
to TopBraid Suite Users
Does anyone here know (or can point me to documentation if such exists) if TopBraid EDG provides any support for attributes of properties? I know workarounds for this problem exist in RDF but I’m wondering if TopBraid provides any utilities for it or if it’s all manual.

Thanks!

Holger Knublauch

unread,
May 11, 2023, 11:21:44 AM5/11/23
to topbrai...@googlegroups.com
Hi Jennifer,

if I interpret your question correctly, you want to be able to attach additional properties to the definitions of properties themselves?

In TopBraid and SHACL, properties are typically represented using Property Shapes. The list of properties that show up on the forms for property shapes are defined in the dedicated node shapes

- tosh:ObjectPropertyShapeView for relationships
- tosh:DatatypePropertyShapeView for attributes

You can define your own extensions to those shapes by creating an Ontology and navigating to those shapes in the Node Shapes panel. Then add the properties that you need to those.

If this doesn't answer your question, please follow up. Another interpretation may be reification, see https://datashapes.org/reification.html

Holger



On 11 May 2023, at 4:15 pm, 'Jennifer Schmich' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:

Does anyone here know (or can point me to documentation if such exists) if TopBraid EDG provides any support for attributes of properties? I know workarounds for this problem exist in RDF but I’m wondering if TopBraid provides any utilities for it or if it’s all manual.

Thanks!

--
The topics of this mailing list include TopBraid EDG and related technologies such as SHACL.
To post to this group, send email to topbrai...@googlegroups.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 topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/5c062fca-299b-4ff9-af62-e7512eb8a1e8n%40googlegroups.com.

Davide Sottara

unread,
Dec 11, 2023, 10:24:17 AM12/11/23
to TopBraid Suite Users
I am trying to query the tosh: shapes via GraphQL. I have exposed them as publicShapes, so that they show up in the GraphQL schema

rdfsowlclassViews { uri } works as expected
objectPropertyShapeViews { uri } returns an empty collection

Are there any constraints for the ObjectPropertyShapes to be matched by the query?
I am targeting the default GraphQL endpoint (not the 'meta', nor the 'skos') of a DataGraph, which includes the Ontology where the property 
shapes are defined. 

I am using EDG 7.6

Thank you in advance
Davide

Holger Knublauch

unread,
Dec 11, 2023, 10:38:55 AM12/11/23
to topbrai...@googlegroups.com
Hi Davide,

the GraphQL engine needs to know which focus nodes are targeted by these shapes. It uses sh:targetClass etc for that.

tosh:ObjectPropertyShapeView does not have any target. Maybe try adding dash:applicableToClass sh:PropertyShape or sh:targetClass?

Holger


Davide Sottara

unread,
Dec 11, 2023, 12:00:32 PM12/11/23
to TopBraid Suite Users
Hi Holger, thank your for your quick response.

Yes, setting an explicit target works:

tosh:ObjectPropertyShapeView
  dash:applicableToClass sh:PropertyShape ;
.

I do get a validation error in the UI, because sh:PropertyShape is not an owl:Class,
but I guess it can be safely ignored?

Holger Knublauch

unread,
Dec 11, 2023, 12:03:06 PM12/11/23
to topbrai...@googlegroups.com

On 11 Dec 2023, at 6:00 pm, Davide Sottara <dso...@gmail.com> wrote:

Hi Holger, thank your for your quick response.

Yes, setting an explicit target works:

tosh:ObjectPropertyShapeView
  dash:applicableToClass sh:PropertyShape ;
.

I do get a validation error in the UI, because sh:PropertyShape is not an owl:Class,

which constraint does check for owl:Class? Is this from "our" shapes or yours?

The little i (information) icon on the Problems and Suggestions panel should have details.

Holger


Davide Sottara

unread,
Dec 11, 2023, 12:17:27 PM12/11/23
to TopBraid Suite Users
From the "info":
  Constraint of type ClassConstraintComponent defined at shape tosh:NodeShape-applicableToClass

Davide

Holger Knublauch

unread,
Dec 11, 2023, 12:39:37 PM12/11/23
to 'Bohms, H.M. (Michel)' via TopBraid Suite Users
Ok thanks, in my copy of tosh this would be rdfs:Class not owl:Class, but it indicates that sh:PropertyShape has no type. This is surprising as it does have type rdfs:Class in the SHACL metamodel itself.

sh:PropertyShape
a rdfs:Class ;
rdfs:label "Property shape"@en ;
rdfs:comment "A property shape is a shape that specifies constraints on the values of a focus node for a given property or path."@en ;
rdfs:subClassOf sh:Shape ;
rdfs:isDefinedBy sh: .


How does your definition of tosh:NodeShape-applicableToClass look like?

Holger


Davide Sottara

unread,
Dec 11, 2023, 1:39:55 PM12/11/23
to TopBraid Suite Users
My bad, yes, rdfs:Class not owl:Class

This said, here is what I can see
PropertyShape does have the rdfs:Class type asserted in an included graph.

tosh:NodeShape-applicableToClass
  a sh:PropertyShape ;
  sh:path dash:applicableToClass ;
  sh:class rdfs:Class ;
  sh:description "Links a node shape with the classes that it can be applied to." ;
  sh:group tosh:TargetsPropertyGroup ;
  sh:name "applicable to classes" ;
  sh:nodeKind sh:IRI ;
  sh:order "10"^^xsd:decimal ;
.
dash:applicableToClass
  a rdf:Property ;
  rdfs:comment "Can be used..(omitted)." ;
  rdfs:domain sh:Shape ;
  rdfs:label "applicable to class" ;
  rdfs:range rdfs:Class ;
.

sh:PropertyShape
  a rdfs:Class ;
  a sh:NodeShape ;

  rdfs:comment "A property shape is a shape that specifies constraints on the values of a focus node for a given property or path."@en ;
  rdfs:isDefinedBy sh: ;

  rdfs:label "Property shape"@en ;
  rdfs:subClassOf sh:Shape ;


Holger Knublauch

unread,
Dec 11, 2023, 2:31:20 PM12/11/23
to topbrai...@googlegroups.com
TopBraid will always "see" the included graphs, so usually these problems would not be flagged. I don't understand the problem TBH.

Holger


Reply all
Reply to author
Forward
0 new messages