How to listen to ontology changes via OWLAPI

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to listen to ontology changes via OWLAPI

Hermann Singer
Hello

I would like to implement a daemon using the OWLAPI (ideally version 5, but I am willing to downgrade) that checks for changes in my ontology.

However, the changes will be done via the Protege Desktop Editor (I use version 5.5.0-beta-7), so I have the following questions:

1. How can my daemon get access to the same ontology instance as the one that I am editing via the Protege Editor? Since if I load an ontology via the Protege Editor and the daemon / OWLAPI from the same file, they each create their own ontology instance, but I want both the Protege Editor and my daemon to point to the same ontology instance.

2. Is there a method in the OWLAPI that notifies me if and what changes have been made to an ontology of interest? Since even if question 1 is resolved, I wouldn’t know how my daemon can get notified about what changes have been made via the Protege Editor.

Thank you in advance!
_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to listen to ontology changes via OWLAPI

M. Vreijling
1. I would expect that this can be done by creating a plugin that listens to the ontology changes and creates a connection to your external software (daemon).
2. This  would be the modelManager.addOntologyChangeListener(listener) assuming that the ontology of interest is the current active ontology.

Hope this helps,

/Mark

On Tue, 29 Jan 2019 at 09:19, Hermann Singer <[hidden email]> wrote:
Hello

I would like to implement a daemon using the OWLAPI (ideally version 5, but I am willing to downgrade) that checks for changes in my ontology.

However, the changes will be done via the Protege Desktop Editor (I use version 5.5.0-beta-7), so I have the following questions:

1. How can my daemon get access to the same ontology instance as the one that I am editing via the Protege Editor? Since if I load an ontology via the Protege Editor and the daemon / OWLAPI from the same file, they each create their own ontology instance, but I want both the Protege Editor and my daemon to point to the same ontology instance.

2. Is there a method in the OWLAPI that notifies me if and what changes have been made to an ontology of interest? Since even if question 1 is resolved, I wouldn’t know how my daemon can get notified about what changes have been made via the Protege Editor.

Thank you in advance!
_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev

_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev