Search in sources :

Example 16 with OWLOntologyStorageException

use of org.semanticweb.owlapi.model.OWLOntologyStorageException in project goci by EBISPOT.

the class DefaultGWASOWLPublisher method saveGWASData.

public void saveGWASData(OWLOntology ontology, File outputFile) throws OWLConversionException {
    try {
        getLog().info("Saving GWAS catalog data...");
        OWLOntologyFormat format = new RDFXMLOntologyFormat();
        getManager().saveOntology(ontology, format, IRI.create(outputFile));
        getLog().info("GWAS catalog data saved ok");
        getLog().info("Resulting ontology contains " + ontology.getAxiomCount() + " axioms " + "and is saved at " + outputFile.getAbsolutePath());
    } catch (OWLOntologyStorageException e) {
        throw new OWLConversionException("Failed to save GWAS data", e);
    }
}
Also used : OWLConversionException(uk.ac.ebi.spot.goci.exception.OWLConversionException) OWLOntologyFormat(org.semanticweb.owlapi.model.OWLOntologyFormat) RDFXMLOntologyFormat(org.semanticweb.owlapi.io.RDFXMLOntologyFormat) OWLOntologyStorageException(org.semanticweb.owlapi.model.OWLOntologyStorageException)

Aggregations

OWLOntologyStorageException (org.semanticweb.owlapi.model.OWLOntologyStorageException)16 OWLOntology (org.semanticweb.owlapi.model.OWLOntology)9 OWLOntologyManager (org.semanticweb.owlapi.model.OWLOntologyManager)9 RDFXMLOntologyFormat (org.semanticweb.owlapi.io.RDFXMLOntologyFormat)8 ManchesterOWLSyntaxOntologyFormat (org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxOntologyFormat)7 OWLOntologyCreationException (org.semanticweb.owlapi.model.OWLOntologyCreationException)6 ByteArrayOutputStream (java.io.ByteArrayOutputStream)5 TurtleOntologyFormat (org.coode.owlapi.turtle.TurtleOntologyFormat)5 Graph (org.apache.clerezza.commons.rdf.Graph)4 RdfJsonSerializingProvider (org.apache.clerezza.rdf.rdfjson.serializer.RdfJsonSerializingProvider)4 OWLFunctionalSyntaxOntologyFormat (org.semanticweb.owlapi.io.OWLFunctionalSyntaxOntologyFormat)4 OWLXMLOntologyFormat (org.semanticweb.owlapi.io.OWLXMLOntologyFormat)4 IRI (org.semanticweb.owlapi.model.IRI)4 OWLAxiom (org.semanticweb.owlapi.model.OWLAxiom)4 Logger (org.slf4j.Logger)4 WebApplicationException (javax.ws.rs.WebApplicationException)3 OWLDataFactory (org.semanticweb.owlapi.model.OWLDataFactory)3 OWLDataProperty (org.semanticweb.owlapi.model.OWLDataProperty)3 OWLOntologyFormat (org.semanticweb.owlapi.model.OWLOntologyFormat)3 ByteArrayInputStream (java.io.ByteArrayInputStream)2