Examples of BooleanQueryResultFormat


Examples of org.openrdf.query.resultio.BooleanQueryResultFormat

    throws IOException, QueryResultParseException, NoCompatibleMediaType
  {
    Boolean result = null;
    String mimeType = readContentType();
    try {
      BooleanQueryResultFormat format = BooleanQueryResultParserRegistry.getInstance().getFileFormatForMIMEType(
          mimeType);
      result = QueryResultIO.parse(getResponseBodyAsStream(), format);
      return result;
    }
    catch (UnsupportedQueryResultFormatException e) {
View Full Code Here

Examples of org.openrdf.query.resultio.BooleanQueryResultFormat

  }

  private boolean readExpectedBooleanQueryResult()
    throws Exception
  {
    BooleanQueryResultFormat bqrFormat = BooleanQueryResultParserRegistry.getInstance().getFileFormatForFileName(
        resultFileURL);

    if (bqrFormat != null) {
      InputStream in = new URL(resultFileURL).openStream();
      try {
View Full Code Here

Examples of org.openrdf.query.resultio.BooleanQueryResultFormat

    int httpCode = httpClient.executeMethod(method);

    if (httpCode == HttpURLConnection.HTTP_OK) {
      String mimeType = getResponseMIMEType(method);
      try {
        BooleanQueryResultFormat format = BooleanQueryResultFormat.matchMIMEType(mimeType, booleanFormats);
        BooleanQueryResultParser parser = QueryResultIO.createParser(format);
        return parser.parse(method.getResponseBodyAsStream());
      }
      catch (UnsupportedQueryResultFormatException e) {
        throw new RepositoryException("Server responded with an unsupported file format: " + mimeType);
View Full Code Here

Examples of org.openrdf.query.resultio.BooleanQueryResultFormat

  @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);
View Full Code Here

Examples of org.openrdf.query.resultio.BooleanQueryResultFormat

  }

  private boolean readExpectedBooleanQueryResult()
    throws Exception
  {
    BooleanQueryResultFormat bqrFormat = BooleanQueryResultParserRegistry.getInstance().getFileFormatForFileName(
        resultFileURL);

    if (bqrFormat != null) {
      InputStream in = new URL(resultFileURL).openStream();
      try {
View Full Code Here

Examples of org.openrdf.query.resultio.BooleanQueryResultFormat

    /**
     * Gets the query result format that this writer uses.
     */
    @Override
    public BooleanQueryResultFormat getBooleanQueryResultFormat() {
        return new BooleanQueryResultFormat("SPARQL/HTML","text/html", Charset.forName("UTF-8"), "html");
    }
View Full Code Here

Examples of org.openrdf.query.resultio.BooleanQueryResultFormat

        }
        return writer;
    }

    private BooleanQueryResultWriter getBooleanResultWriter(String format, OutputStream os) {
        BooleanQueryResultFormat resultFormat;
        if(format == null) {
            resultFormat = BooleanQueryResultFormat.SPARQL;
        } else {
            resultFormat = QueryResultIO.getBooleanWriterFormatForMIMEType(format);
            if(resultFormat == null) {
View Full Code Here

Examples of org.openrdf.query.resultio.BooleanQueryResultFormat

    /**
     * Gets the query result format that this writer uses.
     */
    @Override
    public BooleanQueryResultFormat getBooleanQueryResultFormat() {
        return new BooleanQueryResultFormat("SPARQL/JSON",
      "application/sparql-results+json", Charset.forName("UTF-8"), "srj");
    }
View Full Code Here

Examples of org.openrdf.query.resultio.BooleanQueryResultFormat

    /**
     * Gets the query result format that this writer uses.
     */
    @Override
    public BooleanQueryResultFormat getBooleanQueryResultFormat() {
        return new BooleanQueryResultFormat("SPARQL/HTML","text/html", Charset.forName("UTF-8"), "html");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.