Possible to access constructor of shape script?

15 views
Skip to first unread message

elvin.d...@gmail.com

unread,
Nov 15, 2024, 3:18:51 AM11/15/24
to TopBraid Suite Users
I am trying to insert some logic when creating a new instance for a given class (here: skos:Concept) through its Shape Script. I am not sure if this is possible though.
Usually in coding this is done by overriding it's constructor and calling super() so that the regular construction routine is preserved. My goal is to insert a new type of class (prov:Entity) automatically when a user decides to create a new concept. I'm getting an error, which could indicate it's not possible or that I should do it another way.

Any thoughts?
Screenshot 2024-11-15 at 09.14.16.png
Nope:
Screenshot 2024-11-15 at 09.14.09.png

Holger Knublauch

unread,
Nov 15, 2024, 3:38:03 AM11/15/24
to 'Luis Enrique Ramos García' via TopBraid Suite Users
If you are trying to perform side effects whenever an instance in the RDF graph is created then a ShapeScript isn't going to help. These objects only exist when instantiated explicitly by an ADS script, but creating new instances from TopBraid EDG user interface isn't going to trigger that.

I think you're rather looking for a ChangeScript

On 15 Nov 2024, at 9:18 AM, elvin.d...@gmail.com <elvin.d...@gmail.com> wrote:

I am trying to insert some logic when creating a new instance for a given class (here: skos:Concept) through its Shape Script. I am not sure if this is possible though.
Usually in coding this is done by overriding it's constructor and calling super() so that the regular construction routine is preserved. My goal is to insert a new type of class (prov:Entity) automatically when a user decides to create a new concept. I'm getting an error, which could indicate it's not possible or that I should do it another way.

Any thoughts?
<Screenshot 2024-11-15 at 09.14.16.png>
Nope:
<Screenshot 2024-11-15 at 09.14.09.png>

--
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 visit https://groups.google.com/d/msgid/topbraid-users/d638b1a5-cce5-4ace-8342-0de711f9e234n%40googlegroups.com.
<Screenshot 2024-11-15 at 09.14.09.png><Screenshot 2024-11-15 at 09.14.16.png>

Reply all
Reply to author
Forward
0 new messages