org.apache.shindig.gadgets.spec
Class LocaleSpec

java.lang.Object
  extended by org.apache.shindig.gadgets.spec.LocaleSpec

public class LocaleSpec
extends Object

Represents a Locale tag. Generally compatible with java.util.Locale, but with some extra localization data from the spec. Named "LocaleSpec" so as to not conflict with java.util.Locale No localization. No user pref substitution.


Constructor Summary
LocaleSpec(Element element, Uri specUrl)
           
 
Method Summary
 String getCountry()
          Locale@country
 String getLanguage()
          Locale@lang
 String getLanguageDirection()
          Locale@language_direction
 Locale getLocale()
           
 MessageBundle getMessageBundle()
          Locale/msg
 Uri getMessages()
          Locale@messages
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocaleSpec

public LocaleSpec(Element element,
                  Uri specUrl)
           throws SpecParserException
Parameters:
specUrl - The url that the spec is loaded from. messages is assumed to be relative to this path.
Throws:
SpecParserException - If language_direction is not valid
Method Detail

getLocale

public Locale getLocale()

getLanguage

public String getLanguage()
Locale@lang


getCountry

public String getCountry()
Locale@country


getLanguageDirection

public String getLanguageDirection()
Locale@language_direction


getMessages

public Uri getMessages()
Locale@messages


getMessageBundle

public MessageBundle getMessageBundle()
Locale/msg


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2012. All Rights Reserved.