Examples of saveOntology()


Examples of org.semanticweb.owlapi.model.OWLOntologyManager.saveOntology()

        System.out.println(clazz);
        /* Add the closure axioms */
        closureAxioms.addClosureAxioms(clazz);
        /* Now save a copy to another location */
        System.out.println("Saving: " + outputDocumentIRI);
        manager.saveOntology(ontology, outputDocumentIRI);
        System.out.println("Ontology Saved...");
        System.out.println("Document IRI : " + outputDocumentIRI);
        /* Remove the ontology from the manager */
        manager.removeOntology(ontology);
        System.out.println("Done");
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.saveOntology()

                + manager.getOntologyFormat(ontology));
        /* Register the ontology storer with the manager */
        manager.getOntologyStorers().add(new TutorialSyntaxStorerFactory());
        /* Save using a different format */
        System.out.println("Storing     : " + outputDocumentIRI);
        manager.saveOntology(ontology, new OWLTutorialSyntaxOntologyFormat(),
                outputDocumentIRI);
        /* Remove the ontology from the manager */
        manager.removeOntology(ontology);
        System.out.println("Done");
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.saveOntology()

        // Create a new ontology in the test resources.
        OWLOntologyManager mgr = OWLOntologyManagerFactory.createOWLOntologyManager(null);
        OWLOntology o = mgr.createOntology(dummyiri);
        File f = new File(URI.create(url.toString() + "/dummycharacters.owl"));
        mgr.saveOntology(o, new WriterDocumentTarget(new FileWriter(f)));
        assertTrue(f.exists());

        ((AutoIRIMapper) mapper).update();
        // The old mapper should be able to locate the new ontology.
        assertFalse(dummyiri.equals(mapper.getDocumentIRI(dummyiri)));
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.saveOntology()

    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());
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.saveOntology()

             */

            if (mediaType.toString().equals(KRFormat.RDF_XML)) {

                try {
                    manager.saveOntology(ontology, new RDFXMLOntologyFormat(), out);
                } catch (OWLOntologyStorageException e) {
                    log.error("Failed to store ontology for rendering.", e);
                }
            } else if (mediaType.toString().equals(KRFormat.OWL_XML)) {
                try {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.saveOntology()

                } catch (OWLOntologyStorageException e) {
                    log.error("Failed to store ontology for rendering.", e);
                }
            } else if (mediaType.toString().equals(KRFormat.OWL_XML)) {
                try {
                    manager.saveOntology(ontology, new OWLXMLOntologyFormat(), out);
                } catch (OWLOntologyStorageException e) {
                    log.error("Failed to store ontology for rendering.", e);
                }
            } else if (mediaType.toString().equals(KRFormat.MANCHESTER_OWL)) {
                try {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.saveOntology()

                } catch (OWLOntologyStorageException e) {
                    log.error("Failed to store ontology for rendering.", e);
                }
            } else if (mediaType.toString().equals(KRFormat.MANCHESTER_OWL)) {
                try {
                    manager.saveOntology(ontology, new ManchesterOWLSyntaxOntologyFormat(), out);
                } catch (OWLOntologyStorageException e) {
                    log.error("Failed to store ontology for rendering.", e);
                }
            } else if (mediaType.toString().equals(KRFormat.FUNCTIONAL_OWL)) {
                try {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.saveOntology()

                } catch (OWLOntologyStorageException e) {
                    log.error("Failed to store ontology for rendering.", e);
                }
            } else if (mediaType.toString().equals(KRFormat.FUNCTIONAL_OWL)) {
                try {
                    manager.saveOntology(ontology, new OWLFunctionalSyntaxOntologyFormat(), out);
                } catch (OWLOntologyStorageException e) {
                    log.error("Failed to store ontology for rendering.", e);
                }
            } else if (mediaType.toString().equals(KRFormat.TURTLE)) {
                try {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.saveOntology()

                } catch (OWLOntologyStorageException e) {
                    log.error("Failed to store ontology for rendering.", e);
                }
            } else if (mediaType.toString().equals(KRFormat.TURTLE)) {
                try {
                    manager.saveOntology(ontology, new TurtleOntologyFormat(), out);
                } catch (OWLOntologyStorageException e) {
                    log.error("Failed to store ontology for rendering.", e);
                }
            } else if (mediaType.toString().equals(KRFormat.RDF_JSON)) {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.saveOntology()

                 */
   
                if (mediaType.toString().equals(KRFormat.RDF_XML)) {
   
                    try {
                        manager.saveOntology(ontology, new RDFXMLOntologyFormat(), out);
                    } catch (OWLOntologyStorageException e) {
                        log.error("Failed to store ontology for rendering.", e);
                    }
                } else if (mediaType.toString().equals(KRFormat.OWL_XML)) {
                    try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.