How to add annotation properties in EDG

31 views
Skip to first unread message

Fan Li

unread,
Jul 27, 2019, 4:55:35 PM7/27/19
to TopBraid Suite Users
I think this should be a simple question but I just can't find an answer. How to add annotation properties to ontology classes within EDG?

Irene Polikoff

unread,
Jul 28, 2019, 1:47:14 PM7/28/19
to topbrai...@googlegroups.com
There are two options:

1. Position your cursor in the annotations section on the form and right click, you will get a choice of the available annotation properties to add to the form.

2. Find the property you want to appear on the form in the Properties View. Drag and drop it into the form. This will work for any property and for any resource, not just classes.

Sent from my iPhone

On Jul 27, 2019, at 4:55 PM, Fan Li <lifa...@gmail.com> wrote:

I think this should be a simple question but I just can't find an answer. How to add annotation properties to ontology classes within EDG?

--
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/b5dd29e2-a15c-4cb5-aad1-714e129649fe%40googlegroups.com.

Irene Polikoff

unread,
Jul 28, 2019, 2:20:32 PM7/28/19
to topbrai...@googlegroups.com
Sorry, I now see that your question was about EDG and I gave you the TBC answer.

In EDG, forms for classes and properties are pre-defined using SWP. I’ll get someone from the development team to respond.

Sent from my iPhone

Holger Knublauch

unread,
Jul 28, 2019, 6:47:53 PM7/28/19
to topbrai...@googlegroups.com

On 29/07/2019 04:20, Irene Polikoff wrote:

Sorry, I now see that your question was about EDG and I gave you the TBC answer.

In EDG, forms for classes and properties are pre-defined using SWP. I’ll get someone from the development team to respond.


This answer applies to 6.2. One choice, if you are familiar with Turtle syntax, is to enter the values in the Source Code tab, which can be reached using the Open in new browser tab button above the form of the class or property. Any additional property that you enter would then show up under Additional Characteristics.

If you do want to streamline this process, you need to tell the EDG form mechanism about the properties that you want to add. There is no distinction between (OWL) annotation properties or other properties from that perspective. Given that this is about Ontologies (and not instance data), in 6.2 and earlier you need to override the SWP-based form definition. Basically, create a new SWP file in TBC, and add an import to teamwork.ui.ttlx. Navigate to teamwork:SimpleClassFormBody and in the context menu behind ui:overrides click on Create ui:override which produces something like teamwork:SimpleClassFormBody_1. There you can change the ui:prototype to add something like

<swa:Objects arg:predicate="owl:versionInfo"/>

under the Labels and Description section. After you have refreshed the system registries or restarted, it would then show up like

If you want to put this into an EDG installation, upload the SWP file using Project Upload.

HTH
Holger



Sent from my iPhone

On Jul 28, 2019, at 1:47 PM, Irene Polikoff <ir...@topquadrant.com> wrote:

There are two options:

1. Position your cursor in the annotations section on the form and right click, you will get a choice of the available annotation properties to add to the form.

2. Find the property you want to appear on the form in the Properties View. Drag and drop it into the form. This will work for any property and for any resource, not just classes.

Sent from my iPhone

On Jul 27, 2019, at 4:55 PM, Fan Li <lifa...@gmail.com> wrote:

I think this should be a simple question but I just can't find an answer. How to add annotation properties to ontology classes within EDG?
--
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/b5dd29e2-a15c-4cb5-aad1-714e129649fe%40googlegroups.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.

Fan Li

unread,
Jul 28, 2019, 10:54:45 PM7/28/19
to TopBraid Suite Users
Thanks, Hogler. I am a little surprised that it requires me to customize the form template. I am just curious about the design choice. Is it because annotation property is for OWL only and not for SHACL? Should I use regular data property instead?


On Sunday, July 28, 2019 at 6:47:53 PM UTC-4, Holger Knublauch wrote:

On 29/07/2019 04:20, Irene Polikoff wrote:

Sorry, I now see that your question was about EDG and I gave you the TBC answer.

In EDG, forms for classes and properties are pre-defined using SWP. I’ll get someone from the development team to respond.


This answer applies to 6.2. One choice, if you are familiar with Turtle syntax, is to enter the values in the Source Code tab, which can be reached using the Open in new browser tab button above the form of the class or property. Any additional property that you enter would then show up under Additional Characteristics.

If you do want to streamline this process, you need to tell the EDG form mechanism about the properties that you want to add. There is no distinction between (OWL) annotation properties or other properties from that perspective. Given that this is about Ontologies (and not instance data), in 6.2 and earlier you need to override the SWP-based form definition. Basically, create a new SWP file in TBC, and add an import to teamwork.ui.ttlx. Navigate to teamwork:SimpleClassFormBody and in the context menu behind ui:overrides click on Create ui:override which produces something like teamwork:SimpleClassFormBody_1. There you can change the ui:prototype to add something like

<swa:Objects arg:predicate="owl:versionInfo"/>

under the Labels and Description section. After you have refreshed the system registries or restarted, it would then show up like

If you want to put this into an EDG installation, upload the SWP file using Project Upload.

HTH
Holger



Sent from my iPhone

On Jul 28, 2019, at 1:47 PM, Irene Polikoff <ir...@topquadrant.com> wrote:

There are two options:

1. Position your cursor in the annotations section on the form and right click, you will get a choice of the available annotation properties to add to the form.

2. Find the property you want to appear on the form in the Properties View. Drag and drop it into the form. This will work for any property and for any resource, not just classes.

Sent from my iPhone

On Jul 27, 2019, at 4:55 PM, Fan Li <lifa...@gmail.com> wrote:

I think this should be a simple question but I just can't find an answer. How to add annotation properties to ontology classes within EDG?
--
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 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 topbrai...@googlegroups.com.

Holger Knublauch

unread,
Jul 28, 2019, 11:16:18 PM7/28/19
to topbrai...@googlegroups.com

I was assuming you want to have these properties show up under the Labels and Descriptions section. If this is not the case then you can use the ontology itself to declare the properties, e.g.

ex:myAnnotationProperty
    a rdf:Property ;
    rdfs:label "my annotation" ;
    rdfs:domain rdfs:Class ;
    rdfs:range xsd:string .

This would make the property visible in the Additional Characteristics section of class forms in edit mode. If you cannot use global rdfs:domains, using a local owl:Restriction at rdfs:Class should also work.

rdfs:Class
    rdfs:subClassOf [
        a owl:Restriction ;
        owl:onProperty ex:myAnnotationProperty ;
        owl:allValuesFrom xsd:string ;
   ] ;

(These solutions do change the model at a low level though, and may have other side effects because you are altering the definition of system classes, which is why simply changing the UI level (SWP) might be less risky, thus my previous email).

Holger

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/0c6d6209-6f83-4165-81d4-c231dcbbe1ef%40googlegroups.com.

Fan Li

unread,
Jul 29, 2019, 7:08:11 AM7/29/19
to TopBraid Suite Users
Yes. I would like to have them displayed under Labels and Descriptions. Interestingly, when I imported the IAO ontology, its annotation properties are automatically displayed there. I have tried to assert my own property as owl:AnnotationProperty in EDG but it has no effect.

annotations.png

Holger Knublauch

unread,
Jul 30, 2019, 1:10:35 AM7/30/19
to topbrai...@googlegroups.com

Yes in 6.2 the Labels and Descriptions section has a placeholder for annotation properties, at least in view mode. It doesn't know which properties to add unless they also have matching "domains". W.r.t your statement that it has no effect, what did you try with your own property? For example, did you give it rdfs:domain ex:MyClass ; rdf:type owl:AnnotationProperty?

BTW, the IAO ontology appears to declare rdf:type as an annotation property, which is quite "unusual".

Holger

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/ea5ff6b7-e847-4d1c-bca2-9de32b35b347%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages