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, value
 
Constructor Summary
LocalizedXsdString(String value, String id)
          Constructor for default language "en"
LocalizedXsdString(String value, String id, String lang)
           
 
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()
          
 String toString()
          
 
Methods inherited from class org.jboss.jca.common.api.metadata.ra.XsdString
getId, getValue, isNull
 
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)
Parameters:
value - value of the String
id - XML ID
lang - language

LocalizedXsdString

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

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

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)