Package org.openrdf.query.impl

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


  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

  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

  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

  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

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

TOP

Related Classes of org.openrdf.query.impl.TupleQueryResultBuilder

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.