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] Best approach for incorporating meta information

Thomas Russ tar at ISI.EDU
Mon Feb 23 12:13:04 PST 2009


On Feb 16, 2009, at 8:32 AM, Paradies, Simon wrote:

> However, I would like Protégé to do the job of assigning unique  
> identifiers
> (with metaclass namespace). How can I accomplish this?
> Additionally, the created Instance gets stored in the importing  
> ontology owl
> file, regardless of its namespace. How can I tell Protégé to store  
> it in the
> meta ontology?

You would need to set the active ontology to the one where you want to  
have the instances stored.  It turns out I was just looking for this  
functionality myself.

There is a nice utility method for getting the active ontology:  
OWLUtil.getActiveOntology
But the method for setting it is a private method on ImportsTreePanel  
instead.

So that suggests trying the following, which I excerpted from  
ImportsTreePanel.setActiveOntology, based on the OWLOntology or  
OWLModel for your meta level ontology.

      // Starting with an OWLOntology object:
      OWLOntology ont = ...the meta ontology...
      OWLMOdel owlModel = ont.getOWLModel();

      // Starting with an OWLModel object:
      OWLModel owlModel = ...the meta model...
      OWLOntology ont = owlModel.getDefaultOntology();

      // Common code:
      TripleStoreModel tsm = owlModel.getTripleStoreModel();
      TripleStore tripleStore = tsm.getHomeTripleStore(ont);
      TripleStoreUtil.switchTripleStore(owlModel, tripleStore);

RFE:  It also suggests a request for enhancement to add methods  
setActiveOntology(OWLModel) and setActiveOntology(OWLOntology) to  
OWLUtil as well.





More information about the protege-owl mailing list