EDG

59 views
Skip to first unread message

Bohms, H.M. (Michel)

unread,
Feb 5, 2020, 7:16:29 AM2/5/20
to topbrai...@googlegroups.com

Dear Irene

 

Still bit struggling with TBCtoEDG.

 

Following your advice I made my ontology a shacl one in TBC.

 

I added:

alim:NodeShape_1

  rdf:type sh:NodeShape ;

  sh:property [

      sh:path rdfs:seeAlso ;

      sh:datatype xsd:string ;

    ] ;

  sh:targetClass [

      rdf:type owl:Class ;

      owl:unionOf (

          bs:InformationObject

          bs:Activity

          bs:PhysicalObject

        ) ;

    ] ;

.

 

This way I hoped to get a rdfs:seeAlso property in my bs:InformationObject/alim:Paper form. (I actually have data pointing to an doc on the web).

 

However when I use EDG (including this update shacl file) and go to a specific instance of InformationObject I get:

 

And also an error is thrown in TBC:

 

Thx for advice,

Michel

 

Ps

I attached the actual test ontology

 

 

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

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

Location

 

cid:image006.gif@01D5DC26.331DB2F0

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.

 

 

 

 

alim.shapes.ttl

dprice

unread,
Feb 5, 2020, 7:37:09 AM2/5/20
to topbrai...@googlegroups.com
Hi Michel,

A SHACL engine does not understand any OWL, so you cannot use owl:unionOf.

The SHACL spec says very clearly that “Each value of sh:targetClass in a shape is an IRI.” - see https://www.w3.org/TR/shacl/#targetClass

Cheers,
David

On 5 Feb 2020, at 12:16, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:

Dear Irene
 
Still bit struggling with TBCtoEDG.
 
Following your advice I made my ontology a shacl one in TBC.
 
I added:
alim:NodeShape_1
  rdf:type sh:NodeShape ;
  sh:property [
      sh:path rdfs:seeAlso ;
      sh:datatype xsd:string ;
    ] ;
  sh:targetClass [
      rdf:type owl:Class ;
      owl:unionOf (
          bs:InformationObject
          bs:Activity
          bs:PhysicalObject
        ) ;
    ] ;
.
 
This way I hoped to get a rdfs:seeAlso property in my bs:InformationObject/alim:Paper form. (I actually have data pointing to an doc on the web).
 
However when I use EDG (including this update shacl file) and go to a specific instance of InformationObject I get:
<image001.jpg>
 
And also an error is thrown in TBC:
<image007.jpg>
 
Thx for advice,
Michel
 
Ps
I attached the actual test ontology
 
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/ec66e6a6d0f840b093c55230981f3446%40tno.nl.
<alim.shapes.ttl>


Bohms, H.M. (Michel)

unread,
Feb 5, 2020, 7:49:58 AM2/5/20
to topbrai...@googlegroups.com

 

That was it, put only on one:

 

 

 

(another reason now for having a root class... 😊)

 

Small next one: I could not click the actual pdf link there now....(the pdf)

 

In code its:

alim:OntologicalFoundationsForStructuralConceptualModels

  rdf:type alim:Paper ;

  rdfs:seeAlso "https://ris.utwente.nl/ws/portalfiles/portal/6042428/thesis_Guizzardi.pdf" ;

.

I tried several variants: <....> and < ...>^^xsd:anyURI, all the same non-clickable result

 

 

 

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

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

Location

 

dprice

unread,
Feb 5, 2020, 8:53:35 AM2/5/20
to topbrai...@googlegroups.com
sh:property [
      sh:path rdfs:seeAlso ;
      sh:datatype xsd:string ;

Means it’s a string in the EDG UI regardless of the data itself.

Cheers,
David

On 5 Feb 2020, at 12:49, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:

 
That was it, put only on one:
 
<image001.jpg>
 
 
(another reason now for having a root class... 😊)
 
Small next one: I could not click the actual pdf link there now....(the pdf)
 
In code its:
alim:OntologicalFoundationsForStructuralConceptualModels
  rdf:type alim:Paper ;
.
I tried several variants: <....> and < ...>^^xsd:anyURI, all the same non-clickable result
 
 
Dr. ir. H.M. (Michel) Böhms
Senior Data Scientist

Bohms, H.M. (Michel)

unread,
Feb 5, 2020, 8:56:25 AM2/5/20
to topbrai...@googlegroups.com

So what should I make the datatype to make the link in edg clickable?

xsd:anyURI?

 

 

 

 

 

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

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

Location

 

dprice

unread,
Feb 5, 2020, 9:09:04 AM2/5/20
to topbrai...@googlegroups.com
On 5 Feb 2020, at 13:56, 'Bohms, H.M. (Michel)' via TopBraid Suite Users <topbrai...@googlegroups.com> wrote:

So what should I make the datatype to make the link in edg clickable?
xsd:anyURI?

I’m not sure since rdfs:seeAlso is a built-in property to RDFS and the RDFS spec says it’s range is rdfs:Resource - see https://www.w3.org/TR/rdf-schema/#ch_seealso 

I’ve never experimented with it. anyURI seems like a good place to start though.

Cheers,
David

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

Irene Polikoff

unread,
Feb 5, 2020, 9:19:21 AM2/5/20
to topbrai...@googlegroups.com
Michel,

First, all target declarations are cumulative. The target is a union of all targets https://www.w3.org/TR/shacl/#targets

So, for the validation purposes, you could simply do:

alim:NodeShape_1 sh:targetClass  bs:InformationObject, bs:Activity, bs:PhysicalObject.

For the form view and edit purposes, you will see the rdfs:seeAlso  on the form for instances of these classes, but not in the same display with the fields that are defined directly for the class or for any class it is connected to via rdfs:subClassOf statement, transitively. 

Instead, you will get a dropdown on the form that will let you switch to the alim:NodeShape_1 view of a resource. This view will only show properties defined for alim:NodeShape_1. Each node shape targeting a resource results in its own view on a resource.

If this is not what you want, do not create a new node shape that will be an alternative view. Instead, add a property shape for rdfs:seeAlso directly for each of the classes or create a common super class and add the property shape to it.

In EDG, for modeling convenience, there is an option to add already existing property definitions (property shapes) to a class (node shape) as well as an option to copy property definitions from another node shape.

Second, SHACL is its own language. You can not use OWL axioms in SHACL definitions just as you can’t use SHACL statements in OWL axioms. SHACL has its own logical expressions using sh:or, sh:and, sh:not, etc.

SHACL engines do not perform OWL inferencing e.g., to resolve the set represented as a union. You can, in principle, run OWL inferencing on your ontology which could insert rdfs:subClassOf statements from these 3 classes to the union class which will be a blank node and you could attach a property shape for rdfs:seeAlso to that blank node, but I would not recommend this.


Third, if you want to see on a form a hyperlink to a document on a web, use xsd:anyURI or, if values are text that includes links, use ref:HTML. You can also specify multiple datatypes.

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

Dear Irene
 
Still bit struggling with TBCtoEDG.
 
Following your advice I made my ontology a shacl one in TBC.
 
I added:
alim:NodeShape_1
  rdf:type sh:NodeShape ;
  sh:property [
      sh:path rdfs:seeAlso ;
      sh:datatype xsd:string ;
    ] ;
  sh:targetClass [
      rdf:type owl:Class ;
      owl:unionOf (
          bs:InformationObject
          bs:Activity
          bs:PhysicalObject
        ) ;
    ] ;
.
 
This way I hoped to get a rdfs:seeAlso property in my bs:InformationObject/alim:Paper form. (I actually have data pointing to an doc on the web).
 
However when I use EDG (including this update shacl file) and go to a specific instance of InformationObject I get:
<image001.jpg>

 
And also an error is thrown in TBC:
<image007.jpg>

 
Thx for advice,
Michel
 
Ps
I attached the actual test ontology
 
 
Dr. ir. H.M. (Michel) Böhms
Senior Data Scientist

T +31888663107
M +31630381220
michel...@tno.nl
Location

 
<image006.gif>

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.
 
 
 
 

Bohms, H.M. (Michel)

unread,
Feb 5, 2020, 4:20:43 PM2/5/20
to topbrai...@googlegroups.com

All clear, thx a lot!

 

xsd:AnyURI makes stuff indeed clickable in edg.

 

One small thing: xsd:anyURI is not one of the choices in the wizard, would be handy

 

Thx again 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.

 

Van: topbrai...@googlegroups.com <topbrai...@googlegroups.com> Namens Irene Polikoff
Verzonden: Wednesday, February 5, 2020 3:19 PM
Aan: topbrai...@googlegroups.com
Onderwerp: Re: [topbraid-users] EDG

 

Michel,

Holger Knublauch

unread,
Feb 5, 2020, 4:42:45 PM2/5/20
to topbrai...@googlegroups.com


On 6/02/2020 07:20, 'Bohms, H.M. (Michel)' via TopBraid Suite Users wrote:
  One small thing: xsd:anyURI is not one of the choices in the wizard, would be handy

This can be selected from the ... button:

Holger

Bohms, H.M. (Michel)

unread,
Feb 6, 2020, 2:19:47 AM2/6/20
to topbrai...@googlegroups.com

 

Ahh, yes, in EDG...

 

I was talking TBC...

 

 

Think I have to shift even more to EDG....

 

How do you see the usage balance of the two?

When would I best use EDG when TBC?

 

In my mind, the most power is in TBC but is that still the case?

(especially moving more to OWA/SHACL could edg editing replace tbc?)

 

thx

 

 

 

 

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.

 

 

 

 

Van: topbrai...@googlegroups.com <topbrai...@googlegroups.com> Namens Holger Knublauch
Verzonden: Wednesday, February 5, 2020 10:43 PM
Aan: topbrai...@googlegroups.com
Onderwerp: Re: [topbraid-users] EDG

 

 

On 6/02/2020 07:20, 'Bohms, H.M. (Michel)' via TopBraid Suite Users wrote:

--

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.

Jan Voskuil

unread,
Feb 6, 2020, 7:28:58 AM2/6/20
to topbrai...@googlegroups.com

EDG is an enterprise platform, TBC is an IDE.

I use TBC daily to create ontologies, convert TTL, run or test complex SPARQLs, and (I hope more and more) SPIN and SHACL Rule code.

 

EDG is where graphs are shared for use by end users in custom applications. Data stewards use EDG for simple crud-tasks and monitoring data quality. -j

Bohms, H.M. (Michel)

unread,
Feb 6, 2020, 7:35:42 AM2/6/20
to topbrai...@googlegroups.com

Thx Jan

 

Seeing more and more edg editing capabilities I thought...if this goes on why still need for IDE.....

(feels like the future edg will be have a web-based TBC included, so to say...)

Irene Polikoff

unread,
Feb 6, 2020, 11:36:11 AM2/6/20
to topbrai...@googlegroups.com
I rarely use TBC these days and mostly migrated to EDG for developing ontologies and working with graph data. EDG is simpler to use.

For any SWP and SPARQLMotion development, presently, you still need TBC. Also, I may still prefer TBC for developing some of the more complex rules - it is a bit of a coin toss. If these complex operations need to be performed repeatedly and/or by other users, I would then save them to EDG so that they could be ran simply as saved reports or transformation rules. 

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

Thx Jan
 
Seeing more and more edg editing capabilities I thought...if this goes on why still need for IDE.....
(feels like the future edg will be have a web-based TBC included, so to say...)
 
 
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.
 
Van: topbrai...@googlegroups.com <topbrai...@googlegroups.com> Namens Holger Knublauch
Verzonden: Wednesday, February 5, 2020 10:43 PM
Aan: topbrai...@googlegroups.com
Onderwerp: Re: [topbraid-users] EDG
 

 

On 6/02/2020 07:20, 'Bohms, H.M. (Michel)' via TopBraid Suite Users wrote:
  One small thing: xsd:anyURI is not one of the choices in the wizard, would be handy

This can be selected from the ... button:

<image002.png>

Holger

-- 
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/7a0ea7d5-8dce-7f0f-a64f-d1e8c3e450d4%40topquadrant.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/48c4bbe4e64f4f92b10f9550acedea2b%40tno.nl.
-- 
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/AM4PR0301MB21313794609F9D28177D687EE91D0%40AM4PR0301MB2131.eurprd03.prod.outlook.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.

Henrik Dibowski

unread,
Nov 30, 2020, 10:00:45 AM11/30/20
to TopBraid Suite Users

Hi Irene and all,

I was looking for existing discussions about the problem we`re facing, and found your post here. In SHACL I want to express that the object nodes of an object property can be of either class A, B, C... That`s what I`m trying to define in the PropertyShape of the object property via the sh:class predicate. Here I need to define this alternative from a list of classes. Using owl:unionOf does not seem to work here, as the SHACL engine reports constraint violations for any subject instance, which is not an instance of all the classes. Defining several values for sh:class, as suggested by you, Irene, does not work either, as the implemented semantics is not the union but the intersection, i.e. only instances can be in the object position that are members of ALL the classes. So that`s not the wanted behavior, but does quite the opposite of a union construct.

My question to you: How can we define the desired expression? Or is the SHACL engine faulty? I have this problem not only for the sh:class predicate, but also for sh:targetClass of a NodeShape, where I want to have an easy way to declare the union of several classes as target class. I do not want to go for a SPARQL target definition here (there has to be a simpler solution!?), and besides, for sh:class it would not be an option at all.

Many thanks

David Price

unread,
Nov 30, 2020, 10:33:55 AM11/30/20
to topbrai...@googlegroups.com

On 30 Nov 2020, at 14:39, Henrik Dibowski <h.dib...@gmail.com> wrote:

Hi Irene and all,

I was looking for existing discussions about the problem we`re facing, and found your post here. In SHACL I want to express that the object nodes of an object property can be of either class A, B, C... That`s what I`m trying to define in the PropertyShape of the object property via the sh:class predicate. Here I need to define this alternative from a list of classes. Using owl:unionOf does not seem to work here


As Irene said:

Second, SHACL is its own language. You cannot use OWL axioms in SHACL definitions just as you can’t use SHACL statements in OWL axioms. SHACL has its own logical expressions using sh:or, sh:and, sh:not, etc.


, as the SHACL engine reports constraint violations for any subject instance, which is not an instance of all the classes. Defining several values for sh:class, as suggested by you, Irene, does not work either, as the implemented semantics is not the union but the intersection, i.e. only instances can be in the object position that are members of ALL the classes. So that`s not the wanted behavior, but does quite the opposite of a union construct.

My question to you: How can we define the desired expression? Or is the SHACL engine faulty? I have this problem not only for the sh:class predicate, but also for sh:targetClass of a NodeShape, where I want to have an easy way to declare the union of several classes as target class. I do not want to go for a SPARQL target definition here (there has to be a simpler solution!?), and besides, for sh:class it would not be an option at all.


The simplest approach is to make a superclass of the classes in question. In EDG you can declare that to be abstract too.

Cheers,
David


Irene Polikoff

unread,
Nov 30, 2020, 11:46:35 AM11/30/20
to topbrai...@googlegroups.com
Yes, David is correct, creating a common parent class is indeed the simplest approach.

It is the simplest to express and with this approach, autocomplete in TopBraid EDG will work as expected - showing only instances of the specified classes.

I never suggested to simply use sh:class constraint with multiple classes. All constraints must be met. Thus, if you use multiple classes with sh:class, the value would need to be an instance of all classes - as you have discovered.

What I suggested in the e-mail below is to have multiple targets. A target of a shape is a union of all target statements. Targets are, of course, different from constraints. They define where a shape is applicable, not how the values should look like.

If you, for some reason, can’t create a common parent class, the next option is to use sh:or - I have mentioned this in my original e-mail. For example:

ex:OrExample1
	a owl:Class, sh:NodeShape ;
	sh:property [
		sh:path ex:property ;
		sh:or (
			[
				sh:class ex:A ;
			]
			[
				sh:class ex:B ;
			]
		)
	] .

You can also use sh:or with different paths. Such as:

ex:OrExample2
	a owl:Class, sh:NodeShape ;
	sh:or (
		[
			sh:path ex:property1 ;
			sh:class ex:A ;
		]
		[
			sh:path ex:property2 ;
			sh:class ex:B ;
		]
	) .

Another approach is to use sh:in with a complex property path. I am showing it to demonstrate different ways to say things in SHACL. The property path below is the same as using ex:property/rdf:type/rdfs:subClassOf* in SPARQL.

ex:InExample
	a owl:Class, sh:NodeShape ;
	sh:property [
		sh:path (ex:property rdf:type [sh:zeroOrMorePath rdfs:subClassOf]) ;
		sh:in ( ex:A ex:B ) ;
	] .

The sh:or and sh:in options will work for validation, but will not limit the autocompletion on the forms when editing to only instances of A and B.


Henrik Dibowski

unread,
Dec 2, 2020, 3:03:59 PM12/2/20
to topbrai...@googlegroups.com
Thanks a lot for your detailed explanation support, Irene and David! Very much appreciated!
The sh:or solution is exactly what I was looking for, and that`ll be our choice to go for. Introducing superclasses for the classes in question would artificially blow up our ontology and would not work well in our case.
Thanks for the valuable hints.

Reply all
Reply to author
Forward
0 new messages