Search Mailing List Archives
[protege-discussion] How to read a subclass of a particular class
Csongor Nyulas
csongor.nyulas at stanford.edu
Tue Aug 5 04:44:00 PDT 2008
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
>
More information about the protege-discussion
mailing list