org.eclipse.rdf4j.query

## Class QueryLanguage

- java.lang.Object
- - org.eclipse.rdf4j.query.QueryLanguage

-     public class QueryLanguage
      extends Object

  A type-safe enumeration for RDF query languages such as `SPARQL` and `SeRQL`. QueryLanguage objects are identified by their name, which is treated in as case-insensitive way.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static QueryLanguage` | `SERQL` SeRQL (Sesame RDF Query Language) is a Sesame-specific query language for RDF, which predates SPARQL.
    `static QueryLanguage` | `SERQO` Deprecated. since 2.0. This language is no longer actively supported.
    `static QueryLanguage` | `SPARQL` SPARQL (Simple Protocol and RDF Query Language) is a W3C Recommendation for querying and updating RDF data.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `QueryLanguage(String name)` Creates a new QueryLanguage object.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object other)`
    `String` | `getName()` Gets the name of this query language.
    `int` | `hashCode()`
    `boolean` | `hasName(String name)`
    `static void` | `register(QueryLanguage ql)` Registers the specified query language.
    `static QueryLanguage` | `register(String name)` Registers the specified query language.
    `String` | `toString()`
    `static QueryLanguage` | `valueOf(String qlName)` Returns the query language whose name matches the specified name.
    `static Collection<QueryLanguage>` | `values()` Returns all known/registered query languages.

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

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

- - ### Field Detail

    - #### SERQL

          public static final QueryLanguage SERQL

      SeRQL (Sesame RDF Query Language) is a Sesame-specific query language for RDF, which predates SPARQL.
      See Also:
        The SeRQL user manual

    - #### SPARQL

          public static final QueryLanguage SPARQL

      SPARQL (Simple Protocol and RDF Query Language) is a W3C Recommendation for querying and updating RDF data.
      See Also:
        SPARQL 1.1 Overview

    - #### SERQO

          @Deprecated
          public static final QueryLanguage SERQO

      Deprecated. since 2.0. This language is no longer actively supported.
      SeRQO (Sesame RDF Query Language - Objects) is a Sesame-specific query language using a syntax suited less for human editing but for easy transfer over the wire.

  - ### Constructor Detail

    - #### QueryLanguage

          public QueryLanguage(String name)

      Creates a new QueryLanguage object.
      Parameters:
        `name` - The (case-insensitive) name of the query language, e.g. "SPARQL".

  - ### Method Detail

    - #### values

          public static Collection<QueryLanguage> values()

      Returns all known/registered query languages.

    - #### register

          public static QueryLanguage register(String name)

      Registers the specified query language.
      Parameters:
        `name` - The name of the query language, e.g. "SPARQL".

    - #### register

          public static void register(QueryLanguage ql)

      Registers the specified query language.

    - #### valueOf

          public static QueryLanguage valueOf(String qlName)

      Returns the query language whose name matches the specified name.
      Parameters:
        `qlName` - A query language name.
      Returns:
        The query language whose name matches the specified name, or `null` if there is no such query language.

    - #### getName

          public String getName()

      Gets the name of this query language.
      Returns:
        A human-readable format name, e.g. "SPARQL".

    - #### hasName

          public boolean hasName(String name)

    - #### equals

          public boolean equals(Object other)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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