Package org.apache.stanbol.ontologymanager.ontonet.api.io

Examples of org.apache.stanbol.ontologymanager.ontonet.api.io.OntologyContentInputSource


    @POST
    @Consumes(value = {OWL_XML, FUNCTIONAL_OWL, MANCHESTER_OWL})
    public Response storeOWLOntology(InputStream content, @Context HttpHeaders headers) {
        long before = System.currentTimeMillis();
        try {
            OntologyInputSource<OWLOntology,OWLOntologyManager> src = new OntologyContentInputSource(content);
            ontologyProvider.loadInStore(src.getRootOntology(), null, true);
        } catch (OWLOntologyCreationException e) {
            throw new WebApplicationException(e, INTERNAL_SERVER_ERROR);
        }
        log.debug("POST request for ontology addition completed in {} ms.",
            (System.currentTimeMillis() - before));
View Full Code Here

TOP

Related Classes of org.apache.stanbol.ontologymanager.ontonet.api.io.OntologyContentInputSource

Copyright © 2018 www.massapicom. 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.