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-discussion] How can I get the last changed ontology?

Timothy Redmond tredmond at
Thu Nov 11 09:57:31 PST 2010

On 11/10/2010 05:38 AM, Daniele Bacarella wrote:
> Hi, after an ontology change, I need to do some checks on the last ontology.
> I tried using org.semanticweb.owl.model.OWLOntologyChange.getOntology where the
> javadoc says "Gets the ontology that the change is/was applied to", but it
> returns the current ontology.

I think that the method you are using to get the last changed ontology 
is correct. It is true that usually the last changed ontology will be 
the current ontology but not always.  I tested the following code in 
eclipse while making sure that I was editing an imported axiom and got 
the desired result:

    	for (org.semanticweb.owlapi.model.OWLOntologyChange change : changes) {
    		System.out.println("Ontology = " + change.getOntology());


> Also I looked at Set<org.semanticweb.owlapi.model.OWLOntology>
> getDirtyOntologies(), but since it is a set, there's no way to know the last
> ontology added.
> So I was wondering if there's any way to get it.
> Thanks for the help
> Daniele Bacarella
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at
> Instructions for unsubscribing:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the protege-discussion mailing list