Examples of OWLOntologyFormat


Examples of org.semanticweb.owlapi.model.OWLOntologyFormat

    File file = new File(path);
    //File file = File.createTempFile("corpusOntology", "owl", whereToSave.getAbsoluteFile());
        manager.saveOntology(ontology, IRI.create(file.toURI()));
        // By default ontologies are saved in the format from which they were loaded. In this case the ontology was loaded from an rdf/xml
        //file We can get information about the format of an ontology from its manager
        OWLOntologyFormat format = manager.getOntologyFormat(ontology);
       
        // We can save the ontology in a different format Lets save the ontology in owl/xml format
       
       
        OWLXMLOntologyFormat owlxmlFormat = new OWLXMLOntologyFormat();
        // Some ontology formats support prefix names and prefix IRIs. In our
        // case we loaded the pizza ontology from an rdf/xml format, which
        // supports prefixes. When we save the ontology in the new format we
        // will copy the prefixes over so that we have nicely abbreviated IRIs
        // in the new ontology document
        if (format.isPrefixOWLOntologyFormat()) {
            owlxmlFormat.copyPrefixesFrom(format.asPrefixOWLOntologyFormat());
        }

        manager.saveOntology(ontology, owlxmlFormat, IRI.create(file.toURI()));
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyFormat

    //
    ///////////////////////////////////////////////////////////////////////////////////////////////////////////


    public void saveOntology(OWLOntology ontology) throws OWLOntologyStorageException, UnknownOWLOntologyException {
        OWLOntologyFormat format = getOntologyFormat(ontology);
        saveOntology(ontology, format);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyFormat

        saveOntology(ontology, ontologyFormat, documentIRI);
    }


    public void saveOntology(OWLOntology ontology, IRI documentIRI) throws OWLOntologyStorageException, UnknownOWLOntologyException {
        OWLOntologyFormat format = getOntologyFormat(ontology);
        saveOntology(ontology, format, documentIRI);
    }
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.