Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-discussion] Listening for FrameEvents and KnowledgebaseEvents on ProtegeServer (3.4)

Timothy Redmond tredmond at stanford.edu
Thu Aug 27 10:08:53 PDT 2009


I think that I know what is missing.  Event dispatch on the server is
sometimes non-optimal so we turn it off on the server by default.  Some
plugins do work that is unnecessary on the server.  What you need to do
to turn it on is a bit of code

   if (p.isMultiUserServer()) {
       ServerFrameStore.requestEventDispatch(p.getKnowledgeBase());
   }

This will tell the server that events need to be started for  this
knowledgebase.  There are several of our projects that do this bit of
code so as to run properly on the server.

-Timothy


On Thu, 2009-08-27 at 18:28 +0200, Hanno Wunderlich wrote:
> Hi,
> 
> i've written a small ProjectPlugin that listens for changes in the
> KnowledgeBase of a project and then writes a logfile about the
> changes. For local projects and RemoteClientProjects the plug-in works
> as expected. But now i had to modify the plugin to work on the server
> side. Without success. I am adding my EventListener in the same way as
> i did before. But no events were send to the listener.
> 
> Perhaps someone can tell me what i've to do to get this working on the
> ProtegeServer.
> 
> Greetings
> Hanno 
> 
> 
> My test code from the ProjectPlugin:
> 
> afterLoad(Project p){
>   MyListener l=new MyListener();
>   p.getKnowledgeBase().addFrameListener(l);
>   p.getKnowledgeBase().addKnowledgeBaseListener(l);
> }
> 
> My test code from MyListener.java
> 
> public MyListener implements FrameListener, KnowledgeBaseListener{
> 
>     //The important part from the FrameListener
>     public void ownSlotValueChanged(FrameEvent e){
>         System.out.println("Someone changed some slotvlaue");
>     }
> 
>    //The important part from the FrameListener
>    public void instanceCreated(KnowledgeBaseEvent e){
>       System.out.println("Someone created a new instance");
>    }
> 
>    public void deleteCreated(KnowledgeBaseEvent e){
>      System.out.println("Someone deleted an instance");
>    }
> 
>   .....
> }
> 
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
> 
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03




More information about the protege-discussion mailing list