[protege-owl] Accessing Current Project/Ontology in Protege OWL

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

[protege-owl] Accessing Current Project/Ontology in Protege OWL

David Corsar
Hi folks,

I have currently writing a Tab plug-in for Protege OWL.  How do I access
the project/ontology currently loaded in Protege-OWL and access its
OWLModel?  In old Protege, the following used to work

Project proj = ProjectManager.getProjectManager().getCurrentProject();

but obviously this will not give me access to the OWLModel, as its the
original Protege-OWL.

Thanks in advance for any help.

David Corsar

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

Reply | Threaded
Open this post in threaded view
|

[protege-owl] Re: Accessing Current Project/Ontology in Protege OWL

Tania Tudorache
David,

from a tab widget, you can call the getKnowledgeBase() method that
returns a KnowledgeBase object, which you can then cast to an OWLModel.
For example:

OWLModel tabOWLModel = (OWLModel) myTab.getKnowledgeBase();

The same with the Project. You can call prj.getKnowledgeBase() and cast
it to an OWLModel.

Tania



http://protege.stanford.edu/plugins/owl/api/guide.html

David Corsar wrote:

> Hi folks,
>
> I have currently writing a Tab plug-in for Protege OWL.  How do I
> access the project/ontology currently loaded in Protege-OWL and access
> its OWLModel?  In old Protege, the following used to work
>
> Project proj = ProjectManager.getProjectManager().getCurrentProject();
>
> but obviously this will not give me access to the OWLModel, as its the
> original Protege-OWL.
>
> Thanks in advance for any help.
>
> David Corsar
>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html
>
>

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