org.openrdf.model.util.language
Class LanguageTag

java.lang.Object
  extended by 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

Field Summary
 
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
 
Constructor Summary
LanguageTag(String tag)
          Creates new RFC3066 LanguageTag.
 
Method Summary
 Iso3166 getCountry()
           
 Iso639 getLanguage()
           
 String getVariant()
           
 boolean hasCountry()
           
 boolean hasLanguage()
           
 boolean hasVariant()
           
 Locale toLocale()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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.