Examples of TupleQueryResultBuilder


Examples of org.openrdf.query.impl.TupleQueryResultBuilder

    throws IOException, QueryResultParseException, TupleQueryResultHandlerException,
    UnsupportedQueryResultFormatException
  {
    TupleQueryResultParser parser = createParser(format);

    TupleQueryResultBuilder qrBuilder = new TupleQueryResultBuilder();
    parser.setTupleQueryResultHandler(qrBuilder);

    parser.parse(in);

    return qrBuilder.getQueryResult();
  }
View Full Code Here

Examples of org.openrdf.query.impl.TupleQueryResultBuilder

  public TupleQueryResult getRepositoryList()
    throws IOException, RepositoryException, UnauthorizedException
  {
    try {
      TupleQueryResultBuilder builder = new TupleQueryResultBuilder();
      getRepositoryList(builder);
      return builder.getQueryResult();
    }
    catch (TupleQueryResultHandlerException e) {
      // Found a bug in TupleQueryResultBuilder?
      throw new RuntimeException(e);
    }
View Full Code Here

Examples of org.openrdf.query.impl.TupleQueryResultBuilder

  public TupleQueryResult sendTupleQuery(QueryLanguage ql, String query, Dataset dataset,
      boolean includeInferred, Binding... bindings)
    throws IOException, RepositoryException, MalformedQueryException, UnauthorizedException
  {
    try {
      TupleQueryResultBuilder builder = new TupleQueryResultBuilder();
      sendTupleQuery(ql, query, dataset, includeInferred, builder, bindings);
      return builder.getQueryResult();
    }
    catch (TupleQueryResultHandlerException e) {
      // Found a bug in TupleQueryResultBuilder?
      throw new RuntimeException(e);
    }
View Full Code Here

Examples of org.openrdf.query.impl.TupleQueryResultBuilder

  public TupleQueryResult getContextIDs()
    throws IOException, RepositoryException, UnauthorizedException
  {
    try {
      TupleQueryResultBuilder builder = new TupleQueryResultBuilder();
      getContextIDs(builder);
      return builder.getQueryResult();
    }
    catch (TupleQueryResultHandlerException e) {
      // Found a bug in TupleQueryResultBuilder?
      throw new RuntimeException(e);
    }
View Full Code Here

Examples of org.openrdf.query.impl.TupleQueryResultBuilder

  public TupleQueryResult getNamespaces()
    throws IOException, RepositoryException, UnauthorizedException
  {
    try {
      TupleQueryResultBuilder builder = new TupleQueryResultBuilder();
      getNamespaces(builder);
      return builder.getQueryResult();
    }
    catch (TupleQueryResultHandlerException e) {
      // Found a bug in TupleQueryResultBuilder?
      throw new RuntimeException(e);
    }
View Full Code Here

Examples of org.openrdf.query.impl.TupleQueryResultBuilder

public class DAWGTestResultSetUtil {

  public static TupleQueryResult toTupleQueryResult(Iterable<? extends Statement> dawgGraph)
    throws DAWGTestResultSetParseException
  {
    TupleQueryResultBuilder tqrBuilder = new TupleQueryResultBuilder();
    DAWGTestResultSetParser parser = new DAWGTestResultSetParser(tqrBuilder);

    try {
      parser.startRDF();
      for (Statement st : dawgGraph) {
        parser.handleStatement(st);
      }
      parser.endRDF();

      return tqrBuilder.getQueryResult();
    }
    catch (RDFHandlerException e) {
      throw new DAWGTestResultSetParseException(e.getMessage(), e);
    }
  }
View Full Code Here

Examples of org.openrdf.result.util.TupleQueryResultBuilder

    throws IOException, QueryResultParseException, TupleQueryResultHandlerException,
    UnsupportedQueryResultFormatException
  {
    TupleQueryResultParser parser = createParser(format);

    TupleQueryResultBuilder qrBuilder = new TupleQueryResultBuilder();
    parser.setTupleQueryResultHandler(qrBuilder);

    parser.parse(in);

    return qrBuilder.getQueryResult();
  }
View Full Code Here

Examples of org.openrdf.result.util.TupleQueryResultBuilder

    if (tqrFormat != null) {
      InputStream in = new URL(resultFileURL).openStream();
      try {
        TupleQueryResultParser parser = QueryResultIO.createParser(tqrFormat);

        TupleQueryResultBuilder qrBuilder = new TupleQueryResultBuilder();
        parser.setTupleQueryResultHandler(qrBuilder);

        parser.parse(in);
        return qrBuilder.getQueryResult();
      }
      finally {
        in.close();
      }
    }
View Full Code Here

Examples of org.openrdf.result.util.TupleQueryResultBuilder

public class DAWGTestResultSetUtil {

  public static TupleResult toTupleQueryResult(Iterable<? extends Statement> dawgGraph)
    throws DAWGTestResultSetParseException
  {
    TupleQueryResultBuilder tqrBuilder = new TupleQueryResultBuilder();
    DAWGTestResultSetParser parser = new DAWGTestResultSetParser(tqrBuilder);

    try {
      parser.startRDF();
      for (Statement st : dawgGraph) {
        parser.handleStatement(st);
      }
      parser.endRDF();

      return tqrBuilder.getQueryResult();
    }
    catch (RDFHandlerException e) {
      throw new DAWGTestResultSetParseException(e.getMessage(), e);
    }
  }
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.