owlcs / owlapi

OWL API main repository
821 stars 315 forks source link

Shortened IRIs in FunctionalSyntax #1089

Open rwynne opened 1 year ago

rwynne commented 1 year ago

I've a default prefix in my header Prefix(:=<http://.../>)

Instead of full blown IRIs serialized as "<http://..../xyz>" would like to see ":xyz" in the saved FunctionalSyntax.

Is there a method for this? Am using version 5.1.10.

Thanks!

ignazio1977 commented 1 year ago

This should work with code like this:

    FunctionalSyntaxDocumentFormat format = new FunctionalSyntaxDocumentFormat();
    format.setPrefix(":", "http://...");
    ontologyManager.setOntologyFormat(ontology, format);

And then proceed to save the ontology.