public class StringModel extends HCIModelAdapter
Java class is a Java String container; It extends the java.lang.String class
by adding features to marshal this object type.CurrencyModel,
BooleanModel,
DateModel,
NumberModelThe XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="string">
<xs:complexType>
<xs:attribute name="value" type="xs:string"/>
</xs:complexType>
</xs:element>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TAG_NAME
The XML tag name of this data model: "string"
|
| Constructor and Description |
|---|
StringModel()
Constructs a
StringModel with a null string. |
StringModel(java.lang.String value)
Constructs a
StringModel with a specified String. |
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element.
|
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
java.lang.String |
getTagName()
Gets the XML tag name of the HCI model.
|
java.lang.String |
getValue()
Gets the string contained by the
StringModel. |
void |
marshalAttributes(XMLOutputter output)
Gives an XML representation of the attributes of an object.
|
void |
marshalChildren(XMLOutputter output)
Gives an XML representation of the child objects of an object.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setValue(java.lang.String value)
Sets the string contained by the
StringModel. |
marshalpublic static final java.lang.String TAG_NAME
public StringModel()
StringModel with a null string.public StringModel(java.lang.String value)
StringModel with a specified String.value - The string of the StringModelpublic java.lang.String getValue()
StringModel.StringModelpublic void setValue(java.lang.String value)
StringModel.value - The string contained by the StringModelpublic void addCharacterData(java.lang.String cData)
XMLMarshallablecData - The character data to be addedpublic void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.tagName - The name of tag for the childchild - The child to be addedpublic void setAttributes(XMLAttributes atts)
XMLMarshallableatts - The XML attributes of the current elementpublic void marshalAttributes(XMLOutputter output)
IXMLMarshallableoutput - The XML output to marshal the object attributes intopublic void marshalChildren(XMLOutputter output)
IXMLMarshallableoutput - The XML output to marshal the child objects intopublic java.lang.String getTagName()
ITagNameProvider