Class XsdString

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

public class XsdString extends Object implements IdDecoratedMetadata, CopyableMetaData
A XML string
Author:
Stefano Maestri, Jesper Pedersen
See Also:
  • Field Details

    • NULL_XSDSTRING

      public static final XsdString NULL_XSDSTRING
      A NULL immutable instance
    • value

      protected String value
      the actual String value
    • id

      protected String id
      XML ID
    • tag

      protected String tag
      tag name
  • Constructor Details

    • XsdString

      public XsdString(String value, String id)
      Constructor
      Parameters:
      value - the actual String value
      id - XML ID
    • XsdString

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

    • getValue

      public String getValue()
      Get the XML String content
      Returns:
      The value
    • getId

      public String getId()
      Return the String representing xml ID
      Specified by:
      getId in interface IdDecoratedMetadata
      Returns:
      the XML ID
    • getTag

      public String getTag()
      Get the XML tag content
      Returns:
      The value
    • setTag

      public void setTag(String tg)
      Set the XML tag content
      Parameters:
      tg - The value
    • copy

      public CopyableMetaData copy()
      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.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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