AGTupleQuery (agraph-java-client 5.0.4-SNAPSHOT API)
Description: declaration: package: com.franz.agraph.repository, class: AGTupleQuery

Package com.franz.agraph.repository

# Class AGTupleQuery

java.lang.Object
org.eclipse.rdf4j.query.impl.AbstractOperation
org.eclipse.rdf4j.query.impl.AbstractQuery
com.franz.agraph.repository.AGQuery
com.franz.agraph.repository.AGTupleQuery

All Implemented Interfaces:
  `org.eclipse.rdf4j.query.Operation`, `org.eclipse.rdf4j.query.Query`, `org.eclipse.rdf4j.query.TupleQuery`

Direct Known Subclasses:
  `AGStreamTupleQuery`

public class AGTupleQuery extends AGQuery implements org.eclipse.rdf4j.query.TupleQuery
Implements the Sesame TupleQuery interface for AllegroGraph.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.eclipse.rdf4j.query.Query

  `org.eclipse.rdf4j.query.Query.QueryType`

- ## Field Summary

  ### Fields inherited from class com.franz.agraph.repository.AGQuery

  `RDFS_PLUS_PLUS, RESTRICTION, SPARQL_COVERAGE_PLANNER, SPARQL_IDENTITY_PLANNER`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AGTupleQuery(AGRepositoryConnection con, org.eclipse.rdf4j.query.QueryLanguage ql, String queryString, String baseURI)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `count()`
  Evaluates the query and returns only the number of results to the client (counting is done on the server, the results are not returned).
  `void`
  `download(File file, org.eclipse.rdf4j.query.resultio.TupleQueryResultFormat format)`
  Evaluates the query and saves the results to a file.
  `void`
  `download(String file, org.eclipse.rdf4j.query.resultio.TupleQueryResultFormat format)`
  Evaluates the query and saves the results to a file.
  `org.eclipse.rdf4j.query.TupleQueryResult`
  `evaluate()`
  `void`
  `evaluate(org.eclipse.rdf4j.query.TupleQueryResultHandler handler)`
  `InputStream`
  `stream(org.eclipse.rdf4j.query.resultio.TupleQueryResultFormat format)`
  Evaluates the query and returns the result as an input stream.

  ### Methods inherited from class com.franz.agraph.repository.AGQuery

  `analyze, download, download, download, download, getBaseURI, getBindingsArray, getEngine, getEntailmentRegime, getFranzOptionPrefixString, getLanguage, getLimit, getName, getOffset, getPlanner, getQueryString, hashCode, isCheckVariables, isLoggingEnabled, isPrepared, setCheckVariables, setEngine, setEntailmentRegime, setIncludeInferred, setLimit, setLoggingEnabled, setOffset, setPlanner, setPrepared, setSaveName, stream, stream, toString`

  ### Methods inherited from class org.eclipse.rdf4j.query.impl.AbstractQuery

  `getMaxQueryTime, setMaxQueryTime`

  ### Methods inherited from class org.eclipse.rdf4j.query.impl.AbstractOperation

  `clearBindings, getBindings, getDataset, getIncludeInferred, getMaxExecutionTime, removeBinding, setBinding, setDataset, setMaxExecutionTime`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface org.eclipse.rdf4j.query.Operation

  `clearBindings, getBindings, getDataset, getIncludeInferred, getMaxExecutionTime, removeBinding, setBinding, setDataset, setIncludeInferred, setMaxExecutionTime`

  ### Methods inherited from interface org.eclipse.rdf4j.query.Query

  `explain, getMaxQueryTime, setMaxQueryTime`

- ## Constructor Details

  - ### AGTupleQuery

    public AGTupleQuery(AGRepositoryConnection con, org.eclipse.rdf4j.query.QueryLanguage ql, String queryString, String baseURI)

- ## Method Details

  - ### evaluate

    public org.eclipse.rdf4j.query.TupleQueryResult evaluate() throws org.eclipse.rdf4j.query.QueryEvaluationException
    Specified by:
      `evaluate` in interface `org.eclipse.rdf4j.query.TupleQuery`
    Throws:
      `org.eclipse.rdf4j.query.QueryEvaluationException`

  - ### evaluate

    public void evaluate(org.eclipse.rdf4j.query.TupleQueryResultHandler handler) throws org.eclipse.rdf4j.query.QueryEvaluationException, org.eclipse.rdf4j.query.TupleQueryResultHandlerException
    Specified by:
      `evaluate` in interface `org.eclipse.rdf4j.query.TupleQuery`
    Throws:
      `org.eclipse.rdf4j.query.QueryEvaluationException`
      `org.eclipse.rdf4j.query.TupleQueryResultHandlerException`

  - ### count

    public long count() throws org.eclipse.rdf4j.query.QueryEvaluationException
    Evaluates the query and returns only the number of results to the client (counting is done on the server, the results are not returned).
    Returns:
      the number of results
    Throws:
      `org.eclipse.rdf4j.query.QueryEvaluationException` - if there is an error with this request

  - ### download

    public void download(File file, org.eclipse.rdf4j.query.resultio.TupleQueryResultFormat format) throws org.eclipse.rdf4j.query.QueryEvaluationException
    Evaluates the query and saves the results to a file.
    Parameters:
      `file` - Output path.
      `format` - Output format.
    Throws:
      `org.eclipse.rdf4j.query.QueryEvaluationException` - if there is an error while evaluating query

  - ### download

    public void download(String file, org.eclipse.rdf4j.query.resultio.TupleQueryResultFormat format) throws org.eclipse.rdf4j.query.QueryEvaluationException
    Evaluates the query and saves the results to a file.
    Parameters:
      `file` - Output path.
      `format` - Output format.
    Throws:
      `org.eclipse.rdf4j.query.QueryEvaluationException` - if there is an error while evaluating query

  - ### stream

    public InputStream stream(org.eclipse.rdf4j.query.resultio.TupleQueryResultFormat format) throws org.eclipse.rdf4j.query.QueryEvaluationException
    Evaluates the query and returns the result as an input stream.

    Note that it is important to close the returned stream, to avoid resource leaks.

    Parameters:
      `format` - Output format.
    Returns:
      An input stream containing response data. The caller MUST close this stream to release connection resources.
    Throws:
      `org.eclipse.rdf4j.query.QueryEvaluationException` - if there is an error while evaluating query