Search Mailing List Archives
[protege-discussion] question about 'using protege forms in other appications'
Yun Lin
yun.lin2005 at gmail.com
Mon Mar 12 16:18:39 PDT 2007
Hi, Tania,
Thank you very much for the help. It works now. One more question: If I
would like to use the protege OWL ontology browser UI (e.g. browse OWL
Classes tree, and click a class to display its properties and constraints),
which classes I should instantiate? I only want to display the OWL ontology,
and choose the classes, but do not need to edit them.
Again, thanks a lot!
Yun
On 3/9/07, Tania Tudorache <tudorache at stanford.edu> wrote:
>
> Yun,
>
> You can use the following code to get an OWL classes tree panel and
> select a class from it:
>
>
> Collection rootClses =
> Collections.singleton(owlModel.getOWLNamedClass("Pizza"));
> SelectClassPanel panel = new SelectClassPanel(owlModel, rootClses,
> false, true);
>
> Collection clses = Collections.EMPTY_LIST;
> int result = ProtegeUI.getModalDialogFactory().showDialog(null, panel,
> "Test select classes", ModalDialogFactory.MODE_OK_CANCEL);
> if (result == ModalDialogFactory.OPTION_OK) {
> clses = panel.getSelection();
> }
>
> System.out.println("selected = " + clses);
>
>
> If you want to use only the OWL class tree component, you can create an
> instance of ClassTree and add it to your own GUI:
>
> The javadoc for ClassTree is here:
>
> http://protege.stanford.edu/download/release-javadoc-owl/edu/stanford/smi/protegex/owl/ui/cls/ClassTree.html
>
> Please ask in future OWL related questions only on the OWL mailing list.
>
> Thanks,
> Tania
>
>
>
> Yun Lin wrote:
> > Hi, Jens,
> > I tried a very simple OWL ontology in the Protege 3.2.1, but I did not
> > see any instance id of the frame in the window. I would like to show
> > the OWL Classes tree in my application. How can I do it?
> >
> > A simple ontology project is attached. Could you specify the ID for
> > the frame to show the OWL classes tree ?
> >
> > Yun
> >
> > On 3/8/07, *Jens Selbach* < Jens.Selbach at loyaltypartner.com
> > <mailto:Jens.Selbach at loyaltypartner.com>> wrote:
> >
> > Hi Yun,
> >
> > in protege frames you see instance id in the window header.
> > If you add slot :NAME to your class, you will also have this
> > instance id in the
> > instance form and may change it to anything you like als long as
> > it's a unique
> > identifier within your ontology.
> >
> > Regards,
> > Jens.
> >
> >
> ------------------------------------------------------------------------
> > *Von:* protege-discussion-bounces at lists.stanford.edu
> > <mailto:protege-discussion-bounces at lists.stanford.edu>
> > [mailto:protege-discussion-bounces at lists.stanford.edu
> > <mailto:protege-discussion-bounces at lists.stanford.edu>] *Im
> > Auftrag von *Yun Lin
> > *Gesendet:* Mittwoch, 7. März 2007 21:56
> > *An:* User support for Core Protege and the Protege-Frames
> editor
> > *Betreff:* Re: [protege-discussion] question about 'using
> > protege forms in other appications'
> >
> > Hi, Jennifer,
> > Thanks for the reply. Can you tell me where I can find the the
> > instance name like 'instance_00015'? I did not find it from
> > the Protege user interface.
> >
> > Kind Regards,
> > Yun
> >
> > On 3/7/07, *Jennifer Vendetti* <vendetti at stanford.edu
> > <mailto:vendetti at stanford.edu>> wrote:
> >
> > Hello Yun,
> >
> > Samson Tu wrote:
> > > I don't think the sample code on
> >
> http://protege.stanford.edu/doc/pdk/using_forms_in_other_applications.html
> > <
> http://protege.stanford.edu/doc/pdk/using_forms_in_other_applications.html
> >works
> > for OWL.
> > >
> >
> > Just a small correction. Tania tested the example code on
> > our Web site
> > yesterday that was originally written for Protege-Frames
> > ontologies and
> > confirmed that it does also work for Protege-OWL ontologies.
> >
> > In Protege, it is possible to view the underlying system
> > names for
> > instances via the user interface - they show up
> > automatically in the
> > Instances tab is you don't have a browser slot configured
> > for your class.
> >
> > Jennifer
> >
> >
> > _______________________________________________
> > protege-discussion mailing list
> > protege-discussion at lists.stanford.edu
> > <mailto:protege-discussion at lists.stanford.edu>
> > https://mailman.stanford.edu/mailman/listinfo/protege-discussion
> >
> > Instructions for unsubscribing:
> > http://protege.stanford.edu/doc/faq.html#01a.03
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > protege-discussion mailing list
> > protege-discussion at lists.stanford.edu
> > https://mailman.stanford.edu/mailman/listinfo/protege-discussion
> >
> > Instructions for unsubscribing:
> http://protege.stanford.edu/doc/faq.html#01a.03
> >
>
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing:
> http://protege.stanford.edu/doc/faq.html#01a.03
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20070313/46885a21/attachment.html>
More information about the protege-discussion
mailing list