W3C home > Mailing lists > Public > semantic-web@w3.org > July 2007

Re: Fwd: [Semantic_Web] Application using Jena: a design question

From: Leo Sauermann <leo@gnowsis.com>
Date: Thu, 12 Jul 2007 21:25:01 +0200
Message-ID: <4696800D.3080306@gnowsis.com>
To: Ioachim Drugus <sw@semanticsoft.net>
CC: Danny Ayers <danny.ayers@gmail.com>, SW-forum <semantic-web@w3.org>, "jena-dev@yahoogroups.com" <jena-dev@yahoogroups.com>, acamposr@gmail.com, semantic_web@googlegroups.com


> by sending an ontology (the XML file) that extends
> mine and defines an extra class. I will infer which individuals in my
> ontology belong to that class and return their URIs.

 From what I understand about the solution that Ioachim said, with 
Semantic Studio, you will probably have the same problems as with Jena, 
because you want to know the "difference" of what individuals where 
there before, and what individuals are now "new" because of the new XML.

tricky. If I where you, I would change the way the questions are asked, 
perhaps you have put too much on OWL, if you could express the questions 
using SPARQL construct queries and not OWL ontologies, you would be 
easier off.

You can add a new OWL ontology to the Jena reasoner and you can listen 
to the Jena InferenceModel and hear what it infers, works like this:

(this code is part of a hack in a nightmarish stack of 
Jena-infernce-on-top-of-sesame2alpha, so you probably won't understand 
it completly)

what this code does: it uses a Jena Inferencer and adds a statement 
listener to the Deductions Model. This works only with forward-chaining 
The inference engine will look at the added triples (your OWL XML file) 
and deduct new triples from this, they are added to the deductions 
model, which is a normal Jena model.
If you know the inside of this engine a little, you notice that it has 
multiple models, one with the facts, another with the deductions, and a 
third which is the union, for querying (and doing backward chaining)

BUT even with this hack, I doubt that the results will be always correct.

SO I understood you do this at the moment:
load the orgiginal OWL model, add the XML query, then use the inferred 
model to query for the instances, return their uris

why not stick with this? you could perhaps buffer some things in memory 
(the original OWL) and improve the setup with other tweaks.


It was Ioachim Drugus who said at the right time 11.07.2007 00:18 the 
following words:
> We gave up on Jena exactly due to such "cooperation" of in-memory 
> model and persistence layer.
> I am not aware if Jena resolved such issues.
> Anyway, we developed our own framework and, based on it, we built the 
> Semantic Studio and Semantic Server.
> Probably, with our tools, two solutions of the problem you described 
> are possible
> - You put everything in a semantic repository and do the work with 
> Semantic Server, which manages repositories and resources in 
> repositories and has a SPARQL processor, or
> - You load your ontology once in Semantic Studio (which based on its 
> inner model builds all possible presentations - N3, NTriples, RDF, 
> Graphic mode and Design Mode) and you run queries within Studio.
> (Semantic Studio can also save into a semantic repository)
> Of course, some code to automate the process would be needed. We can 
> talk on technicalities off-line.
> You might want to look at the short description of our tools below
> Ioachim
> Main Architect
> http://semanticsoft.net:8080/semanticwebtools.html
> Danny Ayers wrote:
>> [offhand I don't know the answer - forwarding to other lists, you
>> could also ask on IRC #jena or #swig on irc.freenode.net]
>> ---------- Forwarded message ----------
>> From: Alex <acamposr@gmail.com>
>> Date: 06-Jul-2007 12:58
>> Subject: [Semantic_Web] Application using Jena: a design question
>> To: Semantic Web <semantic_web@googlegroups.com>
>> Hello, I would like you to give me some advice about this situation. I
>> have got a big ontology with many many individuals. In my program, I
>> load that ontology in memory with a JenaOWLModel object. I want my
>> program to listen to some "queries". The way a remote computer can
>> send a query is by sending an ontology (the XML file) that extends
>> mine and defines an extra class. I will infer which individuals in my
>> ontology belong to that class and return their URIs.
>> My question is: which is the best way to design this? At the moment,
>> the only way I can figure out is by receiving the XML file, creating a
>> new JenaOWLModel and using a reasoner. But that could mean a very low
>> performance because every time I load a complete ontology again I will
>> have to load a lot of individuals. Am I right? Is there any way to
>> avoid loading all these individuals again and again?
>> Any suggestions?
>> Thank-you very much!
>> --~--~---------~--~----~------------~-------~--~----~
>> You received this message because you are subscribed to the Google
>> Groups "Semantic Web" group.
>> To post to this group, send email to semantic_web@googlegroups.com
>> To unsubscribe from this group, send email to
>> semantic_web-unsubscribe@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/semantic_web?hl=en
>> -~----------~----~----~----~------~----~------~--~---
Received on Thursday, 12 July 2007 19:27:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 07:41:58 UTC