Ok, let’s assume the simple case for now, where we have ex:USA ex:region ex:NorthAmerica. Then let’s assume we have an ex:Address class with properties ex:country and ex:inferredRegion. Once the user selects USA and saves changes, the inferred value should show up:
ex:Address
a owl:Class, sh:NodeShape ;
sh:property ex:Address-country ;
sh:property ex:Address-inferredRegion ;
…
ex:Address-inferredRegion
a sh:PropertyShape ;
sh:path ex:inferredRegion ;
sh:values [
sh:path ( ex:country ex:region ) ;
] .
If you need something more complex, you can define sh:values rules using JavaScript/ADS or SPARQL. When you enter sh:values rules on the form, the system actually suggests to use JavaScript. To enter SPARQL, the syntax would be like
sh:values [
sh:select “””
PREFIX ex: ...
SELECT ?region
WHERE {
$this ex:country / ex:region ?region .
} “”” ;
]
HTH
Holger