Examples of saveOntology()


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

        InferredOntologyGenerator iog = new InferredOntologyGenerator(reasoner,
                gens);
        iog.fillOntology(man.getOWLDataFactory(), infOnt);
        // Save the inferred ontology. (Replace the URI with one that is
        // appropriate for your setup)
        man.saveOntology(infOnt, new StringDocumentTarget());
    }

    /**
     * This example shows how to merge to ontologies (by simply combining axioms
     * from one ontology into another ontology).
View Full Code Here

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

        // + (mod.getAxiomCount() - mod.getLogicalAxiomCount())
        // + " other axioms");
        // And we save the module.
        // System.out.println("Saving the module as "
        // + mod.getOntologyID().getOntologyIRI());
        man.saveOntology(mod);
    }

    /**
     * The following example uses entities and axioms that are used in the OWL
     * Primer. The purpose of this example is to illustrate some of the methods
View Full Code Here

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

    protected StringDocumentTarget writeOWL(@Nonnull OWLOntology ontology,
            @Nonnull OWLDocumentFormat format) {
        StringDocumentTarget target = new StringDocumentTarget();
        OWLOntologyManager manager = ontology.getOWLOntologyManager();
        try {
            manager.saveOntology(ontology, format, target);
        } catch (OWLOntologyStorageException e) {
            throw new OWLRuntimeException(e);
        }
        return target;
    }
View Full Code Here

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

    }

    protected static void renderOWL(@Nonnull OWLOntology owlOntology)
            throws OWLOntologyStorageException {
        OWLOntologyManager manager = owlOntology.getOWLOntologyManager();
        manager.saveOntology(owlOntology, new OWLXMLDocumentFormat(),
                new StringDocumentTarget());
    }

    protected static String renderOWL(@Nonnull OWLOntology owlOntology,
            @Nonnull OWLDocumentFormat ontologyFormat)
View Full Code Here

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

    protected static String renderOWL(@Nonnull OWLOntology owlOntology,
            @Nonnull OWLDocumentFormat ontologyFormat)
            throws OWLOntologyStorageException, IOException {
        OWLOntologyManager manager = owlOntology.getOWLOntologyManager();
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        manager.saveOntology(owlOntology, ontologyFormat, out);
        out.close();
        return out.toString();
    }

    @Nullable
View Full Code Here

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

                .getOWLDisjointClassesAxiom(man, woman);
        manager.addAxiom(ont, disjointClassesAxiom);
        // Ontology Management //Having added axioms to out ontology we can now
        // save it (in a variety of formats). RDF/XML is the default format
        // System.out.println("RDF/XML: ");
        manager.saveOntology(ont, new StringDocumentTarget());
        // OWL/XML
        // System.out.println("OWL/XML: ");
        manager.saveOntology(ont, new OWLXMLDocumentFormat(),
                new StringDocumentTarget());
        // Manchester Syntax
View Full Code Here

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

        // save it (in a variety of formats). RDF/XML is the default format
        // System.out.println("RDF/XML: ");
        manager.saveOntology(ont, new StringDocumentTarget());
        // OWL/XML
        // System.out.println("OWL/XML: ");
        manager.saveOntology(ont, new OWLXMLDocumentFormat(),
                new StringDocumentTarget());
        // Manchester Syntax
        // System.out.println("Manchester syntax: ");
        manager.saveOntology(ont, new ManchesterSyntaxDocumentFormat(),
                new StringDocumentTarget());
View Full Code Here

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

        // System.out.println("OWL/XML: ");
        manager.saveOntology(ont, new OWLXMLDocumentFormat(),
                new StringDocumentTarget());
        // Manchester Syntax
        // System.out.println("Manchester syntax: ");
        manager.saveOntology(ont, new ManchesterSyntaxDocumentFormat(),
                new StringDocumentTarget());
        // Turtle
        // System.out.println("Turtle: ");
        manager.saveOntology(ont, new TurtleDocumentFormat(),
                new StringDocumentTarget());
View Full Code Here

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

        // System.out.println("Manchester syntax: ");
        manager.saveOntology(ont, new ManchesterSyntaxDocumentFormat(),
                new StringDocumentTarget());
        // Turtle
        // System.out.println("Turtle: ");
        manager.saveOntology(ont, new TurtleDocumentFormat(),
                new StringDocumentTarget());
    }
}
View Full Code Here

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

        File ontologyByOtherPath = folder.newFile("tempother.owl");
        OWLOntologyManager manager = m;
        OWLOntology ontology = manager.createOntology(new OWLOntologyID(
                Optional.of(IRI.create(ontologyByName)), Optional.of(IRI
                        .create(ontologyByVersion))));
        manager.saveOntology(ontology, IRI.create(ontologyByName));
        manager.saveOntology(ontology, IRI.create(ontologyByVersion));
        manager.saveOntology(ontology, IRI.create(ontologyByOtherPath));
        manager = m1;
        OWLDataFactory factory = manager.getOWLDataFactory();
        OWLOntology ontology1 = manager.createOntology(IRI
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.