Search Mailing List Archives
[protege-discussion] How to read a subclass of a particular class
Vivek Anandan
rvivekanandan at gmail.com
Tue Aug 5 20:21:16 PDT 2008
Thank you Csongor, it is working for me
On Tue, Aug 5, 2008 at 5:14 PM, Csongor Nyulas
<csongor.nyulas at stanford.edu>wrote:
> Hi Vivek,
>
> If you are working with Protege-Frames:
>
> //KnowledgeBase kb = init KB;
> Cls c1 = kb.getCls(className);
> c1.getSubclasses();
>
> If you are working with Protege-OWL:
>
> //OWLModel owlModel = init OWL model
> OWLNamedClass c2 = owlModel.getOWLNamedClass(className);
> c2.getSubclasses(true); //or 'false' if you want only the
> direct subclasses
>
> Csongor
>
> Vivek Anandan wrote:
> >
> > Hi i am new to protege.
> >
> > I have a query.
> >
> > Using JAVA how i can read a subclass of a particular class that is
> > developed using protege
> >
> > Say in the following example i want to access boy and men subclasses
> > of male class
> >
> > <Person>
> >
> > <Male>
> >
> > <boy></boy>
> >
> > <Men></Men>
> >
> > </Male>
> >
> > </Person>
> >
> > Thanks in advance
> > --
> > Regards,
> > Vivekanandan Ramachandran.
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > 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
>
--
Regards,
Vivekanandan Ramachandran.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20080806/0067b44f/attachment.html>
More information about the protege-discussion
mailing list