org.jboss.jca.common.api.metadata.ra
Class LocalizedXsdString

java.lang.Object
  extended by org.jboss.jca.common.api.metadata.ra.XsdString
      extended by org.jboss.jca.common.api.metadata.ra.LocalizedXsdString
All Implemented Interfaces:
Serializable, Cloneable, CopyableMetaData, JCAMetadata, IdDecoratedMetadata, LocalizedMetadata

public class LocalizedXsdString
extends XsdString
implements LocalizedMetadata

Author:
Stefano Maestri
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.jca.common.api.metadata.ra.XsdString
id, NULL_XSDSTRING, tag, value
 
Constructor Summary
LocalizedXsdString(String value, String id)
          Constructor for default language without tag
LocalizedXsdString(String value, String id, String lang)
          Constructor for default language
LocalizedXsdString(String value, String id, String lang, String tag)
           
 
Method Summary
 CopyableMetaData copy()
          Creates and returns a copy of this object.
 boolean equals(Object obj)
          
 String getLang()
          Language used for this string at xml level.
 int hashCode()
          
 void setLang(String lng)
          
 String toString()
          
 
Methods inherited from class org.jboss.jca.common.api.metadata.ra.XsdString
getId, getTag, getValue, isNull, setTag
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalizedXsdString

public LocalizedXsdString(String value,
                          String id,
                          String lang,
                          String tag)
Parameters:
value - value of the String
id - XML ID
lang - language
tag - name

LocalizedXsdString

public LocalizedXsdString(String value,
                          String id,
                          String lang)
Constructor for default language

Parameters:
value - value of the String
id - XML ID
lang - language

LocalizedXsdString

public LocalizedXsdString(String value,
                          String id)
Constructor for default language without tag

Parameters:
value - value of the String
id - XML ID
Method Detail

getLang

public String getLang()
Description copied from interface: LocalizedMetadata
Language used for this string at xml level. Value are like "en", "it", "fr" and so on

Specified by:
getLang in interface LocalizedMetadata
Returns:
lang

setLang

public void setLang(String lng)

See Also:
IdDecoratedMetadata.getId()

hashCode

public int hashCode()

Overrides:
hashCode in class XsdString
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)

Overrides:
equals in class XsdString
See Also:
Object.equals(java.lang.Object)

toString

public String toString()

Overrides:
toString in class XsdString
See Also:
Object.toString()

copy

public CopyableMetaData copy()
Description copied from interface: CopyableMetaData
Creates and returns a copy of this object. Ther copy is done in deep of all elements. It isn't formally a clone of the instance since it does not respect the assumption for which returned clone of cloneMethod are instance of Object

Specified by:
copy in interface CopyableMetaData
Overrides:
copy in class XsdString
Returns:
a copy of this instance.


Copyright © 2012 JBoss, by Red Hat (http://www.jboss.org/ironjacamar)