Package org.apache.stanbol.ontologymanager.sources.owlapi

Examples of org.apache.stanbol.ontologymanager.sources.owlapi.OntologyContentInputSource


                rb = Response.status(Status.INTERNAL_SERVER_ERROR);
            }
        } else if (OWL_XML_TYPE.equals(mt) || FUNCTIONAL_OWL_TYPE.equals(mt)
                || MANCHESTER_OWL_TYPE.equals(mt)) {
            try {
                OntologyInputSource<OWLOntology> src = new OntologyContentInputSource(content);
                ontologyProvider.loadInStore(src.getRootOntology(), true);
                rb = Response.ok();
            } catch (OWLOntologyCreationException e) {
                throw new WebApplicationException(e, INTERNAL_SERVER_ERROR);
            }
        } else {
View Full Code Here


        String mt = headers.getMediaType().toString();
        if (session == null) rb = Response.status(NOT_FOUND); // Always check session first
        else try {
            log.debug("POST content claimed to be of type {}.", mt);
            OntologyInputSource<?> src;
            if (OWL_XML.equals(mt) || FUNCTIONAL_OWL.equals(mt) || MANCHESTER_OWL.equals(mt)) src = new OntologyContentInputSource(
                    content);
            else // content = new BufferedInputStream(content);
            src = new GraphContentInputSource(content, mt, ontologyProvider.getStore());
            log.debug("SUCCESS parse with media type {}.", mt);
            OWLOntologyID key = session.addOntology(src);
View Full Code Here

TOP

Related Classes of org.apache.stanbol.ontologymanager.sources.owlapi.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.