#288 RDF consumer removes base triples for annotated axioms.

closed
None
5
2012-10-10
2011-10-13
No

given axiom A and A', which are semantically equivalent and only differ on annotations, sometimes the API will drop the one without annotations.

The culprit appears to be at line 125 of TypeAxiomHandler:

if (!annotations.isEmpty()) {
OWLAxiom ax = getConsumer().getLastAddedAxiom();
getConsumer().applyChange(new RemoveAxiom(getConsumer().getOntology(), ax.getAxiomWithoutAnnotations()));
}

If A is read before A' and A has no annotations, A is removed from the axioms.
The ontology remains semantically equivalent but does not roundtrip properly.

Discussion

  • Matthew Horridge

    This is to do with the problem of serialising annotated axioms in RDF/XML. When an annotated axiom is serialised it is essentially reified in RDF and the annotations hang off the main node in the reification. As part of the serialisation it is a requirement to put the triples corresponding to the serialisation of the non-annotated axiom in the graph. When parsed out this means that there are two axioms, an annotated one and non-annotated one. The non-annotated one is therefore removed. Unfortunately, round tripping problems arise what ever solution is chosen as there is no way to distinguish the automatically added triples from manually added triples in this situation.

     
  • Matthew Horridge

    • summary: strange behaviour with annotations on axioms --> RDF consumer removes base triples for annotated axioms.
     
  • Ignazio Palmisano

    I see; in this case, the failure in the roundtripping test is actually a bug in the test. I will figure out how to fix the test.

     
  • Ignazio Palmisano

    • assigned_to: nobody --> ignazio1977
     
  • Ignazio Palmisano

    • status: open --> closed
     

Log in to post a comment.