Fwd: Re: [protege-dev] Problem with events and database backing

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Fwd: Re: [protege-dev] Problem with events and database backing

clemens utschig

---------- Forwarded message ----------
From: clemens utschig <[hidden email]>
Date: Sunday, February 16, 2014
Subject: Fwd: Re: [protege-dev] [protege-discussion] Problem with events and database backing
To: Timothy Redmond <[hidden email]>

So, i got to the point of sneaking a kb under the protege app at runtime - pretty much a new constructor in project (using the code from the one with uri, and calling all the methods) and then projectmanager.getpm.setcurrentproject... Almost there, but now i really need your help - all the default widgets are working - but when i click on an instance within the instance widget the form does not show? ... If i use the default project constructor (with a string) and do the same thing - it does show up.. Unfortunately i cant debug into this with all the threads running around, so i really need some advice here - is there some other magic?

On Sunday, February 16, 2014, clemens utschig <[hidden email]> wrote:
> Hey timothy - first of all thanks a ton for the reply.
> Yes i am on version 3.5.. The problem is that i cant create a server project first as i use the ontology to configure a (remote) application on the fly - and want to use the protege app to do configuration on top of that - think of the ontology as a graph within a deployable server app. And i dont want to start messing with two servers (my own and its lifecyle and the protege one ;-)
> I'll try to tweak the protege app tmrw a little - and see if i can sneak a project instance underneath it on the fly (rather than it *owning* and opening a uri..)..
> If you have some other super smart idea, any help is appreciated...
> Cheers from germany, i actually studied at stanford during my time in san francisco ;-)  
> On Saturday, February 15, 2014, Timothy Redmond <[hidden email]> wrote:
>> Just in case you didn't see my reply.
>> -Timothy
>> -------- Original Message --------
>> Subject: Re: [protege-dev] [protege-discussion] Problem with events and database backing
>> Date: Sat, 15 Feb 2014 09:39:14 -0800
>> From: Timothy Redmond <[hidden email]>
>> Reply-To: [hidden email]
>> To: [hidden email], [hidden email]
>> I am a bit confused getting this message because I think that the new
>> lists are protege-users and protege-dev. So I am forwarded this message
>> to protege-dev just in case.
>> On 02/15/2014 07:23 AM, clemens utschig wrote:
>>> folks - this is rather urgent...
>>> I try to get the listener magic to work (e.g. new instance created,
>>> frame update, browser text changed) - between the protege application
>>> and and multiple api based consumers all using the same - database
>>> backed - project.
>>> It seems somehow events / listeners are not firing / generated by
>>> default?
>>> Any help much appreciated.
>> This is just a thought and may not be related to what you are
>> experiencing. I am assuming that you are talking about Protege 3
>> although -- even though the implementations are completely different --
>> the same comments apply to Protege 4 and 5.
>> If you create two separate Protege knowledge bases (e.g. separate java
>> objects) that point to the same database then you will have several
>> problems. These problems only occur when modifying the knowledge bases;
>> I think that things will work if all the callers are in read-only mode.
>> The most obvious problem is that changes in one Protege knowledge base
>> will only generate events in that knowledge base and not in the other
>> knowledge bases. A less obvious problem is that, in certain
>> circumstances, changes made with one knowledge base will not be seen in
>> other knowledge bases. There may be other problems as well.
>> If this is in fact your problem then there are two obvious fixes to the
>> problem. If everything is happening in a single JVM, then it is
>> possible that you can refactor your code so that all callers requesting
>> a knowledge base will get the same one. Maybe there would be a static
>> method or something that manages the process of getting the knowledge
>> base. Since the code will no longer be reentrant, you may need to also
>> add some synchronization.
>> If you have more than one JVM or there is some other reason why the
>> above solution is not practical then the other approach is to use a
>> Protege server. If you have several clients accessing the same server
>> all the events and other synchronization will be taken care of. This is
>> easier than it sounds and there is a wiki page telling you how to do this:
>> Protege 3 --

protege-discussion mailing list
[hidden email]

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03