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] Is there a way to add/remove instances to/from imported ontologies in Protege 3.x?

Timothy Redmond tredmond at
Wed Mar 18 08:18:20 PDT 2009

You can change which ontology you are making changes to by "setting  
the active ontology".  In the metadata tab (usually the first tab on  
the left), there is a little pencil icon above the tree of  
ontologies.  Select the import that you want to edit and click the  
pencil.  If you succeed and you are using the latest Protege release,  
then you will see the metadata tab change its title to Metadata(active  
ontology).  Now your edits will apply to the active ontology and this  
is what will be saved.

In my opinion this is much less intuitive in Protege 3 than Protege  
4.  Protege 3 puts some arbitrary ("frame-like") constraints on what  
you can edit in your path.  I also find the fact that you see  
statements from the importing ontologies while editing the imported  
ontology difficult.  Protege 4 makes it very clear what you are  
editing and does not constrain your edits.


BTW - if you are trying to do this programatically then here is the  
code snippet:

         OWLModel owlModel = ont.getOWLModel();
         OWLOntology ont = ...;

         if (!ont.equals(OWLUtil.getActiveOntology(owlModel))) {
             TripleStoreModel tsm = owlModel.getTripleStoreModel();
             TripleStore tripleStore = tsm.getHomeTripleStore(ont);
             TripleStoreUtil.switchTripleStore(owlModel, tripleStore);

On Mar 18, 2009, at 7:02 AM, Erkin Eryol wrote:

> Dear Protege Developers,
> We have already set the imported ontologies as "not read-only". But
> still we cannot add new instances directly into the imported
> ontologies. Instead, it writes into the current ontology. Is there a
> way to tell Protege to which file or ontology to add a new instance
> to?
> We keep all instances of a particular class in a seperate owl file.
> Let's say "instances-of-class_A.owl". We have also a "schema_A.owl"
> containing the definiton of Class_A.
> Then we create another owl, "imports_both.owl", which imports both of
> these. When we try to add a new instance of class_A, it's stored in
> "imports_both.owl". But we want it to be stored in
> "instances-of-class_A.owl". Can we do that in Protege 3.x OWL-api?
> Soner-Erkin
> Orbim Corp.
> p.s: We work with owl 1.0.
> _______________________________________________
> protege-owl mailing list
> protege-owl at
> Instructions for unsubscribing:

More information about the protege-owl mailing list