Previous section   Next section
LocalizedString javax.xml.registry.infomodel

JAXR 1.0; JWSDP 1.0, J2EE 1.4
public interface LocalizedString {
// Public Constants
    public static final String DEFAULT_CHARSET_NAME;
               //="UTF-8"
// Public Instance Methods
    public abstract String getCharsetName(  )
       throws javax.xml.registry.JAXRException;             //L0
    public abstract Locale getLocale(  )
       throws javax.xml.registry.JAXRException;             //L0
    public abstract String getValue(  )
       throws javax.xml.registry.JAXRException;             //L0
    public abstract void setCharsetName(String charsetName)
       throws javax.xml.registry.JAXRException;             //L0
    public abstract void setLocale(Locale locale)
       throws javax.xml.registry.JAXRException;             //L0
    public abstract void setValue(String value)
       throws javax.xml.registry.JAXRException;             //L0
}

LocalizedString is a container for a string together with a locale and a character set. One or more LocalizedStrings are typically combined in an InternationalString to provide a single object that can provide a localized variant of a text string for several locales. To create a new LocalizedString( ), use the LifeCycleManager createLocalizedString( ) method, which requires at least the locale for which the object is being created and the text to be used in that locale. Optionally, a character set may also be specified; if no value is supplied, then UTF-8 is assumed.

The getValue( ), getLocale( ), and getCharsetName( ) methods return the text, locale, and character set associated with the LocalizedString. If no explicit character set is specified, then the getCharsetName( ) method returns "UTF-8". The values of any of these attributes can be changed at any time by calling setValue( ), setLocale( ), or setCharsetName( ).

Passed To

InternationalString.{addLocalizedString( ), removeLocalizedString( )}

Returned By

javax.xml.registry.LifeCycleManager.createLocalizedString( ), InternationalString.getLocalizedString( )


  Previous section   Next section