org.eclipse.rdf4j.query

## Interface GraphQueryResult

- All Superinterfaces:
    AutoCloseable, CloseableIteration<Statement,QueryEvaluationException>, Iterable<Statement>, Iteration<Statement,QueryEvaluationException>, QueryResult<Statement>
  All Known Implementing Classes:
    BackgroundGraphResult, BackgroundGraphResult, GraphQueryResultImpl, IteratingGraphQueryResult

      public interface GraphQueryResult
      extends QueryResult<Statement>

  A representation of a query result as a sequence of `Statement` objects. Each query result consists of zero or more Statements and additionaly carries information about relevant namespace declarations. Note: take care to always close a GraphQueryResult after use to free any resources it keeps hold of.
  Author:
    Jeen Broekstra

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,String>` | `getNamespaces()` Retrieves relevant namespaces from the query result.

    - ### Methods inherited from interface org.eclipse.rdf4j.query.QueryResult

      `iterator`

    - ### Methods inherited from interface org.eclipse.rdf4j.common.iteration.CloseableIteration

      `close`

    - ### Methods inherited from interface org.eclipse.rdf4j.common.iteration.Iteration

      `hasNext, next, remove, stream`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Method Detail

    - #### getNamespaces

          Map<String,String> getNamespaces()
                                    throws QueryEvaluationException

      Retrieves relevant namespaces from the query result.
      The contents of the Map may be modified after it is returned, as the initial return may be performed when the first RDF Statement is encountered.
      Returns:
        a Map<String, String> object containing (prefix, namespace) pairs.
      Throws:
        `QueryEvaluationException`

Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.