Daniel
this change emerged from a review of the SM PerformUpdate code, where
the SPARQL Update syntax supports 0, 1 or more names of graphs to be
updated - but our implementation only had consistent and predictable
behavior in the case of 1 named graph being updated. The other cases
sometimes worked and sometimes didn't.
So, we are hoping you will modify your script to work with this
restriction; in exchange for which the behavior is consistent across the
various different ways of calling the script.
i.e. whatever your script did in 3.3.X was somewhat accidental - even if
it did the 'right thing' from your point of view. The new error message
is actually an improvement (even if it doesn't feel like that to you),
in that it honestly reflects the case that we have coded up
We continue to support the case where that single named graph is the
special tb session URI (for use from TBE or TBC - not as Web service call)
Jeremy
On 12/2/2010 1:09 PM, Scott Henninger wrote:
Hello Daniel! Good to hear from you!
I believe this is a consequence of some refactoring we have been doing
on internal graph contexts for TBC-ME and TBL when using
PerformUpdate. In short, you'll need to specify the graph the query
will operate on using INSERT INTO<graph> {}. Sorry this has broken
some legacy scripts.
Actually the latest draft for SPARQL 1.1 Update is worth looking at -
http://www.w3.org/TR/sparql11-update/#t415, which also requires that
the graph be explicitly stated. The full syntax won't be supported
until the standard is finalized, but it will give you some ideas on
the changing landscape for SPARQL Update.
-- Scott
On Dec 2, 1:45 pm, Daniel Mekonnen<[email protected]> wrote:
Greetings,
I regret that I could not have reported this sooner. I came into a
bug with the 3.4 Beta 2 with the PerformUpdate module in
SPARQLMotion. The same script worked fine with 3.3.3 and 3.4 Beta 1,
I find the problem lingers with the 3.4 final (Windows XP 32 Bit and
Windows 7 64 Bit). A new workspace was also used. An exception is
thrown whereby the module appears to want a named graph specified, the
syntax: INSERT {} WHERE {} is what fails. The start of the
exception:
Reason:
java.lang.IllegalArgumentException: PerformUpdate must have exactly
one named graph in update request:
INSERT ...
I'm unable to use attachments when posting to this group, so I've
pasted the N3 of a test script below that will reproduce the problem.
thanks,
-Daniel
---------------------------------------------8<---------------------------------------------------------------------------------
# Saved by TopBraid on Thu Dec 02 14:22:31 EST 2010
# baseURI:http://example.org/updateTest
# imports:http://topbraid.org/sparqlmotionfunctions
# imports:http://topbraid.org/sparqlmotionlib
@prefix kennedys:<http://topbraid.org/examples/kennedys#> .
@prefix owl:<http://www.w3.org/2002/07/owl#> .
@prefix rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#> .
@prefix sm:<http://topbraid.org/sparqlmotion#> .
@prefix sml:<http://topbraid.org/sparqlmotionlib#> .
@prefix sp:<http://spinrdf.org/sp#> .
@prefix spin:<http://spinrdf.org/spin#> .
@prefix test:<http://example.org/updateTest#> .
@prefix xsd:<http://www.w3.org/2001/XMLSchema#> .
<http://example.org/updateTest>
rdf:type owl:Ontology ;
owl:imports<http://topbraid.org/sparqlmotionlib> ,<http://
topbraid.org/sparqlmotionfunctions> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
test:ImportRDFFromWorkspace_1
rdf:type sml:ImportRDFFromWorkspace ;
rdfs:label "Import Rdffrom Workspace 1"^^xsd:string ;
sm:next test:PerformUpdate_1 ;
sml:ignoreImports "false"^^xsd:boolean ;
sml:sourceFilePath "/TopBraid/Examples/
kennedys.rdf"^^xsd:string .
test:PerformUpdate_1
rdf:type sml:PerformUpdate ;
rdfs:label "Perform Update 1"^^xsd:string ;
sml:updateQuery
[ rdf:type sp:Insert ;
sp:insertPattern ([ sp:object _:b1 ;
sp:predicate test:grandchild ;
sp:subject _:b2
]) ;
sp:where ([ sp:object _:b3 ;
sp:predicate kennedys:child ;
sp:subject _:b2
] [ sp:object _:b1 ;
sp:predicate kennedys:child ;
sp:subject _:b3
])
] .
test:grandchild
rdf:type rdf:Property ;
rdfs:label "Grandchild"^^xsd:string .
_:b3 sp:varName "child"^^xsd:string .
_:b1 sp:varName "grandChild"^^xsd:string .
_:b2 sp:varName "person"^^xsd:string
--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en