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

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

public class XsdString
extends Object
implements IdDecoratedMetadata, CopyableMetaData

Author:
Stefano Maestri
See Also:
Serialized Form

Field Summary
protected  String id
          XML ID
static XsdString NULL_XSDSTRING
          A NULL immutable instance
protected  String tag
          tag name
protected  String value
          the actual String value
 
Constructor Summary
XsdString(String value, String id)
          Constructor without tag name
XsdString(String value, String id, String tag)
           
 
Method Summary
 CopyableMetaData copy()
          Creates and returns a copy of this object.
 boolean equals(Object obj)
          
 String getId()
          Return the String representing xml ID
 String getTag()
          
 String getValue()
           
 int hashCode()
          
static boolean isNull(XsdString xsdString)
          convenient method to test if an XsdString is null NULLXsdString instance
 void setTag(String tg)
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_XSDSTRING

public static final XsdString NULL_XSDSTRING
A NULL immutable instance


value

protected final String value
the actual String value


id

protected final String id
XML ID


tag

protected String tag
tag name

Constructor Detail

XsdString

public XsdString(String value,
                 String id,
                 String tag)
Parameters:
value - the actual String value
id - XML ID
tag - name

XsdString

public XsdString(String value,
                 String id)
Constructor without tag name

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

getValue

public String getValue()
Returns:
value

getId

public String getId()
Return the String representing xml ID

Specified by:
getId in interface IdDecoratedMetadata
Returns:
the XML ID
See Also:
IdDecoratedMetadata.getId()

getTag

public String getTag()

See Also:
IdDecoratedMetadata.getId()

setTag

public void setTag(String tg)

See Also:
IdDecoratedMetadata.getId()

hashCode

public int hashCode()

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

equals

public boolean equals(Object obj)

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

toString

public String toString()

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

isNull

public static boolean isNull(XsdString xsdString)
convenient method to test if an XsdString is null NULLXsdString instance

Parameters:
xsdString - the xsdString to test
Returns:
ture if passes xsdString is null or equals to NULLXsdString instance

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
Returns:
a copy of this instance.


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