Overview | Package | Class | Tree | Deprecated | Index | Help
| J2EE1.4 SDK
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.xml.registry.infomodel
Interface InternationalString

public interface InternationalString

This interface represents a String that has been internationalized into several Locales. This interface is used as a replacement for the String type whenever a String attribute needs to be I18N capable. An instance of the InternationalString interface composes within it a Collection of LocalizedString instances, where each String is specific to a particular Locale. The InternationalString interface provides set/get methods for adding or getting locale specific String values for the InternationalString instance.

Author:
  Farrukh S. Najmi
See Also:
  `LocalizedString`

Method Summary
`void` | `addLocalizedString(LocalizedString localizedString)` Adds a LocalizedString to this object.
`void` | `addLocalizedStrings(java.util.Collection localizedStrings)` Adds many LocalizedStrings to this object.
`LocalizedString` | `getLocalizedString(java.util.Locale locale, java.lang.String charsetName)` Gets the LocalizedString for the specified Locale and charsetName.
`java.util.Collection` | `getLocalizedStrings()` Returns the LocalizedStrings associated with this object.
`java.lang.String` | `getValue()` Gets the String value for the Locale returned by Locale.getDefault().
`java.lang.String` | `getValue(java.util.Locale locale)` Gets the String value for the specified Locale.
`void` | `removeLocalizedString(LocalizedString localizedString)` Removes a LocalizedString from this object.
`void` | `removeLocalizedStrings(java.util.Collection localizedStrings)` Removes specified LocalizedStrings to this object.
`void` | `setValue(java.util.Locale locale, java.lang.String value)` Sets the String value for the specified Locale.
`void` | `setValue(java.lang.String value)` Sets the String value for the Locale returned by Locale.getDefault().

Method Detail

### getValue

    public java.lang.String getValue()
                              throws JAXRException

  Gets the String value for the Locale returned by Locale.getDefault().

  Capability Level: 0

  Returns:
    the String value for the Locale returned by Locale.getDefault()
  Throws:
    `JAXRException` - If the JAXR provider encounters an internal error

### getValue

    public java.lang.String getValue(java.util.Locale locale)
                              throws JAXRException

  Gets the String value for the specified Locale. Return null if no locale specific value is found for the specified locale.

  Capability Level: 0

  Parameters:
    `locale` - The Locale for the desired value
  Returns:
    the String value for the specified Locale
  Throws:
    `JAXRException` - If the JAXR provider encounters an internal error

### setValue

    public void setValue(java.lang.String value)
                  throws JAXRException

  Sets the String value for the Locale returned by Locale.getDefault().

  Capability Level: 0

  Parameters:
    `value` - the String value for the Locale returned by Locale.getDefault()
  Throws:
    `JAXRException` - If the JAXR provider encounters an internal error

### setValue

    public void setValue(java.util.Locale locale,
                         java.lang.String value)
                  throws JAXRException

  Sets the String value for the specified Locale.

  Capability Level: 0

  Parameters:
    `locale` - The locale for this value being set
    `value` - The value being set
  Throws:
    `JAXRException` - If the JAXR provider encounters an internal error

### addLocalizedString

    public void addLocalizedString(LocalizedString localizedString)
                            throws JAXRException

  Adds a LocalizedString to this object.

  Capability Level: 0

  Parameters:
    `localizedString` - the LocalizedString being added to this object
  Throws:
    `JAXRException` - If the JAXR provider encounters an internal error

### addLocalizedStrings

    public void addLocalizedStrings(java.util.Collection localizedStrings)
                             throws JAXRException

  Adds many LocalizedStrings to this object.

  Capability Level: 0

  Parameters:
    `localizedStrings` - the Collection of LocalizedStrings being added to this object
  Throws:
    `JAXRException` - If the JAXR provider encounters an internal error

### removeLocalizedString

    public void removeLocalizedString(LocalizedString localizedString)
                               throws JAXRException

  Removes a LocalizedString from this object.

  Capability Level: 0

  Parameters:
    `localizedString` - the LocalizedString being removed from this object
  Throws:
    `JAXRException` - If the JAXR provider encounters an internal error

### removeLocalizedStrings

    public void removeLocalizedStrings(java.util.Collection localizedStrings)
                                throws JAXRException

  Removes specified LocalizedStrings to this object.

  Capability Level: 0

  Parameters:
    `localizedStrings` - the Collection of LocalizedStrings being removed from this object
  Throws:
    `JAXRException` - If the JAXR provider encounters an internal error

### getLocalizedString

    public LocalizedString getLocalizedString(java.util.Locale locale,
                                              java.lang.String charsetName)
                                       throws JAXRException

  Gets the LocalizedString for the specified Locale and charsetName.

  Capability Level: 0

  Parameters:
    `locale` - The loacle for the desired LocalizedStrings
    `charsetName` - The character set name for the desired LocalizedStrings
  Returns:
    the LocalizedString that matches specified locale and character set
  Throws:
    `JAXRException` - If the JAXR provider encounters an internal error

### getLocalizedStrings

    public java.util.Collection getLocalizedStrings()
                                             throws JAXRException

  Returns the LocalizedStrings associated with this object.

  Capability Level: 0

  Returns:
    Collection of LocalizedString instances. The Collection may be empty but not null.
  Throws:
    `JAXRException` - If the JAXR provider encounters an internal error
  See Also:
    `LocalizedString`

Overview | Package | Class | Tree | Deprecated | Index | Help
| J2EE1.4 SDK
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature

Copyright 2003 Sun Microsystems, Inc. All rights reserved.