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);