Package org.semanticweb.owlapi.model

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


        additions.add(new AddAxiom(ont, __factory.getOWLDataPropertyAssertionAxiom(hasId, iSes, hasIdValue)));
        mgr.applyChanges(additions);

        StringDocumentTarget tgt = new StringDocumentTarget();
        try {
            mgr.saveOntology(ont, new RDFXMLOntologyFormat(), tgt);
            return ont;
        } catch (OWLOntologyStorageException e) {
            LoggerFactory.getLogger(ScopeSetRenderer.class).error(
                "KReS :: could not save session metadata ontology.", e);
            return null;
View Full Code Here


                    ruleOntologyLocation = "." + sep + "RuleConf" + sep + "rmi_config.owl";

                    FileOutputStream fos;
                    try {
                        fos = new FileOutputStream(ruleOntologyLocation);
                        mgr/* OWLManager.createOWLOntologyManager() */.saveOntology(owlmodel, owlmodel
                                .getOWLOntologyManager().getOntologyFormat(owlmodel), fos);
                    } catch (FileNotFoundException e) {
                        log.error("Cannot save the RMI configuration ontology", e);
                    } catch (OWLOntologyStorageException e) {
                        log.error("Cannot save the RMI configuration ontology", e);
View Full Code Here

    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

                OWLOntology refactoredDataSet = /* ontologyStorage */this.sparqlConstruct(sparql,
                    datasetURI.toString());

                ByteArrayOutputStream out = new ByteArrayOutputStream();
                try {
                    ontologyManager.saveOntology(refactoredDataSet, new RDFXMLOntologyFormat(), out);
                    if (refactoredOntologyIRI == null) {
                        ByteArrayOutputStream fpOut = new ByteArrayOutputStream();
                        fingerPrint += URIGenerator.createID("", fpOut.toByteArray());
                    }

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.