Class UniqueIdentifier

java.lang.Object
com.highdeal.pnr.hci.UniqueIdentifier
All Implemented Interfaces:
XMLMarshallable

public class UniqueIdentifier extends Object implements XMLMarshallable

This object represents a unique identifier with a type and a value.

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="uid">
   <xs:complexType>
     <xs:attribute name="type" type="xs:string" use="required" />
     <xs:attribute name="value" type="xs:string" use="required" />
   </xs:complexType>
 </xs:element>

  • Field Details

  • Constructor Details

    • UniqueIdentifier

      public UniqueIdentifier()
      Builds an empty unique identifier object.
  • Method Details

    • getType

      public String getType()
      Gets the type of the unique identifier.
      Returns:
      the type of the unique identifier
    • setType

      public void setType(String type)
      Sets the type of the unique identifier.
      Parameters:
      type - the type of the unique identifier
    • getValue

      public String getValue()
      Gets the value of the unique identifier.
      Returns:
      the value of the unique identifier
    • setValue

      public void setValue(String value)
      Sets the value of the unique identifier.
      Parameters:
      value - the value of the unique identifier
    • addCharacterData

      public void addCharacterData(String cData)
      Description copied from interface: XMLMarshallable
      Adds character data to the content element.
      Specified by:
      addCharacterData in interface XMLMarshallable
      Parameters:
      cData - The character data to be added
    • setAttributes

      public void setAttributes(XMLAttributes atts)
      Description copied from interface: XMLMarshallable
      Sets the attributes of the XML representation of the element being processed.
      Specified by:
      setAttributes in interface XMLMarshallable
      Parameters:
      atts - The XML attributes of the current element
    • addChild

      public void addChild(String tagName, XMLMarshallable child)
      Description copied from interface: XMLMarshallable
      Adds a child to the object, the child representing the marshallable object which must be added to the element.
      Specified by:
      addChild in interface XMLMarshallable
      Parameters:
      tagName - The name of tag for the child
      child - The child to be added
    • marshal

      public void marshal(XMLOutputter output)
      Description copied from interface: XMLMarshallable
      Gives an XML representation of this object, including its children.
      Specified by:
      marshal in interface XMLMarshallable
      Parameters:
      output - The XML output to marshal the object into
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • valueOf

      public static UniqueIdentifier valueOf(String input)
      Returns a unique identifier based on its string representation.
      Parameters:
      input - an input string representing the unique identifier and following the format of the toString() method
      Returns:
      a unique identifier objects corresponding to the input string