Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] Question for Protege-OWL API

Luis Ramos luisenrique77 at cantv.net
Fri Apr 2 22:22:27 PDT 2010


Hi Rita. 

I had a problem similiar to yours, because I am working in a Plug  in the
same way. Finally after reading some examples I got it working so:

KnowledgeBase KB = getKnowledgeBase();
		OWLModel model = (OWLModel)KB;
			Collection classes = model.getRDFSClasses();//Here (with an iterator) I
verified that all my classes are in the model

I did this with Protege 3.4.4. From the "model" I can get all the
information that I need and this "model" is gotten from a OWLfile in
runtime. 

Bye

Luis Ramos
----------- Mensaje Original --------------

De: Rita Marnau [rma at informatik.uni-kiel.de]
Para: protege-owl at mailman.stanford.edu [protege-owl at mailman.stanford.edu]
Cc: 
Asunto: [protege-owl] Question for Protege-OWL API
Fecha: 02/04/2010 12:07:49
Mensaje:

Hi,

I am developing a Protege tab plugin. Here for I create a new owl model, 
which imports the actual project owl model.
I try to make the import with the ImportHelper. But to use the addImport 
method, I have to know the uri of the model I want to import. How can I 
get the uri of the current project model?

Here is an example code:

   private OWLModel createMetaVerificationOWLModel(OWLModel 
projectOwlModel){
         OWLModel metaModel = null;
         try {
             metaModel = ProtegeOWL.createJenaOWLModel();   //the new model
             ImportHelper importHelper = new ImportHelper(metaModel);
             String uriOfProjectOwlModel = ?????   // the uri of the 
project owl model
              importHelper.addImport(uriOfProjectOwlModel);
         } catch (OntologyLoadException e) { ..}
         return metaModel;
     }

Thanks a lot for help.

Rita

_______________________________________________
protege-owl mailing list
protege-owl at lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-owl

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





More information about the protege-owl mailing list