// sets response attributes
response.setCharacterEncoding("UTF-8");
response.setContentType(format.isOwl() ? "text/html" : "text/plain");
// creates ontology context
Context ontContext = Context.extract(this.getServletContext());
OntologyProcessor ontProcessor = new OntologyProcessor(ontContext,
request.getLocale());
// checks if ontology context is ready
if (!ontContext.isReady()) {
log.info("Ontology context not ready.");
response.setStatus(response.SC_SERVICE_UNAVAILABLE);
return;
}