Package org.eclipse.rdf4j.sparqlbuilder.core.query

## Class OuterQuery<T extends OuterQuery<T>>

- java.lang.Object
- - org.eclipse.rdf4j.sparqlbuilder.core.query.Query<T>
  - - org.eclipse.rdf4j.sparqlbuilder.core.query.OuterQuery<T>

- Type Parameters:
    `T` - The query type. Used to support fluency.
  All Implemented Interfaces:
    `QueryElement`
  Direct Known Subclasses:
    `ConstructQuery`, `SelectQuery`

      public abstract class OuterQuery<T extends OuterQuery<T>>
      extends Query<T>

  A non-subquery query.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected Optional<Base>` | `base` |
    `protected Optional<PrefixDeclarations>` | `prefixes` |

    - ### Fields inherited from class org.eclipse.rdf4j.sparqlbuilder.core.query.Query

      `bnodeCount, from, groupBy, having, limit, LIMIT, offset, OFFSET, orderBy, varCount, where`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `OuterQuery()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `T` | `base​(IRI iri)` | Set the base IRI of this query
    `T` | `base​(Base base)` | Set the Base clause of this query
    `T` | `base​(Iri iri)` | Set the base IRI of this query
    `String` | `getQueryString()` |
    `T` | `prefix​(Namespace... namespaces)` | Add prefix declarations to this query
    `T` | `prefix​(Prefix... prefixes)` | Add prefix declarations to this query
    `T` | `prefix​(PrefixDeclarations prefixes)` | Set the Prefix declarations of this query

    - ### Methods inherited from class org.eclipse.rdf4j.sparqlbuilder.core.query.Query

      `bNode, from, from, getQueryActionString, groupBy, groupBy, having, having, limit, offset, orderBy, orderBy, var, where, where`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### base

          protected Optional<Base> base

    - #### prefixes

          protected Optional<PrefixDeclarations> prefixes

  - ### Constructor Detail

    - #### OuterQuery

          public OuterQuery()

  - ### Method Detail

    - #### base

          public T base​(Iri iri)

      Set the base IRI of this query
      Parameters:
        `iri` - the base IRI
      Returns:
        this

    - #### base

          public T base​(IRI iri)

      Set the base IRI of this query
      Parameters:
        `iri` - the base IRI
      Returns:
        this

    - #### base

          public T base​(Base base)

      Set the Base clause of this query
      Parameters:
        `base` - the `Base` clause to set
      Returns:
        this

    - #### prefix

          public T prefix​(Prefix... prefixes)

      Add prefix declarations to this query
      Parameters:
        `prefixes` - the prefixes to add
      Returns:
        this

    - #### prefix

          public T prefix​(Namespace... namespaces)

      Add prefix declarations to this query
      Parameters:
        `namespaces` - the namespaces to use for prefixes
      Returns:

    - #### prefix

          public T prefix​(PrefixDeclarations prefixes)

      Set the Prefix declarations of this query
      Parameters:
        `prefixes` - the `PrefixDeclarations` to set
      Returns:
        this

    - #### getQueryString

          public String getQueryString()

      Specified by:
        `getQueryString` in interface `QueryElement`
      Overrides:
        `getQueryString` in class `Query<T extends OuterQuery<T>>`
      Returns:
        the String representing the SPARQL syntax of this element