Skip to content

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

@dlutz2

Description

@dlutz2

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ReproducedA problem that has been reproducedbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions