Reputation: 11
I am using OWLEntityRenamer to replace the IRIs in my ontology. For this purpose, I am using the human.owl ontology from OAEI. While OWLEntityRenamer effectively modifies IRIs containing the fragment/remainder "NCI_*" (the IRI containing this fragmanet may look like this: http://human.owl#NCI_C52809
), it is unable to replace IRIs that resemble this pattern:
http://www.geneontology.org/formats/oboInOwl#Definition
.
Unable to change the above IRI it throws a NullExceptionError that looks like this:
Exception in thread "main" java.lang.NullPointerException
at org.semanticweb.owlapi.util.OWLObjectDuplicator.visit(OWLObjectDuplicator.java:809)
at uk.ac.manchester.cs.owl.owlapi.OWLAnonymousIndividualImpl.accept(OWLAnonymousIndividualImpl.java:89)
at org.semanticweb.owlapi.util.OWLObjectDuplicator.visit(OWLObjectDuplicator.java:158)
at uk.ac.manchester.cs.owl.owlapi.OWLClassAssertionAxiomImpl.accept(OWLClassAssertionAxiomImpl.java:123)
at org.semanticweb.owlapi.util.OWLObjectDuplicator.duplicateObject(OWLObjectDuplicator.java:104)
at org.semanticweb.owlapi.util.OWLEntityRenamer.fillListWithTransformChanges(OWLEntityRenamer.java:185)
at org.semanticweb.owlapi.util.OWLEntityRenamer.changeIRI(OWLEntityRenamer.java:86)
....
I still don't understand why this error is happening. I suspect it may be related to the www.geneontology.org
namespace, but I'm uncertain.
Any insights or guidance on resolving this matter would be greatly appreciated.
P.S.
I simple call the OWLEntityRenamer like this:
changedClassesOntology1 = renamer.changeIRI(class1, capitalClass);
changedClassesOntology2 = renamer.changeIRI(class2, capitalClass);
where capitalClass are just unique IRIs I create using the code IRI.create(uniqueIRI)
.
Upvotes: 0
Views: 53