Search Mailing List Archives
[protege-discussion] Questions concernign the Changes Plug-in
tudorache at stanford.edu
Wed Apr 22 16:18:16 PDT 2009
Simon Paradies wrote:
> Hi Tania,
> Tania Tudorache <tudorache <at> stanford.edu> writes:
>> Hi Simon,
>> Yes, you can do both. You have full access to the annotations through
>> the CHAO API.
>> Take a look here:
>> For cloning the annotation, you can use the copy method from the Frame
>> interface. (It works for the RDF backend and frames)
>> Orphaned annotations are usually the top-level annotations that apply to
>> the entire ontology rather than to a particular entity. They show up in
>> the Ontology notes tab.
> Actually, what I want to make sure is that
> 1. certain annotations that belong to a certain instance are also cloned when
> the user makes a copy of that instance using the GUI.
> 2. annotations of removed instances are also removed when the user deletes the
> instance using the GUI.
The reference that I sent to the ChAO API does not have anything do to
with the GUI, it the API that the GUI uses to display the changes.
> 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.
> What I meant with orphaned annotations are annotations that are left in the
> annotation ontology when their corresponding entitiy (in the actual ontology)
> is deleted by any means.
Probably this makes sense in your use. We usually do not want to remove
any annotations, even if the instance is deleted because that is part of
the documentation of how the ontology evolved. The Change ontology will
also keep the deleted classes for the same reason.
> Is there a way to either have it deleted upon entitiy
> deletion or pruned some time afterwards?
Yes, see above.
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
More information about the protege-discussion