Michael,

What SHACL document are you referring to?

In addition to the main document, there are several specifications that are 
being published as the Working Group Notes. 

Take a look at the full deliverables list here 
https://www.w3.org/2014/data-shapes/wiki/Main_Page

I believe your use cases would be supported by the SHACL Advanced Features spec 
http://w3c.github.io/data-shapes/shacl-asf/#rules-examples

Sent from my iPhone

> On May 16, 2017, at 10:09 AM, Michael Johnson <[email protected]> 
> wrote:
> 
> Holger,
> I have been reading the updated draft for SHACL (16 May 2017).  
> It seems as if SHACL is migrating away from the use of CONSTRUCT.
> 
> My use case for CONSTRUCT is this:
> 1. It is revealed thru a SPARQL query that a number of conditions point to a 
> particular type of event
> 2. An instance of class:event is created with the conditions of the SPARQL 
> query as evidence (properties of) 
> 3. The presence of the event then creates another instance of 
> class:recommendation
> 
> We have "parts" of this working.  We have SHACL that identifies the 
> conditions.
> We have SPIN that creates some instances.  However, we are trying to link the 
> two together.  
> 
> I have attempted to use spin:constructor within SHACL (a bit of a shot in the 
> dark...) with no success.  
> 
> 1.  Do you have any recommendations how this would be done?
> 2.  Is it possible that the triples are "automagically" inserted after 
> inference?
> 
> Thank you.
> Michael
> 
> 
> 
>> On Friday, March 3, 2017 at 2:37:35 AM UTC-5, Holger Knublauch wrote:
>> That looks more like a use case for SPIN rules to me. It is not yet decided 
>> whether SHACL will have something similar.
>> 
>> Holger
>> 
>> 
>> Sent from my iPad
>> 
>>> On 3 Mar 2017, at 01:18, Michael Johnson <[email protected]> wrote:
>>> 
>>> Hey Holger.
>>> Thanks for pointing me in the right direction.  
>>> It seems as if the only suggestion that can be applied is to delete the 
>>> offending triple, whereas I wish to add a triple.  Do you have any 
>>> suggestions?
>>> 
>>> For example:  
>>> :JohnDoe_1
>>>   rdf:type :Person_1 ;
>>>   :ssn "qweqeqweqweq" ;
>>> .
>>> 
>>> This is a violation of the sh:MaxLengthConstraintComponent 
>>> 
>>> What if I want to insert a new triple:  
>>> :Violations_1
>>>   rdf:type :Violation ;
>>>   :ssn "qweqeqweqweq" ;
>>> .
>>> 
>>> Thanks so much for your time.
>>> 
>>> Michael
>>> 
>>>> On Monday, February 20, 2017 at 5:46:53 PM UTC-5, Holger Knublauch wrote:
>>>> Hi Michael,
>>>> 
>>>> sh:update is by default not doing anything in SHACL. It is a property that 
>>>> can be used by extensions. One such extension is the DASH suggestions 
>>>> framework supported by TopBraid:
>>>> 
>>>>     http://datashapes.org/suggestions.html
>>>> 
>>>> Please take a look and let me know if this would help. It is currently 
>>>> limited to constraint components, i.e. it is not yet possible to define 
>>>> suggestions that would be for a specific constraint instance only.
>>>> 
>>>> Holger
>>>> 
>>>> 
>>>>> On 21/02/2017 5:12, Michael Johnson wrote:
>>>>> I am attempting to insert a triple when a particular SHACL violation 
>>>>> occurs.  It seems as if I would use the sh:update, but I can't seem to 
>>>>> get it right.  
>>>>> I have a Person class that has a property Comment.  I can easily update 
>>>>> the Person by
>>>>> INSERT {
>>>>> ?s ex:Comment "inserted Comments" .
>>>>> }
>>>>> WHERE {
>>>>> ?s rdf:type ex:Person . 
>>>>> 
>>>>> I have tried to add the sh:update as a property constraint:
>>>>> 
>>>>> ex:Person
>>>>>   rdf:type rdfs:Class ;
>>>>>   rdf:type sh:Shape ;
>>>>>   rdfs:label "Person" ;
>>>>>   rdfs:subClassOf rdfs:Resource ;
>>>>>   sh:property [
>>>>>       sh:predicate ex:Comment ;
>>>>>       sh:datatype xsd:string ;
>>>>>       sh:minCount 1 ;
>>>>>       sh:update """PREFIX ex: <http://example.com#>
>>>>> INSERT {
>>>>> ?s ex:Comment \"inserted Comments\" .
>>>>> }
>>>>> WHERE {
>>>>> ?s rdf:type ex:Person . }""" ;
>>>>>     ] ;
>>>>>   sh:property [
>>>>>       sh:predicate ex:firstName ;
>>>>>       sh:datatype xsd:string ;
>>>>>       sh:minCount 1 ;
>>>>>       sh:name "first name" ;
>>>>>     ] ;
>>>>>   sh:property [
>>>>>       sh:predicate ex:gender ;
>>>>>       sh:class ex:Gender ;
>>>>>       sh:description "A Person's gender" ;
>>>>>       sh:maxCount 1 ;
>>>>>       sh:minCount 1 ;
>>>>>       sh:name "gender" ;
>>>>>     ] ;
>>>>>   sh:property [
>>>>>       sh:predicate ex:lastName ;
>>>>>       sh:datatype xsd:string ;
>>>>>       sh:description "last name   " ;
>>>>>       sh:maxCount 1 ;
>>>>>       sh:minCount 1 ;
>>>>>       sh:name "last name" ;
>>>>>     ] ;
>>>>>   sh:property [
>>>>>       sh:predicate ex:mother ;
>>>>>       sh:class ex:Person ;
>>>>>       sh:description "A Person's mother";
>>>>>       sh:maxCount 1 ;
>>>>>       sh:name "mother" ;
>>>>>       sh:nodeKind sh:IRI ;
>>>>>       sh:shape ex:FemaleShape ;
>>>>>     ] ;
>>>>>   sh:update """INSERT {
>>>>> ?s ex:Comment \"inserted Comments\" .
>>>>> }
>>>>> WHERE {
>>>>> ?s rdf:type ex:Person . }""" ;
>>>>> .
>>>>> 
>>>>> 
>>>>> 
>>>>> ex:Person
>>>>>   rdf:type rdfs:Class ;
>>>>>   rdf:type sh:Shape ;
>>>>>   rdfs:label "Person" ;
>>>>>   rdfs:subClassOf rdfs:Resource ;
>>>>>   sh:property [
>>>>>       sh:predicate ex:Comment ;
>>>>>       sh:datatype xsd:string ;
>>>>>       sh:minCount 1 ;
>>>>>       sh:update """INSERT {
>>>>> ?s ex:Comment \"inserted Comments\" .
>>>>> }
>>>>> WHERE {
>>>>> ?s rdf:type ex:Person . }""" ;
>>>>>     ] ;
>>>>>   sh:property [
>>>>>       sh:predicate ex:firstName ;
>>>>>       sh:datatype xsd:string ;
>>>>>       sh:minCount 1 ;
>>>>>       sh:name "first name" ;
>>>>>     ] ;
>>>>>   sh:property [
>>>>>       sh:predicate ex:gender ;
>>>>>       sh:class ex:Gender ;
>>>>>       sh:description "A Person's gender" ;
>>>>>       sh:maxCount 1 ;
>>>>>       sh:minCount 1 ;
>>>>>       sh:name "gender" ;
>>>>>     ] ;
>>>>>   sh:property [
>>>>>       sh:predicate ex:lastName ;
>>>>>       sh:datatype xsd:string ;
>>>>>       sh:description "last name   " ;
>>>>>       sh:maxCount 1 ;
>>>>>       sh:minCount 1 ;
>>>>>       sh:name "last name" ;
>>>>>     ] ;
>>>>>   sh:property [
>>>>>       sh:predicate ex:mother ;
>>>>>       sh:class ex:Person ;
>>>>>       sh:description "A Person's mother           " ;
>>>>>       sh:maxCount 1 ;
>>>>>       sh:name "mother" ;
>>>>>       sh:nodeKind sh:IRI ;
>>>>>       sh:shape ex:FemaleShape ;
>>>>>     ] ;
>>>>> .
>>>>> 
>>>>> 
>>>>> -- 
>>>>> You received this message because you are subscribed to the Google Group 
>>>>> "TopBraid Suite Users", the topics of which include the TopBraid Suite 
>>>>> family of products and its base technologies such as SPARQLMotion, SPARQL 
>>>>> Web Pages and SPIN.
>>>>> To post to this group, send email to [email protected]
>>>>> --- 
>>>>> 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].
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>> 
>>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Group 
>>> "TopBraid Suite Users", the topics of which include the TopBraid Suite 
>>> family of products and its base technologies such as SPARQLMotion, SPARQL 
>>> Web Pages and SPIN.
>>> To post to this group, send email to [email protected]
>>> --- 
>>> 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].
>>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google Group 
> "TopBraid Suite Users", the topics of which include the TopBraid Suite family 
> of products and its base technologies such as SPARQLMotion, SPARQL Web Pages 
> and SPIN.
> To post to this group, send email to [email protected]
> --- 
> 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].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include the TopBraid Suite family 
of products and its base technologies such as SPARQLMotion, SPARQL Web Pages 
and SPIN.
To post to this group, send email to [email protected]
--- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to