If memory serves, I've run into this “cannot copy a triple” behaviour using 
SPIN and SHACL for ETL-style converters in the past.

Not 100% sure, but I think both SHACL and SPIN rule engines filter duplicate 
triples. 

As Holger suggested, hange the CONSTRUCT to make new triples. If you find it 
works , then it may be that ?s ?p ?o are not constructed because ?s ?p ?o 
already exists.

Cheers,
David

> On 11 Sep 2019, at 11:16, Holger Knublauch <hol...@topquadrant.com> wrote:
> 
> I cannot think of a reason. How are you executing these rules? I tried a 
> similar rule from TBC, but the example with ?s ?p ?o is of course hard to 
> debug because all these triples are already there. Did you try a variation 
> where ?o is a constant just to verify the particular rule actually fires?
> 
> Holger
> 
> 
> On 11/09/2019 18:02, Rob Atkinson wrote:
>> Hi
>> 
>> trying to execute a SHACL rule that preserves all the triples during a 
>> replace _except_ the ontology object and its properties
>> 
>> This gives me the expected results when executed against the target graph..
>> 
>> CONSTRUCT {
>>     ?s ?p ?o
>> }
>> WHERE { ?this a owl:Ontology .
>>     ?s ?p ?o FILTER ( ?s != ?this )
>> }
>> 
>> but when I run it as a SHACL rule as below it returns nothing - other rules 
>> are running OK..
>> 
>> is there some internal logic that stops it looking at owl:Ontology nodes 
>> when executing rules?  (or a better way of doing this : noting I have a 
>> "replace=true" on rule execution because normally i want to, this is a rule 
>> i want to use to override that behaviour )
>> 
>> :copy_graph
>>   rdf:type sh:NodeShape ;
>>   rdfs:label "copy original graph" ;
>>   sh:targetClass owl:Ontology ;
>>   sh:rule :SPARQLRule_1 ;
>> .
>> 
>> 
>> :SPARQLRule_1
>>   rdf:type sh:SPARQLRule ;
>>   rdfs:label "copy original graph" ;
>>   sh:construct """CONSTRUCT {
>>     ?s ?p ?o
>> }
>> WHERE {
>>     ?s ?p ?o FILTER ( ?s != ?this )
>> }""" ;
>> .
>> 
>> -- 
>> 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-users+unsubscr...@googlegroups.com 
>> <mailto:topbraid-users+unsubscr...@googlegroups.com>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/topbraid-users/e90378c0-5f5a-4d6d-9567-c5bcdfbe4de8%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/topbraid-users/e90378c0-5f5a-4d6d-9567-c5bcdfbe4de8%40googlegroups.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 topbraid-users+unsubscr...@googlegroups.com 
> <mailto:topbraid-users+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/98a75183-4e01-79a5-3731-93726b7b9b56%40topquadrant.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/98a75183-4e01-79a5-3731-93726b7b9b56%40topquadrant.com?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 topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/6E93415E-B581-4EFB-8B95-6BDDAC6EDF37%40topquadrant.com.

Reply via email to