org.openrdf.model.util.language
Class LanguageTag
java.lang.Object
org.openrdf.model.util.language.LanguageTag
- All Implemented Interfaces:
- LanguageTagCodes
- Direct Known Subclasses:
- IanaLanguageTag
public class LanguageTag
- extends Object
- implements LanguageTagCodes
RFC 3066, "Tags for the Identification of Languages".
- Author:
- jjc
| Fields inherited from interface org.openrdf.model.util.language.LanguageTagCodes |
LT_DEFAULT, LT_EXTRA, LT_IANA, LT_IANA_DEPRECATED, LT_ILLEGAL, LT_ISO3166, LT_ISO639, LT_LOCAL_USE, LT_MULTIPLE, LT_PRIVATE_USE, LT_UNDETERMINED |
LanguageTag
public LanguageTag(String tag)
throws LanguageTagSyntaxException
- Creates new RFC3066 LanguageTag.
- Parameters:
tag - The tag to parse and analyse.
- Throws:
LanguageTagSyntaxException - If the syntactic rules of RFC3066 section 2.1 are broken.
hasLanguage
public boolean hasLanguage()
getLanguage
public Iso639 getLanguage()
hasCountry
public boolean hasCountry()
getCountry
public Iso3166 getCountry()
hasVariant
public boolean hasVariant()
getVariant
public String getVariant()
toString
public String toString()
- Overrides:
toString in class Object
toLocale
public Locale toLocale()
Copyright © 2001-2012 Aduna. All Rights Reserved.