On Tue, 2011-10-25 at 11:41 +0200, [email protected] wrote: 
> Hi,
> 
> I have a question regarding updating some data in a TDB store with  
> Jena. I spent some time searching on the web but did not found  
> anything that solves my problem.
> 
> My current situation is as follows:
> I have an arbitrary number of ontologies. Lets for this case assume I  
> have two ontologies A and B. I have both ontologies in one Jena model  
> and did store them in one TDB store.
> Now I want to update the TDB store if any of these ontologies changes.  
> For example I rename a class in ontology A. Now I want to store the  
> changes to the TDB.
> What I've achieved so far is that I can add the new data to the TDB  
> store but it also still contains the "old" class(name). How can I  
> update the TDB store to represent the current data in the ontologies,  
> if possible without deleting and re-creating the whole TDB store.

The easy way to do this is the store each ontology in a separate named
graph and set TDB to make the default graph be a union of the named
graphs.

That way you can delete the content of the named graph you are updating
(e.g. model.removeAll) then add the new data to that now empty graph.

Dave


Reply via email to