Package org.openrdf.query.resultio

Examples of org.openrdf.query.resultio.BooleanQueryResultWriterFactory


  @SuppressWarnings("unchecked")
  public void render(Map model, HttpServletRequest request, HttpServletResponse response)
    throws IOException
  {
    BooleanQueryResultWriterFactory brWriterFactory = (BooleanQueryResultWriterFactory)model.get(FACTORY_KEY);
    BooleanQueryResultFormat brFormat = brWriterFactory.getBooleanQueryResultFormat();

    response.setStatus(SC_OK);
    setContentType(response, brFormat);
    setContentDisposition(model, response, brFormat);

    OutputStream out = response.getOutputStream();
    try {
      BooleanQueryResultWriter qrWriter = brWriterFactory.getWriter(out);
      boolean value = (Boolean)model.get(QUERY_RESULT_KEY);
      qrWriter.write(value);
    }
    finally {
      out.close();
View Full Code Here

TOP

Related Classes of org.openrdf.query.resultio.BooleanQueryResultWriterFactory

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.