On Mon, 2011-08-29 at 10:38 +0200, Mario Kofler wrote: > no, that is not really what i meant. let us assume that i talk about > two individuals (maybe the pizza example was not stated exactly > right): > > :NeapolitanPizza rdf:type :Pizza (Ontology A) > :NeapolitanPizza rdf:type :Pizza (Ontology B) > > while the first assertion is in ontology A and the second assertion is > in ontology B. In both ontologies i have different facts modeled about > the Neapolitan Pizza.
Are the namespaces the same? > For example it can be seen as in ontology A is stored which type of > meat goes on the pizza, and in ontology B all types of vegetables > that are typical for this pizza are stored. However, just both > representations together will give all the information that is > available about the individual "NeapolitanPizza". > > > NOTE: For the real implementation in my case it is necessary to keep > the two ontologies seperate due to performance reasons. Are you sure about that? If there is a performance problem it will be in the reasoning not the storage and if you are joining the information back together again for reasoning then nothing will have been saved by separating the storage. > In the implementation I have two separate TDB stores for the two > ontologies (A+B). If you mean literally two stores then you may find two graphs within the same store has less overhead. > Therefore, I need to programmatically assure the fact that the > NeapolitanPizza from TDB store A is the same as NeapolitanPizza from > TDB store B, meaning it just states some extra information about the > same individual. > > Does anyone have a suggestion about how to solve this programmatically > in Java code? First, please define what you mean by the two NeopolitanPizzas being the "same individual". If the URIs are the same then they are the same individual, QED. If the URIs are different then what are your criteria for identity? > I was thinking about creating a controller which accesses both > individuals and kind of masks the underlying two ontologies, so that > it looks as one single individual would be accessed. Then the > individuals in either ontology TDB representation are updated whenever > some fact changes. If those are two different representations from different ontological perspectives then you can't simply propagate changes back. > However, maybe there exists a more straightforward solution which is > more appropriate. I don't understand what you trying to achieve but it would seem easier to create a merged model into which you load the selected and mapped triples from each source. Dave
