how to display the class hierarchie using protege?

3 messages Options
Embed this post
Permalink
Saumi Bulathsinghe

how to display the class hierarchie using protege?

Reply Threaded More More options
Print post
Permalink
Hi all,

i want to display the class hierarchy in a a given owl file to the command prompt. How can i do this?

Can i used the methods that is used in Protege API class browser tab.
if so what r those methods and how to use those?

thanks in advance

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Thiranjith

Re: how to display the class hierarchie using protege?

Reply Threaded More More options
Print post
Permalink
Hi Saumi,

You can do something like this:

OWLModel owlModel = ... // code for loading theh owl model
       
        Collection<?> classes = owlModel.getUserDefinedOWLNamedClasses();
        for (Iterator<?> it = classes.iterator(); it.hasNext();) {
            OWLNamedClass cls = (OWLNamedClass) it.next();
            // try getInferredSubclasses(), getDirectSubclasses() etc on OWLNamedClass to get the sub-classes
            // call the method recursively
        }

Hope that gives you a starting point ...

Cheers,
Thira.

2009/7/4 Saumi Bulathsinghe <[hidden email]>
Hi all,

i want to display the class hierarchy in a a given owl file to the command prompt. How can i do this?

Can i used the methods that is used in Protege API class browser tab.
if so what r those methods and how to use those?

thanks in advance

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03



_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Saumi Bulathsinghe

Re: how to display the class hierarchie using protege?

Reply Threaded More More options
Print post
Permalink

thanks  Thirangith for your help. It helped me a lot.
_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03