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] how to pass parameters to listeners

Tania Tudorache tudorache at
Tue Oct 24 22:35:28 PDT 2006

Yes. The new code in SVN does that. If you are in multi-user mode, the 
getUserName() method will return the client name who triggered the 
event. Events triggered by different clients in the same server will 
return different names.

In standalone mode, it will return the application or system 

You can checkout the protege source code from our SVN repository, or 
wait until the next beta build to get this enhancement. The new methods 
have also a javadoc.


Robert Calin-Jageman wrote:
> This is helpful; we've actually been hijacking some of the code in the 
> ChangeManagement plugin to learn how to accomplish the logging we need.
> The problem, however, arises in a multi-user environment.  
> Specifically, we've written a web-based editing interface to allow 
> multiple users to work on the knowledgebase.  A single instance of the 
> knowledgebase is opened on the server, and users submit edits to it.  
> The change listener is attached to the knowledge base level.  When 
> events fire on it, it reports the server as the user.  We want to try 
> to pass an additional argument in the event to indicate the local user 
> who triggered the edit.  Is this possible?
> Thanks,
> Bob
> Tania Tudorache wrote:
>> In the current Protege, it is not possible to get the user name from 
>> an event.
>> We have added this capability now. There are two methods in 
>> AbstractEvent, getUserName() and getTimeStamp()
>> that you can call in order to get the user and timestamp information.
>> The code is already available in the SVN repository and it will 
>> integrated in the next beta build, which we will probably do this week.
>> Please consult the javadoc of these methods for more information.
>> We have a plugin for change management that probably does what you 
>> want. It is distributed with the full installation of Protege and is 
>> documented on our wiki:
>> Tania
>> field wrote:
>>> Hi everyone, thanks for reading my question.
>>> We have a web system built on protege. It has a function to enable 
>>> users to login the system and make changes to the knowledgebase. And 
>>> We are using listeners to automatically record all changes made to 
>>> the knowledgebase.
>>> Now I meet a problem. We want to store the modifor's name with each 
>>> change record. The modifor's name will be the user name at the 
>>> application level. But listeners are at the knowledgebase level. How 
>>> can I pass the user name from application level to the listeners?
>>> For example, when the value of a slot is changed, the method 
>>> ownSlotValueChanged(FrameEvent event) in FrameListener is triggered. 
>>> How can I pass the user name at application level into this method? 
>>> If I have to overwrite something, what is the best way to do it?
>>> Any help is appreciated!
>>> _______________________________________________
>>> protege-discussion mailing list
>>> protege-discussion at
>>> Instructions for unsubscribing: 
>> _______________________________________________
>> protege-discussion mailing list
>> protege-discussion at
>> Instructions for unsubscribing: 

More information about the protege-discussion mailing list