public class ISO4217CurrencyModel extends java.lang.Object implements XMLMarshallable
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="ISO4217Currency">
<xs:complexType>
<xs:attribute name="code" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="3"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="numericCode" default="0">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="999"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="ratioOfFraction" default="0">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="9999999999999999999999999999"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="smallestUnitAsFraction" default="0">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="9999999999999999999999999999"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MODEL_NAME |
| Constructor and Description |
|---|
ISO4217CurrencyModel() |
| 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 |
getCode()
Returns the ISO 4217 code of the currency.
|
int |
getNumericCode()
Returns the ISO 4217 three-digit code, or a user-defined
numeric code for a user-defined currency.
|
int |
getRatioOfFraction()
Returns the ratio of the fraction to the
whole (e.g.: 100 for USD).
|
int |
getSmallestUnitAsFraction()
Returns the smallest multiples of sub-unit
in use for scriptural payment (e.g.: 1 for USD,
100 for BEF).
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setCode(java.lang.String code)
Sets the ISO 4217 code of the currency.
|
void |
setNumericCode(int numericCode)
Sets the ISO 4217 three-digit code, or a user-defined
numeric code for a user-defined currency.
|
void |
setRatioOfFraction(int ratioOfFraction)
Sets the ratio of the fraction to the
whole (e.g.: 100 for USD).
|
void |
setSmallestUnitAsFraction(int smallestUnitAsFraction)
Sets the smallest multiples of sub-unit
in use for scriptural payment (e.g.: 1 for USD,
100 for BEF).
|
public static final java.lang.String MODEL_NAME
public void addCharacterData(java.lang.String cData)
XMLMarshallableaddCharacterData in interface 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.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object intopublic void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic java.lang.String getCode()
public void setCode(java.lang.String code)
code - the ISO 4217 code of this currency.public int getNumericCode()
public void setNumericCode(int numericCode)
numericCode - the numeric code of this currency.public int getRatioOfFraction()
public void setRatioOfFraction(int ratioOfFraction)
ratioOfFraction - the ration of the fraction to the whole.public int getSmallestUnitAsFraction()
public void setSmallestUnitAsFraction(int smallestUnitAsFraction)
smallestUnitAsFraction - the smallest unit.