On 08/08/12 12:24, Enes Bulut wrote:
2012/8/8 Damian Steer <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 08/08/12 07:51, Enes Bulut wrote:
Hi all,
First I create a default model.
Model model= new ModelFactory.createDefaultModel(); ...
Query string is something like that:
String queryStr = "PREFIX foaf: <http://xmlns.com/foaf/0.1/> " +
"WITH <" + "http://example/addresses" +
You're trying to update a named graph (WITH), but you only have a
default graph. Drop the WITH.
UpdateRequest upReq = UpdateFactory.create(); upReq.add(queryStr);
UpdateAction.execute(upReq, model.getGraph);
Damian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlAiOOIACgkQAyLCB+mTtylvqwCglzrXiCkBgCLVbQarLp7rKkoo
83sAoJ9WOYrzCfF0Mg6PQeSjEGDeZyrL
=i4Np
-----END PGP SIGNATURE-----
Oh, I got it. Thank you.
I've fixed the NPE as well (it won't make your update do anything
sensible and it will not make a visible update to model, it just won't
NPE) and put a note in the javadoc that working with named graphs needs
a dataset, not a model.
Andy