Class DescriptionModel

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

public class DescriptionModel extends HCIModelAdapter
This class is a description container.

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:simpleType name="DescriptionType">
   <xs:restriction base="xs:string" />
  </xs:simpleType>

  • Field Details

    • TAG_NAME

      public static final String TAG_NAME
      The value of that constant is the XML tag name of the Description.
      See Also:
  • Constructor Details

    • DescriptionModel

      public DescriptionModel()
      Constructs a DescriptionModel with a null description
    • DescriptionModel

      public DescriptionModel(String description)
      Constructs a DescriptionModel with a given String description
      Parameters:
      description - The String description of the DescriptionModel
  • Method Details

    • getDescription

      public String getDescription()
      Gets the String text of the description
      Returns:
      The String description
    • setDescription

      public void setDescription(String description)
      Sets the String description
      Parameters:
      description - the String description
    • 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
    • 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
    • getTagName

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

      public static final String getDescriptionFromModel(DescriptionModel model)
      Gets the String description coming from a DescriptionModel.
      Parameters:
      model - The DescriptionModel which we want to exact the String description
      Returns:
      The String description text coming from the DescriptionModel and returns null if the model is null
    • setDescriptionIntoModel

      public static final DescriptionModel setDescriptionIntoModel(DescriptionModel model, String description)
      Sets a String description text into a DescriptionModel object
      Parameters:
      model - DescriptionModel which you want to set the String description
      description - The String description to be set into the DescriptionModel
      Returns:
      a DescriptionModel including the String description Returns a new DescriptionModel if the DescriptionModel given in parameter is null. Returns null if the String description null