Class CurrencyModel

java.lang.Object
com.highdeal.hci.HCIModelAdapter
com.highdeal.hci.CurrencyModel
All Implemented Interfaces:
ITagNameProvider, IXMLMarshallable, XMLMarshallable

public class CurrencyModel extends HCIModelAdapter
This Java class represents a currency as a Java Currency container; This class extends the java.lang.Currency by adding features to marshal the objects.

A currency is identified by its ISO 4217 currency code.

See Also:

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:complexType name="CurrencyType">
   <xs:attribute name="value" type="xs:string"/>
 </xs:complexType>

  • Field Details

  • Constructor Details

    • CurrencyModel

      public CurrencyModel()
      Constructs an empty currency model.
    • CurrencyModel

      public CurrencyModel(String value)
      Constructs a currency model filled with the specified value.
      Parameters:
      value - The value to store in this currency model
  • Method Details

    • getValue

      public String getValue()
      Gets the value of the currency.
      Returns:
      A string containing the value of the currency
    • setValue

      public void setValue(String value)
      Sets the currency model value.
      Parameters:
      value - The value to set up in this currency model
    • marshalAttributes

      public void marshalAttributes(XMLOutputter output)
      Description copied from interface: IXMLMarshallable
      Gives an XML representation of the attributes of an object.
      Parameters:
      output - The XML output to marshal the object attributes into
    • marshalChildren

      public void marshalChildren(XMLOutputter output)
      Description copied from interface: IXMLMarshallable
      Gives an XML representation of the child objects of an object.
      Parameters:
      output - The XML output to marshal the child objects into
    • addCharacterData

      public void addCharacterData(String cData)
      Description copied from interface: XMLMarshallable
      Adds character data to the content element.
      Parameters:
      cData - The character data to be added
    • 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.
      Parameters:
      tagName - The name of tag for the child
      child - The child 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.
      Parameters:
      atts - The XML attributes of the current element
    • getTagName

      public String getTagName()
      Description copied from interface: ITagNameProvider
      Gets the XML tag name of the HCI model.
      Returns:
      The XML tag name