Q: How to add a property to new Classes?

13 views
Skip to first unread message

Tim Smith

unread,
Jun 9, 2020, 5:30:51 PM6/9/20
to topbrai...@googlegroups.com
Hi,

Some of my classes (not instances) need to have an acronym.  In TBC, I would just drag edg:acronym onto the form and populate it.  In EDG, this does not work.  What I'm going for is to have "acronym" appear in the class definition section of the form view of a class.  I tried adding acronym as a property shape of both Model Class and Node Shape but I cannot make it appear in any section of the Class form.

How can I add properties to my classes that are in addition to the standard properties?  Where is the Definition form for classes defined and can I add to it?

Thanks,

Tim

image.png

Irene Polikoff

unread,
Jun 9, 2020, 10:19:27 PM6/9/20
to topbrai...@googlegroups.com
You can get new fields to show up on the class form, if you tell EDG that you want to use additional properties to describe classes (or properties or other schema resources). There are two ways of doing this:

• Option 1

– Create a new node shape, make OWL or RDFS Class its target.
– Add to it properties you want to use e.g., skos:definition.
– On the class forms, you will now have a drop down to switch from the regular view to a view that lets you see and edit your additional annotations.
- You can make it default for all roles

• Option 2

– Modify the default system forms for classes that are defined in metash.ttl by injecting extra fields into them.

<image.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 topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CAF0WbnJ3Q4oDrRVpdoMNLb2AH4NdMdrombG4-03ww4DTkSjnqQ%40mail.gmail.com.

Holger Knublauch

unread,
Jun 9, 2020, 10:22:02 PM6/9/20
to topbrai...@googlegroups.com

Hi Tim,

this is a recurring question and I need to improve on the Ontology editor to make this easier. Will do so for the version after the (soon arriving) 6.4.

The best option for 6.3 is a bit geeky but no problem for you: Open TopBraid/SHACL/metash.ttl with TBC and look at the comment of the Home resource:

---

A collection of shapes about shapes. The shapes here are primarily designed to support querying node shapes, classes and property shapes, as well as property groups via GraphQL, to provide a stable and convenient API for applications such as schema editors. While the shapes could potentially also be used for validation purposes, they rather represent best-practices than "hard" constraints. For example, sh:datatype has a sh:maxCount of 1 even though the official spec does not prescribe that.

Some of the sh:values rules in this graph use functions that are outside of the SPARQL standard. Implementers outside of the TopBraid platform would need to replicate their implementations.

This is a "hard-coded" system graph of the TopBraid platform, but you can substitute it by creating a new graph http://datashapes.org/metashx and uploading it into your workspace. In typical use cases, this new graph would owl:import the base graph and then add sh:property constraints to it.

---

HTH
Holger

Reply all
Reply to author
Forward
0 new messages