Class RFC3066LanguageHandler

java.lang.Object
org.eclipse.rdf4j.rio.languages.RFC3066LanguageHandler
All Implemented Interfaces:
LanguageHandler

public class RFC3066LanguageHandler extends Object implements LanguageHandler
A language handler that can verify RFC3066 formatted language tags.

This language handler normalises language tags to lower-case if normalizeLanguage(String, String, ValueFactory) is used.

Author:
Peter Ansell
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Pattern
    Language tag is RFC3066-conformant if it matches this regex: [a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*

    Fields inherited from interface org.eclipse.rdf4j.rio.LanguageHandler

    BCP47, RFC3066, RFC4646
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    A unique key for this language handler to identify it in the LanguageHandlerRegistry.
    boolean
    Checks if the given language tag is recognized by this language handler, including cases where the language tag is considered syntactically well-formed, but is not yet normalized.
    normalizeLanguage(String literalValue, String languageTag, ValueFactory valueFactory)
    Normalize both the language tag and the language if appropriate, and use the given value factory to generate a literal matching the literal value and language tag.
    boolean
    verifyLanguage(String literalValue, String languageTag)
    Verifies that the language tag is syntactically well-formed, optionally including an automated check on the literal value being a match for the given tag.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • matcher

      protected final Pattern matcher
      Language tag is RFC3066-conformant if it matches this regex: [a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*
  • Constructor Details

    • RFC3066LanguageHandler

      public RFC3066LanguageHandler()
      Default constructor.
  • Method Details