Search in sources :

Example 1 with StringDocumentTarget

use of org.semanticweb.owlapi.io.StringDocumentTarget in project stanbol by apache.

the class OntologyImportUtils method printOntology.

@Deprecated
public static void printOntology(OWLOntology o, PrintStream printer) {
    OWLOntologyManager mgr = OWLManager.createOWLOntologyManager();
    StringDocumentTarget tgt = new StringDocumentTarget();
    try {
        mgr.saveOntology(o, new RDFXMLOntologyFormat(), tgt);
    } catch (OWLOntologyStorageException e) {
        e.printStackTrace(printer);
    }
    printer.println(tgt.toString());
}
Also used : OWLOntologyManager(org.semanticweb.owlapi.model.OWLOntologyManager) RDFXMLOntologyFormat(org.semanticweb.owlapi.io.RDFXMLOntologyFormat) StringDocumentTarget(org.semanticweb.owlapi.io.StringDocumentTarget) OWLOntologyStorageException(org.semanticweb.owlapi.model.OWLOntologyStorageException)

Aggregations

RDFXMLOntologyFormat (org.semanticweb.owlapi.io.RDFXMLOntologyFormat)1 StringDocumentTarget (org.semanticweb.owlapi.io.StringDocumentTarget)1 OWLOntologyManager (org.semanticweb.owlapi.model.OWLOntologyManager)1 OWLOntologyStorageException (org.semanticweb.owlapi.model.OWLOntologyStorageException)1