[protege-owl] visualization of OWL ontologies on Protege

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

[protege-owl] visualization of OWL ontologies on Protege

Fabio Sirocchi
Dear community,
I am developing a plugin over the OWL-plugin. I load and save ontologies.
I also added an observer that triggers my actions when the model changes.

But everything happens without having the loaded ontology visualized in
Protege. I hoped that using observers I cound obtain that, instead the
trigger, yes, starts if I change the model from the Java code; but I
would like to visualize the fresh loaded ontology.
Do you have any idea or hints?
Thank you so much
 Fabio Sirocchi


-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

[protege-owl] Re: visualization of OWL ontologies on Protege

Matthew Horridge
Hi Fabio,

> Dear community,
> I am developing a plugin over the OWL-plugin. I load and save  
> ontologies.

> I also added an observer that triggers my actions when the model  
> changes.
>
> But everything happens without having the loaded ontology  
> visualized in Protege. I hoped that using observers I cound obtain  
> that, instead the trigger, yes, starts if I change the model from  
> the Java code; but I would like to visualize the fresh loaded  
> ontology.
> Do you have any idea or hints?

It sounds like you are just using the OWL-API.  You can attach  
various listeners such as class listeners, resource listeners,  
property listeners to find out when changes occur.  If you want some  
examples, I suggest that you take a look at some of the UI components  
in the protege-owl source code.

Cheers,

Matthew


-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

[protege-owl] Re: visualization of OWL ontologies on Protege

Fabio Sirocchi
Yes I use the OWL-API.
For the moment I used listeners but I had them only to react at
programmatical changes of the model, as I cannot get the loaded model to
be visualized in the Protege UI (in the Asserted hierarchy for example).
So when I load an ontology, the Protege UI remains unchanged, empty,
although the ontology has a content.
 Fabio


Matthew Horridge wrote:

> Hi Fabio,
>
>> Dear community,
>> I am developing a plugin over the OWL-plugin. I load and save  
>> ontologies.
>
>
>> I also added an observer that triggers my actions when the model  
>> changes.
>>
>> But everything happens without having the loaded ontology  visualized
>> in Protege. I hoped that using observers I cound obtain  that,
>> instead the trigger, yes, starts if I change the model from  the Java
>> code; but I would like to visualize the fresh loaded  ontology.
>> Do you have any idea or hints?
>
>
> It sounds like you are just using the OWL-API.  You can attach  
> various listeners such as class listeners, resource listeners,  
> property listeners to find out when changes occur.  If you want some  
> examples, I suggest that you take a look at some of the UI components  
> in the protege-owl source code.
>
> Cheers,
>
> Matthew
>
>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

[protege-owl] Re: visualization of OWL ontologies on Protege

Nick Drummond
Fabio,

If you need the protege UI, why not load the ontology in by hand and
implement a project plugin [1] or tab plugin [2] to do the extra things
you need.

In this way, the UI will always display the state of the model you have
in memory - as the components already listen to changes in the model.

Nick

[1] http://protege.stanford.edu/doc/pdk/plugins/project_plugin.html
[2] http://protege.stanford.edu/doc/pdk/plugins/tab_widget.html

Fabio Sirocchi wrote:

> Yes I use the OWL-API.
> For the moment I used listeners but I had them only to react at
> programmatical changes of the model, as I cannot get the loaded model
> to be visualized in the Protege UI (in the Asserted hierarchy for
> example). So when I load an ontology, the Protege UI remains
> unchanged, empty, although the ontology has a content.
> Fabio
>
>
> Matthew Horridge wrote:
>
>> Hi Fabio,
>>
>>> Dear community,
>>> I am developing a plugin over the OWL-plugin. I load and save  
>>> ontologies.
>>
>>
>>
>>> I also added an observer that triggers my actions when the model  
>>> changes.
>>>
>>> But everything happens without having the loaded ontology  
>>> visualized in Protege. I hoped that using observers I cound obtain  
>>> that, instead the trigger, yes, starts if I change the model from  
>>> the Java code; but I would like to visualize the fresh loaded  
>>> ontology.
>>> Do you have any idea or hints?
>>
>>
>>
>> It sounds like you are just using the OWL-API.  You can attach  
>> various listeners such as class listeners, resource listeners,  
>> property listeners to find out when changes occur.  If you want some  
>> examples, I suggest that you take a look at some of the UI
>> components  in the protege-owl source code.
>>
>> Cheers,
>>
>> Matthew
>>
>>
>> -------------------------------------------------------------------------
>>
>> To unsubscribe go to
>> http://protege.stanford.edu/community/subscribe.html
>>
>>
>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>

--

Nick Drummond

http://www.cs.man.ac.uk/~drummond/ <http://www.cs.man.ac.uk/%7Edrummond/>
-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

[protege-owl] Re: visualization of OWL ontologies on Protege

Fabio Sirocchi
Ok I'll try this but actually I do need to load ontologies from the
plugin as they are actually created by the plugin.
I still have to figure out if there is a convenient simple method for
having Protege to display this new ontology or if I have to access every
single part of ProtegeUI and refresh every widget after I perform a
programmatical scan of the loaded ontology.
Thank you anyway
 Fabio


Nick Drummond wrote:

> Fabio,
>
> If you need the protege UI, why not load the ontology in by hand and
> implement a project plugin [1] or tab plugin [2] to do the extra
> things you need.
>
> In this way, the UI will always display the state of the model you
> have in memory - as the components already listen to changes in the
> model.
>
> Nick
>
> [1] http://protege.stanford.edu/doc/pdk/plugins/project_plugin.html
> [2] http://protege.stanford.edu/doc/pdk/plugins/tab_widget.html
>
> Fabio Sirocchi wrote:
>
>> Yes I use the OWL-API.
>> For the moment I used listeners but I had them only to react at
>> programmatical changes of the model, as I cannot get the loaded model
>> to be visualized in the Protege UI (in the Asserted hierarchy for
>> example). So when I load an ontology, the Protege UI remains
>> unchanged, empty, although the ontology has a content.
>> Fabio
>>
>>
>> Matthew Horridge wrote:
>>
>>> Hi Fabio,
>>>
>>>> Dear community,
>>>> I am developing a plugin over the OWL-plugin. I load and save  
>>>> ontologies.
>>>
>>>
>>>
>>>
>>>> I also added an observer that triggers my actions when the model  
>>>> changes.
>>>>
>>>> But everything happens without having the loaded ontology  
>>>> visualized in Protege. I hoped that using observers I cound obtain  
>>>> that, instead the trigger, yes, starts if I change the model from  
>>>> the Java code; but I would like to visualize the fresh loaded  
>>>> ontology.
>>>> Do you have any idea or hints?
>>>
>>>
>>>
>>>
>>> It sounds like you are just using the OWL-API.  You can attach  
>>> various listeners such as class listeners, resource listeners,  
>>> property listeners to find out when changes occur.  If you want
>>> some  examples, I suggest that you take a look at some of the UI
>>> components  in the protege-owl source code.
>>>
>>> Cheers,
>>>
>>> Matthew
>>>
>>>
>>> -------------------------------------------------------------------------
>>>
>>> To unsubscribe go to
>>> http://protege.stanford.edu/community/subscribe.html
>>>
>>>
>>
>> -------------------------------------------------------------------------
>>
>> To unsubscribe go to
>> http://protege.stanford.edu/community/subscribe.html
>>
>>
>

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

Re: visualization of OWL ontologies on Protege

Nick Drummond
Fabio

I'm still not clear what you are actually doing.
All of the standard components listen to the underlying model and should
update automatically.
There is a method OWLModel.setGeneratateEventsEnabled() that turns this
off, but it should be on by default.
If you have written your own components then you can register them with
OWLModel.addModelListener() and update when necessary.

Nick


Fabio Sirocchi wrote:

> Ok I'll try this but actually I do need to load ontologies from the
> plugin as they are actually created by the plugin.
> I still have to figure out if there is a convenient simple method for
> having Protege to display this new ontology or if I have to access
> every single part of ProtegeUI and refresh every widget after I
> perform a programmatical scan of the loaded ontology.
> Thank you anyway
> Fabio
>
>
> Nick Drummond wrote:
>
>> Fabio,
>>
>> If you need the protege UI, why not load the ontology in by hand and
>> implement a project plugin [1] or tab plugin [2] to do the extra
>> things you need.
>>
>> In this way, the UI will always display the state of the model you
>> have in memory - as the components already listen to changes in the
>> model.
>>
>> Nick
>>
>> [1] http://protege.stanford.edu/doc/pdk/plugins/project_plugin.html
>> [2] http://protege.stanford.edu/doc/pdk/plugins/tab_widget.html
>>
>> Fabio Sirocchi wrote:
>>
>>> Yes I use the OWL-API.
>>> For the moment I used listeners but I had them only to react at
>>> programmatical changes of the model, as I cannot get the loaded
>>> model to be visualized in the Protege UI (in the Asserted hierarchy
>>> for example). So when I load an ontology, the Protege UI remains
>>> unchanged, empty, although the ontology has a content.
>>> Fabio
>>>
>>>
>>> Matthew Horridge wrote:
>>>
>>>> Hi Fabio,
>>>>
>>>>> Dear community,
>>>>> I am developing a plugin over the OWL-plugin. I load and save  
>>>>> ontologies.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> I also added an observer that triggers my actions when the model  
>>>>> changes.
>>>>>
>>>>> But everything happens without having the loaded ontology  
>>>>> visualized in Protege. I hoped that using observers I cound
>>>>> obtain  that, instead the trigger, yes, starts if I change the
>>>>> model from  the Java code; but I would like to visualize the fresh
>>>>> loaded  ontology.
>>>>> Do you have any idea or hints?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> It sounds like you are just using the OWL-API.  You can attach  
>>>> various listeners such as class listeners, resource listeners,  
>>>> property listeners to find out when changes occur.  If you want
>>>> some  examples, I suggest that you take a look at some of the UI
>>>> components  in the protege-owl source code.
>>>>
>>>> Cheers,
>>>>
>>>> Matthew
>>>>
>>>>
>>>> -------------------------------------------------------------------------
>>>>
>>>> To unsubscribe go to
>>>> http://protege.stanford.edu/community/subscribe.html
>>>>
>>>>
>>>
>>> -------------------------------------------------------------------------
>>>
>>> To unsubscribe go to
>>> http://protege.stanford.edu/community/subscribe.html
>>>
>>>
>>
>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>

--

Nick Drummond

http://www.cs.man.ac.uk/~drummond/ <http://www.cs.man.ac.uk/%7Edrummond/>
-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html