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. QueryLanguage objects are identified by their name, which is treated in as case-insensitive way.
  • Field Details

    • 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
  • Constructor Details

    • QueryLanguage

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

    • 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