java.lang.Object
org.apache.jena.langtagx.LangTagX
This class defined the Jena side policies for language tags and maps operations to
LangTags.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringDeprecated, for removal: This API element is subject to removal in a future version.static booleancheckLanguageTag(String langTagStr) Check a string is valid as a language tag.static booleancheckLanguageTagBasicSyntax(String langTagStr) Check a language tag string meets the Turtle(etc) and SPARQL grammar rule for a language tag without initial text direction.static org.apache.jena.langtag.LangTagcreateLanguageTag(String langTagStr) Create aLangTagobject, using the Jena system default implementation of theLangTaginterface.static StringformatLanguageTag(String langTagStr) Prepare the language tag - apply formatting normalization, and always return a string.static voidrequireValidLanguageTag(String langTagStr) Check a string is valid as a language tag.static booleansameLanguageTagAs(String langTagStr1, String langTagStr2) Is @code{langTagStr1} the same language tag as @code{langTagStr2}?
-
Constructor Details
-
LangTagX
public LangTagX()
-
-
Method Details
-
createLanguageTag
Create aLangTagobject, using the Jena system default implementation of theLangTaginterface. The string must conform to the syntax defined in rules and syntax in RFC 5646 -
formatLanguageTag
Prepare the language tag - apply formatting normalization, and always return a string. If the input is invalid as a language tag, return the input as-is.- Throws:
JenaException- on an all blank string.
-
canonical
Deprecated, for removal: This API element is subject to removal in a future version. -
checkLanguageTag
Check a string is valid as a language tag. This function returns true or false and does not throw an exception. -
checkLanguageTagBasicSyntax
Check a language tag string meets the Turtle(etc) and SPARQL grammar rule for a language tag without initial text direction.Passing this test does not guarantee the string is valid language tag. Use
checkLanguageTag(String)for validity checking. -
requireValidLanguageTag
Check a string is valid as a language tag. Throw aJenaExceptionif it is not valid. -
sameLanguageTagAs
Is @code{langTagStr1} the same language tag as @code{langTagStr2}?
-
formatLanguageTag(String)