org.eclipse.rdf4j.sparqlbuilder.core

## Class Prefix

- java.lang.Object
- - org.eclipse.rdf4j.sparqlbuilder.core.Prefix

- All Implemented Interfaces:
    QueryElement

      public class Prefix
      extends Object
      implements QueryElement

  A SPARQL Prefix declaration
  See Also:
    SPARQL Prefix

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `String` | `getQueryString()`
    `int` | `hashCode()`
    `Iri` | `iri(String localName)` Create a prefixed IRI reference from this prefix

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

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

- - ### Method Detail

    - #### iri

          public Iri iri(String localName)

      Create a prefixed IRI reference from this prefix
      Parameters:
        `localName` - the local part of the prefixed IRI
      Returns:
        a prefixed IRI reference, with this prefix's label as the base, and the given string for the local part

    - #### getQueryString

          public String getQueryString()

      Specified by:
        `getQueryString` in interface `QueryElement`
      Returns:
        the String representing the SPARQL syntax of this element

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

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