Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-19 Thread Andy Doddington
That’s great - in the end I solved the problem by adding the line: /$/** = anon to the shiva.ini file. Many thanks for all your help (and patience). Andy D On 18 Aug 2015, at 22:45, Andy Seaborne wrote: Out of the box, the UI only responds to the localhost. If you ac

Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-18 Thread Andy Seaborne
Out of the box, the UI only responds to the localhost. If you access it from a different machine, or (unfortunately) the same machine but its external IP address, the Fuseki refuses access to the JSON calls driving the interface. You can change the default to a user/password. https://jena.apache.o

Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-18 Thread Andy Doddington
Hah! I hadn’t configured a dataset. Now rectified by setting the config.ttl to be one of the templates provided as part of the build. Curiously though, although I can see this when I run a browser locally on the server, and set the url to "localhost:3030", I don't see any datasets listed when I

Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-18 Thread Andy Seaborne
The dataset (not the graph) needs to exist before the operation is attempted. e.g. via the UI, or via startup with "--update /ds" for a name of "ds". http://foobar:3030/myDatasetName/data /myDatasetName -- dataset name - must exist /myDatasetName/data -- service endpoint for GSP on that dat

Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-18 Thread Andy Doddington
You’ll think me very dense, but how do I specify the dataset name? When I specify the dummy URL that you suggest (I don’t care what the dataset is called at the moment) I get: Exception in thread "main" org.apache.jena.atlas.web.HttpException: 404 - Not Found I feel I’m missing some tri

Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-18 Thread Andy Seaborne
Wrong URL: It will be something like http://foobar:3030/myDatasetName/data which is the service endpoint for the Graph Store protocol by default. (It needs a config file to change it - the UI puts it there automatically) where the query one is http://foobar:3030/myDatasetName/query and the

Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-18 Thread Andy Doddington
OK, I’ve created the model, which I can successfully print out using 'model.write(System.out, "RDF/XML-ABBREV”);' However, when I use your code below, and do an acc.put(model) I find that there is nothing on the server, even though no errors are indicated. The URL that I am using for the create

Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-17 Thread Andy Seaborne
On 17/08/15 22:40, Martynas Jusevičius wrote: So what are the semantics of POSTing quads and PUTing quads? Append and replace as per HTTP. RFC 7231: 4.3.3. POST ... - Extending a database through an append operation. ... (any ordering implied by "extend" is irrelevant for a set of quads

Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-17 Thread Martynas Jusevičius
So what are the semantics of POSTing quads and PUTing quads? On Mon, Aug 17, 2015 at 11:32 PM, Andy Seaborne wrote: > On 17/08/15 22:21, Martynas Jusevičius wrote: >> >> Is that an oversight in the GSP spec? > > > Not really - the GET/POST/PUT on the dataset itself is just normal use of > HTTP. >

Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-17 Thread Andy Seaborne
On 17/08/15 22:21, Martynas Jusevičius wrote: Is that an oversight in the GSP spec? Not really - the GET/POST/PUT on the dataset itself is just normal use of HTTP. The "Graph Store Protocol" for managing a graph store. What it really adds is the naming convention, ?default and ?graph.

Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-17 Thread Martynas Jusevičius
Is that an oversight in the GSP spec? I had done something similar (which I use as a low-level API): https://github.com/Graphity/graphity-core/blob/master/src/main/java/org/graphity/core/util/DataManager.java On Mon, Aug 17, 2015 at 10:16 PM, Andy Seaborne wrote: > On 17/08/15 20:26, Martynas J

Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-17 Thread Andy Seaborne
On 17/08/15 20:26, Martynas Jusevičius wrote: Andy, I have a related question. What if I have a Dataset at hand, not a Model - how do I send it to a remote Graph Store? The SPARQL Graph Store Protocol does not mention this. Fuseki supports REST-ish PUT/POST/GET on the dataset URL. Currentl

Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-17 Thread Martynas Jusevičius
Andy, I have a related question. What if I have a Dataset at hand, not a Model - how do I send it to a remote Graph Store? Martynas On Mon, Aug 17, 2015 at 9:19 PM, Andy Seaborne wrote: > DatasetAccessor > > This is the API to the SPARQL Graph Store Protocol. > > Model model = ... > DatasetAcce

Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-17 Thread Andy Seaborne
DatasetAccessor This is the API to the SPARQL Graph Store Protocol. Model model = ... DatasetAccessor acc = DatasetAccessorFactory.createHTTP ("http://.../datasets/data";) ; acc.add(model) ; // adds to existign data, if any. or acc.putModel(model) -- which overwrites existing data On

Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-17 Thread aj...@virginia.edu
There may be a better answer for this, but at the very least, you can serialize your triples/quads and use SPARQL Update to send them to your Fuseki instance. --- A. Soroka The University of Virginia Library On Aug 17, 2015, at 3:08 PM, Andy Doddington wrote: > > On 17 Aug 2015, at 19:50, An

Re: Can I save an in-memory Jena Model to a remote Fuseki-managed database?

2015-08-17 Thread Andy Doddington
On 17 Aug 2015, at 19:50, Andy Doddington wrote: Hoping the subject makes my query clear - since I am a total newbie in this area. I have created a tiny model, using ModelFactory.createDefaultModel() to create my initially empty model, which I then populate manually. So, having done this,