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)

Hanno Wunderlich hannowun at googlemail.com
Thu Aug 27 09:28:16 PDT 2009


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");
   }

  .....
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20090827/9b467a60/attachment.html>


More information about the protege-discussion mailing list