Fwd: Re: [protege-dev] Problem with events and database backing
clemens utschig <[email protected]> Sun, 16 Feb 2014 21:48:09 +0100
| Newsgroups | gmane.comp.misc.ontology.protege.general |
|---|---|
| Message-ID | <CAHBV8m+s5Z8YdcQk9yKFgVgCc6jbaxBT2KQrpV95CQjws7Ye7Q@mail.gmail.com> |
--===============4316530665912211073== Content-Type: multipart/alternative; boundary=001a11351c9a26b9b904f28c28ee --001a11351c9a26b9b904f28c28ee Content-Type: text/plain; charset=ISO-8859-1 ---------- Forwarded message ---------- From: clemens utschig <[email protected]> Date: Sunday, February 16, 2014 Subject: Fwd: Re: [protege-dev] [protege-discussion] Problem with events and database backing To: Timothy Redmond <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 <[email protected]> >> Reply-To: [email protected] >> To: [email protected], [email protected] >> >> 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 -- --001a11351c9a26b9b904f28c28ee Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <br><br>---------- Forwarded message ----------<br>From: clemens utschig &l= t;<a href=3D"mailto:[email protected]">[email protected]</a= >><br>Date: Sunday, February 16, 2014<br>Subject: Fwd: Re: [protege-dev]= [protege-discussion] Problem with events and database backing<br> To: Timothy Redmond <<a href=3D"mailto:[email protected]">tredmond@s= tanford.edu</a>><br><br><br>So, i got to the point of sneaking a kb unde= r the protege app at runtime - pretty much a new constructor in project (us= ing the code from the one with uri, and calling all the methods) and then p= rojectmanager.getpm.setcurrentproject... Almost there, but now i really nee= d 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 th= e default project constructor (with a string) and do the same thing - it do= es show up.. Unfortunately i cant debug into this with all the threads runn= ing around, so i really need some advice here - is there some other magic?<= br> <br>On Sunday, February 16, 2014, clemens utschig <<a href=3D"mailto:cle= [email protected]">[email protected]</a>> wrote:<br>> He= y timothy - first of all thanks a ton for the reply.<br>><br>> Yes i = am on version 3.5.. The problem is that i cant create a server project firs= t as i use the ontology to configure a (remote) application on the fly - an= d 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 on= e ;-)<br> ><br>> 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..)..<br>><br>> If you have some other supe= r smart idea, any help is appreciated...<br> ><br>> Cheers from germany, i actually studied at stanford during my = time in san francisco ;-) =A0<br>><br>> On Saturday, February 15, 201= 4, Timothy Redmond <<a href=3D"mailto:[email protected]">tredmond@st= anford.edu</a>> wrote:<br> >><br>>> Just in case you didn't see my reply.<br>>><= br>>> -Timothy<br>>><br>>> -------- Original Message ----= ----<br>>> Subject: Re: [protege-dev] [protege-discussion] Problem wi= th events and database backing<br> >> Date: Sat, 15 Feb 2014 09:39:14 -0800<br>>> From: Timothy Re= dmond <<a href=3D"mailto:[email protected]">[email protected]</a= >><br>>> Reply-To: <a href=3D"mailto:[email protected]= u">[email protected]</a><br> >> To: <a href=3D"mailto:[email protected]">prote= [email protected]</a>, <a href=3D"mailto:[email protected]= tanford.edu">[email protected]</a><br>>><br>>> I a= m a bit confused getting this message because I think that the new<br> >> lists are protege-users and protege-dev. So I am forwarded this me= ssage<br>>> to protege-dev just in case.<br>>><br>>> On 0= 2/15/2014 07:23 AM, clemens utschig wrote:<br>>>> folks - this is = rather urgent...<br> >>> I try to get the listener magic to work (e.g. new instance cre= ated,<br>>>> frame update, browser text changed) - between the pro= tege application<br>>>> and and multiple api based consumers all u= sing the same - database<br> >>> backed - project.<br>>>><br>>>> It seems som= ehow events / listeners are not firing / generated by<br>>>> defau= lt?<br>>>><br>>>> Any help much appreciated.<br>>><= br> >> This is just a thought and may not be related to what you are<br>&= gt;> experiencing. I am assuming that you are talking about Protege 3<br= >>> although -- even though the implementations are completely differ= ent --<br> >> the same comments apply to Protege 4 and 5.<br>>><br>>>= ; If you create two separate Protege knowledge bases (e.g. separate java<br= >>> objects) that point to the same database then you will have sever= al<br> >> problems. These problems only occur when modifying the knowledge b= ases;<br>>> I think that things will work if all the callers are in r= ead-only mode.<br>>><br>>> The most obvious problem is that cha= nges in one Protege knowledge base<br> >> will only generate events in that knowledge base and not in the ot= her<br>>> knowledge bases. A less obvious problem is that, in certain= <br>>> circumstances, changes made with one knowledge base will not b= e seen in<br> >> other knowledge bases. There may be other problems as well.<br>>= ;><br>>> If this is in fact your problem then there are two obviou= s fixes to the<br>>> problem. If everything is happening in a single = JVM, then it is<br> >> possible that you can refactor your code so that all callers reque= sting<br>>> a knowledge base will get the same one. Maybe there would= be a static<br>>> method or something that manages the process of ge= tting the knowledge<br> >> base. Since the code will no longer be reentrant, you may need to = also<br>>> add some synchronization.<br>>><br>>> If you h= ave more than one JVM or there is some other reason why the<br>>> abo= ve solution is not practical then the other approach is to use a<br> >> Protege server. If you have several clients accessing the same ser= ver<br>>> all the events and other synchronization will be taken care= of. This is<br>>> easier than it sounds and there is a wiki page tel= ling you how to do this:<br> >><br>>> Protege 3 --<br> --001a11351c9a26b9b904f28c28ee-- --===============4316530665912211073== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ protege-discussion mailing list [email protected] https://mailman.stanford.edu/mailman/listinfo/protege-discussion Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 --===============4316530665912211073==--