Package com.highdeal.hci
Class DescriptionModel
java.lang.Object
com.highdeal.hci.HCIModelAdapter
com.highdeal.hci.DescriptionModel
- All Implemented Interfaces:
ITagNameProvider,IXMLMarshallable,XMLMarshallable
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs aDescriptionModelwith anulldescriptionDescriptionModel(String description) Constructs aDescriptionModelwith a givenStringdescription -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.Gets theStringtext of the descriptionstatic final StringGets theStringdescription coming from aDescriptionModel.Gets the XML tag name of the HCI model.voidmarshalAttributes(XMLOutputter output) Gives an XML representation of the attributes of an object.voidmarshalChildren(XMLOutputter output) Gives an XML representation of the child objects of an object.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidsetDescription(String description) Sets theStringdescriptionstatic final DescriptionModelsetDescriptionIntoModel(DescriptionModel model, String description) Sets aStringdescription text into aDescriptionModelobjectMethods inherited from class com.highdeal.hci.HCIModelAdapter
marshal
-
Field Details
-
TAG_NAME
The value of that constant is the XML tag name of theDescription.- See Also:
-
-
Constructor Details
-
DescriptionModel
public DescriptionModel()Constructs aDescriptionModelwith anulldescription -
DescriptionModel
Constructs aDescriptionModelwith a givenStringdescription- Parameters:
description- TheStringdescription of theDescriptionModel
-
-
Method Details
-
getDescription
Gets theStringtext of the description- Returns:
- The
Stringdescription
-
setDescription
Sets theStringdescription- Parameters:
description- theStringdescription
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Parameters:
cData- The character data to be added
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Parameters:
atts- TheXML attributesof the current element
-
marshalAttributes
Description copied from interface:IXMLMarshallableGives an XML representation of the attributes of an object.- Parameters:
output- TheXML outputto marshal the object attributes into
-
marshalChildren
Description copied from interface:IXMLMarshallableGives an XML representation of the child objects of an object.- Parameters:
output- TheXML outputto marshal the child objects into
-
getTagName
Description copied from interface:ITagNameProviderGets the XML tag name of the HCI model.- Returns:
- The XML tag name
-
getDescriptionFromModel
Gets theStringdescription coming from aDescriptionModel.- Parameters:
model- TheDescriptionModelwhich we want to exact theStringdescription- Returns:
- The
Stringdescription text coming from theDescriptionModeland returnsnullif the model isnull
-
setDescriptionIntoModel
public static final DescriptionModel setDescriptionIntoModel(DescriptionModel model, String description) Sets aStringdescription text into aDescriptionModelobject- Parameters:
model-DescriptionModelwhich you want to set theStringdescriptiondescription- TheStringdescription to be set into theDescriptionModel- Returns:
- a
DescriptionModelincluding theStringdescription Returns a newDescriptionModelif theDescriptionModelgiven in parameter isnull. Returnsnullif theStringdescriptionnull
-