owlcs/owlapi

Patch for 4.5.x w.r.t #892?

Closed this issue · 4 comments

This commit seems to be part of the resolution for #892. It is correctly present in the 5.x releases, but could not find it in the 4.x releases, although the changelog of 4.5.15 does speak about resolving #892 in the same way as the changelog of 5.1.13 does.

In particular, in the class tools/src/main/java/org/semanticweb/owlapi6/utility/OWLEntityRenamer.java the following method

public List<OWLOntologyChange> changeIRI(IRI iri, IRI newIRI)

seems to instantiatiate the OWLObjectDuplicator as

OWLObjectDuplicator dup = new OWLObjectDuplicator(m, uriMap);

instead of

OWLObjectDuplicator dup = new OWLObjectDuplicator(m, uriMap, new RemappingIndividualProvider(false, m.getOWLDataFactory()));

which seems to be causing e.g. this problem.

In version 4 the relevant commits are
ece4475
c9817d3

Looks like the fix was made first in version 4 and then cherry picked to version 5, but the patch sets are not identical. There are two instantiations of RemappingIndividualProvider in version 4 OWLEntityRenamer but three in version 5 and 6.

One of the OWLObjectDuplicator constructs leaves the anon remapper null.

@ignazio1977 thanks for the comment - what sort of resolution has this issue then? Do you consider it a bug in 4.5.x? Shall another ticket be created for it?

@psiotwo it's a bug in version 4, I've fixed it, pushed the fix under #892. You should be able to see it at the top of the version4 branch.

I'll be doing a release shortly once I've sorted out a few more open issues.