com.sun.xml.registry.ebxml.infomodel
Class InternationalStringImpl

java.lang.Object
  extended bycom.sun.xml.registry.ebxml.infomodel.InternationalStringImpl
All Implemented Interfaces:
java.lang.Cloneable, javax.xml.registry.infomodel.InternationalString

public class InternationalStringImpl
extends java.lang.Object
implements javax.xml.registry.infomodel.InternationalString, java.lang.Cloneable

Class Declaration for Class1

Author:
Farrukh S. Najmi

Constructor Summary
InternationalStringImpl(LifeCycleManagerImpl lcm)
           
InternationalStringImpl(LifeCycleManagerImpl lcm, org.oasis.ebxml.registry.bindings.rim.InternationalStringType ebObj)
           
 
Method Summary
 void addLocalizedString(javax.xml.registry.infomodel.LocalizedString ls)
           
 void addLocalizedStrings(java.util.Collection localizedStrings)
           
 java.lang.Object clone()
           
static java.util.List getClosestKeys(java.util.Locale locale, java.lang.String charset)
          Gets a List of possible keys to be used when searching for the closest LocalizedString for a given locale/charset pair.
 javax.xml.registry.infomodel.LocalizedString getClosestLocalizedString()
          Gets the LocalizedString for the default locale (Locale.getDefault() ) or the closest match, according to a precedence list (see getClosestKeys( java.util.Locale, java.lang.String).
 javax.xml.registry.infomodel.LocalizedString getClosestLocalizedString(java.util.Locale locale, java.lang.String charsetName)
          Gets the LocalizedString for the given locale or the closest match, according to a precedence list (see getClosestKeys(java.util.Locale, java.lang.String).
 java.lang.String getClosestValue()
          Gets the localized value of an InternationalString using default locale (Locale.getDefault()) or the closest match, according to a precedence list (see getClosestKeys(java.util.Locale, java.lang.String).
 java.lang.String getClosestValue(java.util.Locale locale)
          Gets the localized value of an InternationalString for a given Locale or the closest match, according to a precedence list (see getClosestKeys( java.util.Locale, java.lang.String).
 javax.xml.registry.infomodel.LocalizedString getLocalizedString(java.util.Locale locale, java.lang.String charsetName)
           
 java.util.Collection getLocalizedStrings()
           
 java.lang.String getValue()
           
 java.lang.String getValue(java.util.Locale locale)
           
 void removeLocalizedString(javax.xml.registry.infomodel.LocalizedString ls)
           
 void removeLocalizedStrings(java.util.Collection localizedStrings)
           
protected  void setBindingObject(org.oasis.ebxml.registry.bindings.rim.InternationalStringType ebIS)
           
 void setValue(java.util.Locale locale, java.lang.String val)
           
 void setValue(java.lang.String val)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InternationalStringImpl

public InternationalStringImpl(LifeCycleManagerImpl lcm)
                        throws javax.xml.registry.JAXRException

InternationalStringImpl

public InternationalStringImpl(LifeCycleManagerImpl lcm,
                               org.oasis.ebxml.registry.bindings.rim.InternationalStringType ebObj)
                        throws javax.xml.registry.JAXRException
Method Detail

getValue

public java.lang.String getValue()
                          throws javax.xml.registry.JAXRException
Specified by:
getValue in interface javax.xml.registry.infomodel.InternationalString
Throws:
javax.xml.registry.JAXRException

getValue

public java.lang.String getValue(java.util.Locale locale)
                          throws javax.xml.registry.JAXRException
Specified by:
getValue in interface javax.xml.registry.infomodel.InternationalString
Throws:
javax.xml.registry.JAXRException

setValue

public void setValue(java.lang.String val)
              throws javax.xml.registry.JAXRException
Specified by:
setValue in interface javax.xml.registry.infomodel.InternationalString
Throws:
javax.xml.registry.JAXRException

setValue

public void setValue(java.util.Locale locale,
                     java.lang.String val)
              throws javax.xml.registry.JAXRException
Specified by:
setValue in interface javax.xml.registry.infomodel.InternationalString
Throws:
javax.xml.registry.JAXRException

addLocalizedString

public void addLocalizedString(javax.xml.registry.infomodel.LocalizedString ls)
                        throws javax.xml.registry.JAXRException
Specified by:
addLocalizedString in interface javax.xml.registry.infomodel.InternationalString
Throws:
javax.xml.registry.JAXRException

addLocalizedStrings

public void addLocalizedStrings(java.util.Collection localizedStrings)
                         throws javax.xml.registry.JAXRException
Specified by:
addLocalizedStrings in interface javax.xml.registry.infomodel.InternationalString
Throws:
javax.xml.registry.JAXRException

removeLocalizedString

public void removeLocalizedString(javax.xml.registry.infomodel.LocalizedString ls)
                           throws javax.xml.registry.JAXRException
Specified by:
removeLocalizedString in interface javax.xml.registry.infomodel.InternationalString
Throws:
javax.xml.registry.JAXRException

removeLocalizedStrings

public void removeLocalizedStrings(java.util.Collection localizedStrings)
                            throws javax.xml.registry.JAXRException
Specified by:
removeLocalizedStrings in interface javax.xml.registry.infomodel.InternationalString
Throws:
javax.xml.registry.JAXRException

getLocalizedString

public javax.xml.registry.infomodel.LocalizedString getLocalizedString(java.util.Locale locale,
                                                                       java.lang.String charsetName)
                                                                throws javax.xml.registry.JAXRException
Specified by:
getLocalizedString in interface javax.xml.registry.infomodel.InternationalString
Throws:
javax.xml.registry.JAXRException

getLocalizedStrings

public java.util.Collection getLocalizedStrings()
                                         throws javax.xml.registry.JAXRException
Specified by:
getLocalizedStrings in interface javax.xml.registry.infomodel.InternationalString
Throws:
javax.xml.registry.JAXRException

getClosestLocalizedString

public javax.xml.registry.infomodel.LocalizedString getClosestLocalizedString()
                                                                       throws javax.xml.registry.JAXRException
Gets the LocalizedString for the default locale (Locale.getDefault() ) or the closest match, according to a precedence list (see getClosestKeys( java.util.Locale, java.lang.String).

Returns:
LocalizedString for default Locale or for the 1st alternate Locale found. Null if nothing found.
Throws:
javax.xml.registry.JAXRException

getClosestLocalizedString

public javax.xml.registry.infomodel.LocalizedString getClosestLocalizedString(java.util.Locale locale,
                                                                              java.lang.String charsetName)
                                                                       throws javax.xml.registry.JAXRException
Gets the LocalizedString for the given locale or the closest match, according to a precedence list (see getClosestKeys(java.util.Locale, java.lang.String).

Parameters:
locale - the desired Locale
Returns:
LocalizedString for 'locale' or for the 1st alternate Locale found. Null if nothing found.
Throws:
javax.xml.registry.JAXRException

getClosestValue

public java.lang.String getClosestValue()
                                 throws javax.xml.registry.JAXRException
Gets the localized value of an InternationalString using default locale (Locale.getDefault()) or the closest match, according to a precedence list (see getClosestKeys(java.util.Locale, java.lang.String).

Returns:
String with LocalizedString's value for 'locale' or for the 1st alternate Locale found. Null if nothing found.
Throws:
javax.xml.registry.JAXRException

getClosestValue

public java.lang.String getClosestValue(java.util.Locale locale)
                                 throws javax.xml.registry.JAXRException
Gets the localized value of an InternationalString for a given Locale or the closest match, according to a precedence list (see getClosestKeys( java.util.Locale, java.lang.String).

Parameters:
locale - the desired Locale
Returns:
String with LocalizedString's value for 'locale' or for the 1st alternate Locale found. Null if nothing found.
Throws:
javax.xml.registry.JAXRException

getClosestKeys

public static java.util.List getClosestKeys(java.util.Locale locale,
                                            java.lang.String charset)
Gets a List of possible keys to be used when searching for the closest LocalizedString for a given locale/charset pair. The List starts with a key for the specific locale (ignored if null) followed by a lookup precedence list of alternative keys (inspired on java.util.ResourceBundle) as shown bellow. Where:

Parameters:
charset - the charset name
locale - the locale
Returns:
List with the keys along the search path.

setBindingObject

protected void setBindingObject(org.oasis.ebxml.registry.bindings.rim.InternationalStringType ebIS)
                         throws javax.xml.registry.JAXRException
Throws:
javax.xml.registry.JAXRException

clone

public java.lang.Object clone()

toString

public java.lang.String toString()


Copyright © 2001-2004 OASIS. All Rights Reserved.