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] Questions concernign the Changes Plug-in

Simon Paradies simon.paradies.ext at siemens.com
Fri Apr 24 04:30:56 PDT 2009


Hi Tania,

> > My problem with your suggestions is that my code is not aware of user/gui 
> > triggered instance cloning events. Possibly, some kind of listener would be 
> > useful here but I haven't found any. Any hints to solve this issue?
> >   
> 
> You can add listener on the KB and when an instance is removed, you 
> check using the ChAO API if it has annotations. If it does, you get the 
> wrapped protege instance and delete it.

Yes, that works quite fine for deleting instances, thanks for the hint.
I could also define a listener that is triggered when instances are added. In 
case of cloning however, I do not get to know the original instance as there is 
no reference to it in the event parameter of the listener's individualCreated() 
method. Would it be possible to change the code such that in case of cloning, 
the original element is also referenced by the event object? Argument2 and 
Argument3 are null at the moment and could be used for that purpose. Or, would 
it break something? 

Thanks
Simon




More information about the protege-discussion mailing list