Search Mailing List Archives
[protege-discussion] How can I get the last changed ontology?
Timothy Redmond
tredmond at stanford.edu
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());
}
}
-Timothy
> 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 lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20101111/367d2b4a/attachment.html>
More information about the protege-discussion
mailing list