On 09/01/15 19:47, Trevor Donaldson wrote:
Could I possible do this ?

For the adds, yes.


DatasetAccessor dataAccessor =
DatasetAccessorFactory.createHTTP("http//localhost:3030/ds");
Model model = dataAcessor.getModel();

OntModel ontmodel = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);
ontmodel.add(model);

//add, remove etc... do

dataAcessor.add(ontmodel);


// Default graph
dataAccessor.add(, Model data) ;

// Named graph
dataAccessor.add(String graphUri, Model data) ;

The DatasetAccessor reflects the structure of the dataset in the server.


Would this do what I want? This seems like overkill for what I need to
do. All I want to do is update a particular graph with new statements
or remove old statements.

Remove is the hard part if that includes blank nodes.

You need to find the blank node with a DELETE {} WHERE {} or it's short form DELETE WHERE {}.

        Andy





On Fri, Jan 9, 2015 at 1:32 PM, Martynas Jusevičius <[email protected]>
wrote:

Andy - builder code like this?

https://github.com/Graphity/graphity-client/blob/master/src/main/java/org/graphity/processor/update/InsertDataBuilder.java

It is based on SPIN though, not on Jena directly.

On Fri, Jan 9, 2015 at 6:49 PM, Andy Seaborne <[email protected]> wrote:
On 09/01/15 15:13, Trevor Donaldson wrote:

Hi all,

Is there a way to take a temp model and send the result to fuseki?

What I would like to accomplish :
1. Insert / delete triples in temp model
2. Send results (inserts and deletes) to fuseki to have it update the
named
graph

Is this possible or do I need to do build the sparql queries manually?
Thanks


DatasetAccessor (the SPARQL Graph Store Protocol) might be worth a look -
but it works on whole graphs so delete some triples out of a large graph
is
not something it can do.

Otherwise, building SPARQL is probably the way to go.  INSERT DATA,
DELETE
DATA if no

(Is there any builder code to help with this?  Seems like a good thing to
have to build INSERT DATA, DELETE DATA operations)

Trevor - does the data have bNodes in it?

         Andy

Looking further out ...

At a lower level, there is RDF Patch

http://afs.github.io/rdf-patch/

and some code in:
https://github.com/afs/jena-rdfpatch

through I have got sidetracked by a binary version of this based on

http://afs.github.io/rdf-thrift/




Reply via email to