Class LangTag

java.lang.Object
org.apache.jena.riot.web.LangTag

@Deprecated(forRemoval=true) public class LangTag extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Use LangTagX
Language tags: support for parsing and canonicalization of case. Grandfathered forms ("i-") are left untouched. Unsupported or syntactically illegal forms are handled in canonicalization by doing nothing.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Index of all extensions
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Index of the language part
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Index of the region part
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Index of the script part
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Index of the variant part
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    canonical(String langTagStr)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Use LangTagX.formatLanguageTag(String)
    static boolean
    check(String languageTag)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Use LangTagX.checkLanguageTag(String)
    static String[]
    parse(String languageTag)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Use LangTag.of(String) to create a language tag object.

    Methods inherited from class java.lang.Object

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

    • idxLanguage

      public static final int idxLanguage
      Deprecated, for removal: This API element is subject to removal in a future version.
      Index of the language part
      See Also:
    • idxScript

      public static final int idxScript
      Deprecated, for removal: This API element is subject to removal in a future version.
      Index of the script part
      See Also:
    • idxRegion

      public static final int idxRegion
      Deprecated, for removal: This API element is subject to removal in a future version.
      Index of the region part
      See Also:
    • idxVariant

      public static final int idxVariant
      Deprecated, for removal: This API element is subject to removal in a future version.
      Index of the variant part
      See Also:
    • idxExtension

      public static final int idxExtension
      Deprecated, for removal: This API element is subject to removal in a future version.
      Index of all extensions
      See Also:
  • Method Details

    • check

      @Deprecated(forRemoval=true) public static boolean check(String languageTag)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use LangTagX.checkLanguageTag(String)
      Validate - basic syntax check for a language tags: [a-zA-Z]+ ('-'[a-zA-Z0-9]+)*
    • parse

      @Deprecated(forRemoval=true) public static String[] parse(String languageTag)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use LangTag.of(String) to create a language tag object.
      Parse a langtag string and return it's parts in canonical case. See constants for the array contents. Parts not present cause a null in the return array.
      Returns:
      The language tag parts, or null if the input string does not parse as a lang tag.
    • canonical

      @Deprecated(forRemoval=true) public static String canonical(String langTagStr)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use LangTagX.formatLanguageTag(String)
      Canonicalize with the rules ofRFC 5646 without replacement of preferred form.