A model holds exactly one graph. Perhaps you want to be using a dataset [1]?
--- A. Soroka The University of Virginia Library [1] https://www.w3.org/TR/rdf11-concepts/#section-dataset > On Feb 16, 2017, at 10:59 AM, Julien Plu > <julien....@redaction-developpez.com> wrote: > > Hello, > > I'm trying to make a SPARQL update query over a model, the problem is that > the query has to delete a triple belonging to a specific graph: > > PREFIX dc: <http://purl.org/dc/elements/1.1/> > DELETE { > GRAPH <http://3cixty.com/cotedazur/test> { > < > http://data.linkedevents.org/event/51f5ecc8-55b4-3a1b-98de-55e4448ab7bf> > dc:identifier ?o . > } > } WHERE { > GRAPH <http://3cixty.com/cotedazur/test> { > < > http://data.linkedevents.org/event/51f5ecc8-55b4-3a1b-98de-55e4448ab7bf> > dc:identifier ?o . > } > } > > which apparently has no effect when we proceed that way: > > Model model = RDFDataMgr.loadModel("file.ttl"); > UpdateAction.parseExecute(sparql_query, model); > > I suppose it is normal as I never created the graph in the model. > Nevertheless when I do: > > Model model = ModelFactory.createModelForGraph(new > SimpleGraphMaker().createGraph("http://3cixty.com/cotedazur/test")); > model.read("file.ttl"); > UpdateAction.parseExecute(sparql_query, model); > > It has no effect as well. Can someone guide me on how to do such thing > properly? > > Thanks in advance. > > Regards. > -- > Julien Plu > > PhD Student at Eurecom. > Personal webpage: http://jplu.developpez.com > FOAF file : http://jplu.developpez.com/julien > Email address : julien....@eurecom.fr && *plu.jul...@gmail.com > <plu.jul...@gmail.com>* > Phone : +33493008103 > Twitter : @julienplu