Skip to content
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

Protege 5.6.3 writes but cannot read an empty Manchester ontology #52

Open
dlutz2 opened this issue May 26, 2024 · 0 comments
Open

Protege 5.6.3 writes but cannot read an empty Manchester ontology #52

dlutz2 opened this issue May 26, 2024 · 0 comments
Labels
bug Reproduced A problem that has been reproduced

Comments

@dlutz2
Copy link

dlutz2 commented May 26, 2024

Saving a empty ontology (no axioms, ontology-level annotations or imports) in Manchester format produces what appears to be a valid (?) Manchester ontology file, consisting of a set of prefixes and a single statement of the form Ontology: <IRI> When attempting to read this back, Protege throws:
java.net.URISyntaxException: Illegal character in path at index 72: http://www.semanticweb.org/zzz/ontologies/2024/4/untitled-ontology-66/|EOF|
and nothing is read in.
The exception originates in OntologyIRIShortFormProvider:

at java.base/java.net.URI.create(URI.java:883) ~[na:na]
	at org.semanticweb.owlapi.model.IRI.toURI(IRI.java:60) ~[na:na]
	at org.semanticweb.owlapi.util.OntologyIRIShortFormProvider.getShortForm(OntologyIRIShortFormProvider.java:87) ~[na:na]
	at org.protege.editor.owl.ui.renderer.OWLObjectRendererImpl.renderOntology(OWLObjectRendererImpl.java:79) ~[na:na]
       ...

but is presumably caused by the Manchester parser passing a malformed IRI.
Similarly, a Manchester ontology containing only an import statement, produces:

java.lang.NullPointerException: null
	at java.base/java.util.concurrent.ConcurrentHashMap.containsValue(ConcurrentHashMap.java:979) ~[na:na]
	at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.contains(OWLOntologyManagerImpl.java:311) ~[na:na]
	at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.getOntologyDocumentIRI(OWLOntologyManagerImpl.java:1426) ~[na:na]
	at org.protege.editor.owl.model.OWLModelManagerImpl.getOntologyPhysicalURI(OWLModelManagerImpl.java:423) ~[na:na]
	at org.protege.editor.owl.model.idrange.ActiveOntologyIdRangesPolicyManager.reload(ActiveOntologyIdRangesPolicyManager.java:64) ~[na:na]
...

An ontology containing just an ontology-level annotation works as expected.

Admittedly not a main stream issue. It occurred during a test of a pipeline that creates Manchester content offline which might include empty ontologies.

@gouttegd gouttegd added bug Reproduced A problem that has been reproduced labels May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproduced A problem that has been reproduced
Projects
None yet
Development

No branches or pull requests

2 participants