Class TranslationRowModel

java.lang.Object
com.highdeal.pnr.hci.TranslationRowModel
All Implemented Interfaces:
XMLMarshallable

public class TranslationRowModel extends Object implements 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 Details

    • TranslationRowModel

      public TranslationRowModel()
      Builds an empty TranslationRowModel.
  • Method Details

    • getInValue

      public String getInValue(int inIndex)
      Returns the input value from an index.
      Parameters:
      inIndex - the index.
      Returns:
      the input value at the index.
    • setInValue

      public void setInValue(int inIndex, String value)
      Sets the input value at an index.
      Parameters:
      inIndex - the index.
      value - the input value.
    • getStartDate

      public Date getStartDate()
      Returns the start date for this row.
      Returns:
      The start date for this row.
    • setStartDate

      public void setStartDate(Date d)
      Sets the start date for this row.
      Parameters:
      d - The start date for this row.
    • getEndDate

      public Date getEndDate()
      Returns the end date for this row.
      Returns:
      The end date for this row.
    • setEndDate

      public void setEndDate(Date d)
      Sets the end date for this row.
      Parameters:
      d - The end date for this row.
    • getOutValue

      public Object getOutValue(int outIndex)
      Returns the output value from an index.
      Parameters:
      outIndex - the index.
      Returns:
      the output value at the index.
    • setOutValue

      public void setOutValue(int outIndex, Object value)
      Sets the output value at an index.
      Parameters:
      outIndex - the index.
      value - the output value.
    • isValid

      public boolean isValid(Vector<OutAttributeModel> outAttributes)
      Returns true if the translation row is valid.
      Parameters:
      outAttributes - a Vector of OutAttributeModel representing out attribute format.
      Returns:
      true if the translation row is valid, false otherwise.
    • setAttributes

      public void setAttributes(XMLAttributes atts)
      Description copied from interface: XMLMarshallable
      Sets the attributes of the XML representation of the element being processed.
      Specified by:
      setAttributes in interface XMLMarshallable
      Parameters:
      atts - The XML attributes of the current element
    • getIfDatesAreUsed

      public boolean getIfDatesAreUsed()
    • 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.
      Specified by:
      addChild in interface XMLMarshallable
      Parameters:
      tagName - The name of tag for the child
      child - The child to be added
    • addCharacterData

      public void addCharacterData(String cData)
      Description copied from interface: XMLMarshallable
      Adds character data to the content element.
      Specified by:
      addCharacterData in interface XMLMarshallable
      Parameters:
      cData - The character data to be added
    • marshal

      public void marshal(XMLOutputter output)
      Description copied from interface: XMLMarshallable
      Gives an XML representation of this object, including its children.
      Specified by:
      marshal in interface XMLMarshallable
      Parameters:
      output - The XML output to marshal the object into