Hello,
I'm using the Jena API to connect to Fuseki via a DatasetAccessor, and I've
noticed that when I attempt to create a named graph with a URI that contains
the # sign that the URI is cut off from the # sign and on.
In other words, I have this code:
Model m = ModelFactory.createDefaultModel();
m.add(ResourceFactory.createResource("http://example.com/foo#test"),
ResourceFactory.createProperty("http://example.com/prop"), "foo");
DatasetAccessor ds =
DatasetAccessorFactory.createHTTP("http://localhost:3030/ds/data");
ds.add("http://mygraph.com/foo#test", m); //the characters #test
are cut off in the named graph URI
Model otherModel = ds.getModel("http://mygraph.com/foo#test"); //this
doesn't work since the graph is actually namedhttp://mygraph.com/foo
When I look at the named graphs created in Fuseki with a SPARQL query, I also
see that the graph is named <http://mygraph.com/foo> without the trailing
#test. Is that on purpose? While I understand that the # is used as an anchor
tag to represent the position within a document, and therefore perhaps I
shouldn't use # in a named graph URI since it represents an entire "document",
it is still a valid URI so I find it weird that it gets cut off.
Thank you,
Elli