Search Mailing List Archives
[protege-owl] Import ontologies and Visibility
carmenmtezcruz at yahoo.es
Tue Jan 1 18:39:07 PST 2008
I have imported an ontology programmatically when I load my new tab plugin. And it works!, because I see the ontology in the metadata tab, but, I do not see the classes in the classes explorer. I only see them when I check the Display Hidden Frames checkbox. Then I can uncheck the same checkbox, but my imported ontology is still there (in grey). I have used the function owlModel.getProject().setDisplayHiddenClasses(true) in order to do the same; but it doesn't work, because it doesn't refresh the explorer. Only when I uncheck the checkbox the window is refreshed.
My question is; how can I put visible my imported ontology (in grey is perfect) without doing this check/uncheck action? Is there any function that let me refresh the classes explorer?.
And the last question is related to this problem because: My imported ontology is read only because I have imported using a real URI. Using Protege I can instantiate my imported ontology, and save the instances very well, but, programmatically, I can not instantiate the classes in the same way. For example, when I do:
(My tableClass is a metaclass, is subclass of owl:Class)
OWLNamedClass tableClass = owlModel.getOWLNamedClass("Table");
OWLIndividual individual = tableClass.createOWLIndividual("Table1");
As you know, Table1 must be a class too, because, is an instance of a metaclass. But, when I execute these instructions, Table1, is created (I can not see it due to the previous problem I have commented), but not as a class!!. When I make visible the imported ontology, I can see this instance, but only as an instance!!. However, it works perfect, if I do it manually. Can anyone explain that?
Isn´t protege interpreting the Table1 instance as a class?
Thanks a lot,
¿Chef por primera vez? - Sé un mejor Cocinillas.
Entra en Yahoo! Respuestas.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the protege-owl