Search Mailing List Archives
[protege-owl] Best approach for incorporating meta information
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
> (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
There is a nice utility method for getting the active ontology:
But the method for setting it is a private method on ImportsTreePanel
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);
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