Ahh, ok, so in my case I would add to the source class 
sa-input:Monsterlaag :

sh:rule [
                            a sh:TripleRule ;
                            sh:subject (sh:this ATTRIBUTE projectName as URI) ;
                            sh:predicate rdf:type ;
                            sh:object sa:Project ;
              ] .

Apart from the yellow I can also think of putting the rule at the target:

sa:ProjectShape
              a sh:NodeShape ;
              sh:targetClass sa:Project ;
              sh:rule [
                            a sh:SPARQLRule ;
                            sh:prefixes sa: ;
                            sh:construct """
                                          CONSTRUCT {
                                                         ?uri rdf:type 
sa:Project .
                                          }
                                          WHERE {
                                                         ?someproject 
sa-input:projectNaam ?projectNaam .
                                                         ? Uri = ….( 
projectNaam)
                                          }
                                          """ ;
              ] ;
.

Again having a similar yellow part I have to find the right predefined function 
for…

???



Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E [email protected]<mailto:[email protected]>

Location<http://www.tno.nl/locations/DTS>



[cid:[email protected]]<http://www.tno.nl/>

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.




From: [email protected] <[email protected]> On 
Behalf Of David Price
Sent: Thursday, September 23, 2021 1:02 PM
To: [email protected]
Subject: Re: [topbraid-users] define transform rule

SHACL rules are defined here:

https://w3c.github.io/shacl/shacl-af/#rules

What I typically do is make a separate graph for the rules and edit it in 
Composer, in the new Files feature or in Source Code editor. You can then 
include that graph and then remove it when the conversion is finished.

You define the rules (via sh:rule referencing a sh:SPARQLRule) on the “source” 
classes, and in the WHERE clause $this is instances of that classs, and then 
CONSTRUCT instances of “target" classes.

Cheers,
David


On 23 Sep 2021, at 11:01, 'Bohms, H.M. (Michel)' via TopBraid Suite Users 
<[email protected]<mailto:[email protected]>> wrote:

Hi David

In my input data from big excel I now have for instance the triple:

<urn:x-evn-master:def_shapes/bestekk_1654_N317__Dieren_-_Hoog_Keppel-1709-0500-000-01A1>
 sa-input:projectOmschrijving "bestekk 1654, N317 , Dieren - Hoog Keppel" ;

I want to use this info to instantiate a separate Project class.

I understand that here:
<image002.png>

I have to add someway a shacl-af rule doing:
Insert triple: "<current name space/bestekk 1654, N317 , Dieren - Hoog Keppel> 
rdf:type sa:Project

(actually I have to do that for all rows and because they are all in same 
project I will get duplicate triples that are only 1 in the end, I hope)

I have to do that for all classes (and for all other classes then the first: 
add also triple relating them)

Can you give my a hint how/where to best define these insert rule?

Thx a lot, Michel



Dr. ir. H.M. (Michel) Bohms
Scientist Specialist
Structural Reliability

T +31 (0)88 866 31 07
M +31 (0)63 038 12 20
E [email protected]<mailto:[email protected]>

Location<http://www.tno.nl/locations/DTS>



<image003.gif><http://www.tno.nl/>

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 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/f994e032f1c4487c8b99e264295c6142%40tno.nl<https://groups.google.com/d/msgid/topbraid-users/f994e032f1c4487c8b99e264295c6142%40tno.nl?utm_medium=email&utm_source=footer>.

UK +44 (0) 7788 561308
US +1 (336) 283-0808

--
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 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/E7EF9BDA-AD24-4714-B93F-4D318B20BEFF%40topquadrant.com<https://groups.google.com/d/msgid/topbraid-users/E7EF9BDA-AD24-4714-B93F-4D318B20BEFF%40topquadrant.com?utm_medium=email&utm_source=footer>.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/940ceef6a26d40d487179322e67580ae%40tno.nl.

Reply via email to