Package org.openrdf.query.resultio

Examples of org.openrdf.query.resultio.BooleanQueryResultWriter


  @Override
  public void write(OutputStream out)
    throws IOException
  {
    try {
      BooleanQueryResultWriter qrWriter = factory.getWriter(out);
      qrWriter.write(booleanResult.asBoolean());
    }
    catch (StoreException e) {
      logger.error("Query evaluation error", e);
      throw new IOException("Query evaluation error: " + e.getMessage());
    }
View Full Code Here


    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

        return out;
    }

    private BooleanQueryResultWriter getBooleanResultWriter(String format, OutputStream os) {
        //build outputwriter
        final BooleanQueryResultWriter out;
        if(format == null) {
            out = QueryResultIO.createWriter(BooleanQueryResultFormat.SPARQL, os);
        } else if(SparqlWritersHelper.parseSubType(format).equals("html")) {
            out = new SPARQLBooleanHTMLWriter(os);
        } else if(SparqlWritersHelper.parseSubType(format).equals("json")) {
View Full Code Here

        return out;
    }

    private BooleanQueryResultWriter getBooleanResultWriter(String format, OutputStream os) {
        //build outputwriter
        final BooleanQueryResultWriter out;
        if(format == null) {
            out = QueryResultIO.createWriter(BooleanQueryResultFormat.SPARQL, os);
        } else if(SparqlWritersHelper.parseSubType(format).equals("html")) {
            out = new SPARQLBooleanHTMLWriter(os);
        } else if(SparqlWritersHelper.parseSubType(format).equals("json")) {
View Full Code Here

        return out;
    }

    private BooleanQueryResultWriter getBooleanResultWriter(String format, OutputStream os) {
        //build outputwriter
        final BooleanQueryResultWriter out;
        if(format == null) {
            out = new SPARQLBooleanXMLWriter(os);
        } else if(parseSubType(format).equals("html")) {
            out = new SPARQLBooleanHTMLWriter(os);
        } else if(parseSubType(format).equals("json")) {
View Full Code Here

        return out;
    }

    private BooleanQueryResultWriter getBooleanResultWriter(String format, OutputStream os) {
        //build outputwriter
        final BooleanQueryResultWriter out;
        if(format == null) {
            out = new SPARQLBooleanXMLWriter(os);
        } else if(SparqlWritersHelper.parseSubType(format).equals("html")) {
            out = new SPARQLBooleanHTMLWriter(os);
        } else if(SparqlWritersHelper.parseSubType(format).equals("json")) {
View Full Code Here

TOP

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

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.