On 27/12/12 15:57, Elli Schwarz wrote:
The following Update script:
with <urn:testing:uuidTest>
insert {<urn:test:s1> <urn:test:p1> ?o} where {
BIND (URI( CONCAT("http://example.org/", STRUUID() )) as ?o)
}
works fine when run from the Fuseki query Editor. As you would expect, I can
see a triple with a UUID as the literal. However, when run the same query
through the SPARQL endpoint API like this:
String queryString = "with <urn:testing:uuidTest> insert {<urn:test:s1>
<urn:test:p1> ?o} where { "
+ " BIND (URI( CONCAT(\"http://example.org/\", STRUUID() )) as ?o)
"
You can use '...' for strings as well.
+ "} ";
UpdateRequest update = UpdateFactory.create(queryString);
UpdateRemote.execute(update, "http://localhost:3030/ds/update");
there are no triples in <urn:testing:uuidTest>. However, if I wrap the call to
STRUUID() in STR():
... " BIND (URI( CONCAT(\"http://example.org/\", STR(STRUUID()) )) as ?o) " ...
STR should not make a difference - STRUUID is a string already.
then everything works properly. Why do I need the STR when using the API and
not in Fuseki? I wouldn't expect to need it in either case.
I'm using Fuseki server built from the SVN trunk, revision 1409883 (a bit
behind); and the API is using Jena ARQ 2.9.4 and Fuseki 0.2.5 (from the maven
repo with the latest releases).
All works fine for me (current development). I don't recall any fixes
around STUUID or any other functions since 2012-11 (r1409883 is
2012-11-15 14:05:16 +0000, I think).
Is there anything in the fuseki server log? Can you run with "-v" which
outputs more details? If there is nothing then update is not enabled
(but I thought you'd get a 404).
Andy
Thank you for your help!
-Elli