Package com.complexible.stardog

# Interface QueryInfo

All Superinterfaces:
  `com.complexible.stardog.process.ProcessInfo`

public interface QueryInfo extends com.complexible.stardog.process.ProcessInfo
A simple structure that shows information about a query.

Author:
  Evren Sirin

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static enum`
  `QueryInfo.Status`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `DEFAULT_QUERY_TYPE`

  ### Fields inherited from interface com.complexible.stardog.process.ProcessInfo

  `NO_TIME`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default String`
  `getDB()`
  Deprecated.
  `long`
  `getEndTime()`
  Returns the time in milliseconds when the execution of this query ended or `ProcessInfo.NO_TIME` if the execution did not end.
  `default Map<com.complexible.stardog.QueryMetadataKey,String>`
  `getMetadata()`
  Returns the metadata associated with this query.
  `long`
  `getPreExecutionTime()`
  Returns the elapsed time in milliseconds of the pre-execution stage of this query.
  `String`
  `getQuery()`
  Returns the SPARQL query string.
  `String`
  `getQueryType()`
  Returns the type of query which is executing
  `String`
  `getReasoningSchema()`
  Return the active reasoning schema
  `Optional<String>`
  `getRenderedPlan()`
  Returns a string rendering of the query plan.
  `default Optional<String>`
  `getRenderedPlan(boolean verbose)`
  `QueryInfo.Status`
  `getStatus()`
  `long`
  `getTimeout()`
  Return the timeout value in milliseconds for this query or `ProcessInfo.NO_TIME` if there is no timeout defined for this query.
  `default com.complexible.stardog.process.ProcessType`
  `getType()`
  `default boolean`
  `isEnded()`
  Returns `true` if the execution of this query ended.
  `boolean`
  `isReasoningEnabled()`
  Returns whether reasoning is enabled for this query.
  `default boolean`
  `isRunning()`
  Returns `true` if the execution of this query started and did not end.
  `default boolean`
  `isStarted()`
  Returns `true` if the execution of this query started.

  ### Methods inherited from interface com.complexible.stardog.process.ProcessInfo

  `details, getDBName, getExecutionTime, getID, getKernelID, getProcessStatus, getStartTime, getUser, isCanceled, isManaged, progress`

- ## Field Details

  - ### DEFAULT_QUERY_TYPE

    static final String DEFAULT_QUERY_TYPE
    See Also:
      - Constant Field Values

- ## Method Details

  - ### getStatus

    QueryInfo.Status getStatus()

  - ### getQuery

    String getQuery()
    Returns the SPARQL query string.

  - ### isReasoningEnabled

    boolean isReasoningEnabled()
    Returns whether reasoning is enabled for this query.

  - ### getReasoningSchema

    String getReasoningSchema()
    Return the active reasoning schema

  - ### getPreExecutionTime

    long getPreExecutionTime()
    Returns the elapsed time in milliseconds of the pre-execution stage of this query.

  - ### getEndTime

    long getEndTime()
    Returns the time in milliseconds when the execution of this query ended or `ProcessInfo.NO_TIME` if the execution did not end. The end time is the time when the last solution for the query has been computed on the server. The client might receive the results at a time later than this.

  - ### getTimeout

    long getTimeout()
    Return the timeout value in milliseconds for this query or `ProcessInfo.NO_TIME` if there is no timeout defined for this query. When the execution time for a query exceeds the timeout value, the query is killed automatically. Timeout value is determined globally by the query.timeout and query.update.timeout configuration options and can be overridden for a database using the `DatabaseOptions.QUERY_TIMEOUT` and `DatabaseOptions.QUERY_UPDATE_TIMEOUT` options.

  - ### isStarted

    default boolean isStarted()
    Returns `true` if the execution of this query started.

  - ### getDB

    @Deprecated default String getDB()
    Deprecated.

  - ### getType

    default com.complexible.stardog.process.ProcessType getType()
    Specified by:
      `getType` in interface `com.complexible.stardog.process.ProcessInfo`

  - ### isEnded

    default boolean isEnded()
    Returns `true` if the execution of this query ended.
    Specified by:
      `isEnded` in interface `com.complexible.stardog.process.ProcessInfo`

  - ### isRunning

    default boolean isRunning()
    Returns `true` if the execution of this query started and did not end.
    Specified by:
      `isRunning` in interface `com.complexible.stardog.process.ProcessInfo`

  - ### getQueryType

    String getQueryType()
    Returns the type of query which is executing

  - ### getRenderedPlan

    Optional<String> getRenderedPlan()
    Returns a string rendering of the query plan.

  - ### getRenderedPlan

    default Optional<String> getRenderedPlan(boolean verbose)

  - ### getMetadata

    default Map<com.complexible.stardog.QueryMetadataKey,String> getMetadata()
    Returns the metadata associated with this query. Metadata is a set of key-value pairs that can be used to pass additional information about the query context. Uses `QueryMetadataKey` for type-safe.
    Returns:
      an unmodifiable map of metadata key-value pairs, never null