-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ontology IRI is decoded incorrectly if annotation property subject and object use the ontology IRI #1181
Comments
This looks like a problem in the OWL API, upstream of Protégé. Minimal code to reproduce the problem outside of Protégé: import java.io.File;
import org.semanticweb.owlapi.apibinding.OWLManager;
import org.semanticweb.owlapi.model.OWLOntology;
import org.semanticweb.owlapi.model.OWLOntologyCreationException;
import org.semanticweb.owlapi.model.OWLOntologyManager;
public class Test {
public static void main(String[] args) {
OWLOntologyManager man = OWLManager.createConcurrentOWLOntologyManager();
try {
OWLOntology o = man.loadOntologyFromOntologyDocument(new File("sample.ttl"));
System.out.printf("Ontology ID: %s\n", ontology.getOntologyID().getOntologyIRI().orNull());
} catch (OWLOntologyCreationException e) {
e.printStackTrace();
}
}
} This yields the same result as what is shown in Protégé:
Running the same code on a sample file that does not contain the
|
The problem is not specifically caused by
|
Seems like an instance of an already reported bug: owlcs/owlapi#1080 |
Thanks for the info. I think I found the bug in owl api owlcs/owlapi#1080 (comment) I will wait for a follow up on the owl api project. |
Update: I have found the bug and made a pull request owlcs/owlapi#1117 In the meanwhile the PR can be used to manually build the owl api distribution. I also provide the jar file from CI/CD in case anyone else wants to test it in Protege v5.6.3 (i.e. owl api version 4.5.26) To test it just rename the jar file |
The PR I submitted has been accepted to the owlapi. This means that to fix this issue you can build the owlapi (branch version4) locally and replace the |
I just saw that the owlapi has been updated to v4.5.29 Will be waiting for the next release with bundled owlapi to test if the issue is now removed 👍 |
I have tested release 5.6.4 and can confirm that the bug is removed. |
I found out that if the ontology is annotated with
rdfs:isDefinedBy
with an IRI value equal to the ontology IRI then Protege Editor displays the ontology iri as if was the last imported ontology.How to reproduce
Open the file locally in protege
The text was updated successfully, but these errors were encountered: