PrintWriter out = response.getWriter();
// parses query
QueryCriteria queryCriteria = extractQueryCriteria(request);
Selection selection = extractSelection(request);
Format format = extractFormat(request);
// 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());