org.eclipse.rdf4j.sparqlbuilder.graphpattern

## Interface TriplePattern

- All Superinterfaces:
    GraphPattern, QueryElement

      public interface TriplePattern
      extends GraphPattern

  Denotes a SPARQL Triple Pattern
  See Also:
    Triple pattern syntax, blank node syntax

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `SUFFIX`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default TriplePattern` | `andHas(RdfPredicate predicate, Boolean... objects)` Convenience version of `andHas(RdfPredicate, RdfObject...)` that takes Boolean and converts them to BooleanLiterals
    `default TriplePattern` | `andHas(RdfPredicate predicate, Number... objects)` Convenience version of `andHas(RdfPredicate, RdfObject...)` that takes Numbers and converts them to NumberLiterals
    `TriplePattern` | `andHas(RdfPredicateObjectList... lists)` Add predicate-object lists describing this triple pattern's subject
    `default TriplePattern` | `andHas(RdfPredicate predicate, RdfObject... objects)` Add predicate-object lists describing this triple pattern's subject
    `default TriplePattern` | `andHas(RdfPredicate predicate, String... objects)` Convenience version of `andHas(RdfPredicate, RdfObject...)` that takes Strings and converts them to StringLiterals
    `default TriplePattern` | `andIsA(RdfObject object)` Use the built-in RDF shortcut `a` for `rdf:type` to specify the subject's type
    `default boolean` | `isEmpty()`

    - ### Methods inherited from interface org.eclipse.rdf4j.sparqlbuilder.graphpattern.GraphPattern

      `and, filter, filterExists, filterExists, filterNotExists, from, minus, optional, optional, union`

    - ### Methods inherited from interface org.eclipse.rdf4j.sparqlbuilder.core.QueryElement

      `getQueryString`

- - ### Field Detail

    - #### SUFFIX

          static final String SUFFIX

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### andHas

          default TriplePattern andHas(RdfPredicate predicate,
                                       RdfObject... objects)

      Add predicate-object lists describing this triple pattern's subject
      Parameters:
        `predicate` - the predicate to use to describe this triple pattern's subject
        `objects` - the corresponding object(s)
      Returns:
        this triple pattern

    - #### andHas

          TriplePattern andHas(RdfPredicateObjectList... lists)

      Add predicate-object lists describing this triple pattern's subject
      Parameters:
        `lists` - the `RdfPredicateObjectList`(s) to add
      Returns:
        this triple pattern

    - #### andHas

          default TriplePattern andHas(RdfPredicate predicate,
                                       String... objects)

      Convenience version of `andHas(RdfPredicate, RdfObject...)` that takes Strings and converts them to StringLiterals
      Parameters:
        `predicate` - the predicate to use to describe this triple pattern's subject
        `objects` - the corresponding object(s)
      Returns:
        this triple pattern

    - #### andHas

          default TriplePattern andHas(RdfPredicate predicate,
                                       Boolean... objects)

      Convenience version of `andHas(RdfPredicate, RdfObject...)` that takes Boolean and converts them to BooleanLiterals
      Parameters:
        `predicate` - the predicate to use to describe this triple pattern's subject
        `objects` - the corresponding object(s)
      Returns:
        this triple pattern

    - #### andHas

          default TriplePattern andHas(RdfPredicate predicate,
                                       Number... objects)

      Convenience version of `andHas(RdfPredicate, RdfObject...)` that takes Numbers and converts them to NumberLiterals
      Parameters:
        `predicate` - the predicate to use to describe this triple pattern's subject
        `objects` - the corresponding object(s)
      Returns:
        this triple pattern

    - #### andIsA

          default TriplePattern andIsA(RdfObject object)

      Use the built-in RDF shortcut `a` for `rdf:type` to specify the subject's type
      Parameters:
        `object` - the object describing this triple pattern's subject's `rdf:type`
      Returns:
        this triple pattern
      See Also:
        RDF Type abbreviation

    - #### isEmpty

          default boolean isEmpty()

      Specified by:
        `isEmpty` in interface `GraphPattern`
      Returns:
        if this pattern is a collection of GraphPatterns (ie., Group or Alternative patterns), returns if the collection contains any patterns

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