One month ago I was finishing my contribution to a paper and I had to include some of the axioms defined in the ontology we designed. I knew DL-syntax but I did not want to spent time to rewrite the entire ontology (in RDF/XML format) from the scratch so I decided to look for a method or conversion tool (preferably on-line) to serialize a DL ontology using this syntax. I was surprised that most of the tools do not have support to this feature (on the best of my knowledge) but I went into the OWL-API (version 3.2.4) documentation and source code and I finally found a class, coded by Matthew Horridge, in which the load and serialization of ontologies were explained. After that I was checking more documentation about some packages for serialization and I could customize the previous code to get a DL-syntax serialization of the ontology.
... OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); OWLOntology localOntology = manager.loadOntologyFromOntologyDocument(file); OWLOntologyFormat format = manager.getOntologyFormat(localOntology); DLSyntaxOntologyFormat dlFormat = new DLSyntaxOntologyFormat(); DLSyntaxOntologyStorer storer = new DLSyntaxOntologyStorer(); //IRI documentIRI: file to save the DL version if (storer.canStoreOntology(dlFormat)){ storer.storeOntology(manager, localOntology, documentIRI, dlFormat); } ...
It is just a code snippet…but I spent some time to get a representation of an OWL ontology in DL-syntax when I thought that it was trivial!
Finally, these are the tools I checked:
- OWL Syntax Converter
- RDF Validator and Converter
- RDF Validation Service at W3C
- Wonderweb OWL Validator (maybe the first online from 2003?)
- Plugins of Protégé such as OWL Viz and Ontograf