Package com.highdeal.pnr.hci
Class TranslationRowModel
java.lang.Object
com.highdeal.pnr.hci.TranslationRowModel
- All Implemented Interfaces:
XMLMarshallable
This class represents a row in a translation table. If i0, i1, i2, i3 or i4 is not set, that mean for "any" in-value.
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="row">
<xs:complexType>
<xs:attribute name="i0" type="xs:string" use="optional"/>
<xs:attribute name="i1" type="xs:string" use="optional"/>
<xs:attribute name="i2" type="xs:string" use="optional"/>
<xs:attribute name="i3" type="xs:string" use="optional"/>
<xs:attribute name="i4" type="xs:string" use="optional"/>
<xs:attribute name="sd" type="xs:dateTime" use="optional" />
<xs:attribute name="ed" type="xs:dateTime" use="optional" />
<xs:attribute name="s0" type="xs:string" use="optional"/>
<xs:attribute name="n0" type="xs:decimal" use="optional"/>
<xs:attribute name="s1" type="xs:string" use="optional"/>
<xs:attribute name="n1" type="xs:decimal" use="optional"/>
<xs:attribute name="s2" type="xs:string" use="optional"/>
<xs:attribute name="n2" type="xs:decimal" use="optional"/>
<xs:attribute name="s3" type="xs:string" use="optional"/>
<xs:attribute name="n3" type="xs:decimal" use="optional"/>
<xs:attribute name="s4" type="xs:string" use="optional"/>
<xs:attribute name="n4" type="xs:decimal" use="optional"/>
<xs:attribute name="s5" type="xs:string" use="optional"/>
<xs:attribute name="n5" type="xs:decimal" use="optional"/>
<xs:attribute name="s6" type="xs:string" use="optional"/>
<xs:attribute name="n6" type="xs:decimal" use="optional"/>
<xs:attribute name="s7" type="xs:string" use="optional"/>
<xs:attribute name="n7" type="xs:decimal" use="optional"/>
<xs:attribute name="s8" type="xs:string" use="optional"/>
<xs:attribute name="n8" type="xs:decimal" use="optional"/>
<xs:attribute name="s9" type="xs:string" use="optional"/>
<xs:attribute name="n9" type="xs:decimal" use="optional"/>
<xs:attribute name="s10" type="xs:string" use="optional"/>
<xs:attribute name="n10" type="xs:decimal" use="optional"/>
<xs:attribute name="s11" type="xs:string" use="optional"/>
<xs:attribute name="n11" type="xs:decimal" use="optional"/>
<xs:attribute name="s12" type="xs:string" use="optional"/>
<xs:attribute name="n12" type="xs:decimal" use="optional"/>
<xs:attribute name="s13" type="xs:string" use="optional"/>
<xs:attribute name="n13" type="xs:decimal" use="optional"/>
<xs:attribute name="s14" type="xs:string" use="optional"/>
<xs:attribute name="n14" type="xs:decimal" use="optional"/>
</xs:complexType>
</xs:element>
-
Constructor Summary
Constructors -
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.Returns the end date for this row.booleangetInValue(int inIndex) Returns the input value from an index.getOutValue(int outIndex) Returns the output value from an index.Returns the start date for this row.booleanisValid(Vector<OutAttributeModel> outAttributes) Returns true if the translation row is valid.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidsetEndDate(Date d) Sets the end date for this row.voidsetInValue(int inIndex, String value) Sets the input value at an index.voidsetOutValue(int outIndex, Object value) Sets the output value at an index.voidsetStartDate(Date d) Sets the start date for this row.
-
Constructor Details
-
TranslationRowModel
public TranslationRowModel()Builds an empty TranslationRowModel.
-
-
Method Details
-
getInValue
Returns the input value from an index.- Parameters:
inIndex- the index.- Returns:
- the input value at the index.
-
setInValue
Sets the input value at an index.- Parameters:
inIndex- the index.value- the input value.
-
getStartDate
Returns the start date for this row.- Returns:
- The start date for this row.
-
setStartDate
Sets the start date for this row.- Parameters:
d- The start date for this row.
-
getEndDate
Returns the end date for this row.- Returns:
- The end date for this row.
-
setEndDate
Sets the end date for this row.- Parameters:
d- The end date for this row.
-
getOutValue
Returns the output value from an index.- Parameters:
outIndex- the index.- Returns:
- the output value at the index.
-
setOutValue
Sets the output value at an index.- Parameters:
outIndex- the index.value- the output value.
-
isValid
Returns true if the translation row is valid.- Parameters:
outAttributes- a Vector ofOutAttributeModelrepresenting out attribute format.- Returns:
- true if the translation row is valid, false otherwise.
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Specified by:
setAttributesin interfaceXMLMarshallable- Parameters:
atts- TheXML attributesof the current element
-
getIfDatesAreUsed
public boolean getIfDatesAreUsed() -
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Specified by:
addChildin interfaceXMLMarshallable- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Specified by:
addCharacterDatain interfaceXMLMarshallable- Parameters:
cData- The character data to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- TheXML outputto marshal the object into
-