Class BaseChronologyModel<T extends AbstractPeriodObjectModel>

java.lang.Object
com.highdeal.hci.HCIModelAdapter
com.highdeal.chrono.hci.BaseChronologyModel<T>
Type Parameters:
T - The concrete type of the period model; This enables to have a custom period.
All Implemented Interfaces:
ITagNameProvider, IXMLMarshallable, XMLMarshallable
Direct Known Subclasses:
CommonRangeTableModel

public class BaseChronologyModel<T extends AbstractPeriodObjectModel> extends HCIModelAdapter
This Java class defines a chronology represents a list of period objects.

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:complexType name="BaseChronologyModel">
   <xs:sequence>
     <xs:element name="period" type="AbstractPeriodObjectType" minOccurs="1" maxOccurs="unbounded"/>
   </xs:sequence>
 </xs:complexType>

  • Constructor Details

    • BaseChronologyModel

      public BaseChronologyModel()
      Constructs an empty Chronology model.
  • Method Details

    • getPeriod

      public T getPeriod(Date d)
      Returns the valid period at the specified date, or null if there is no valid period.
      Parameters:
      d - The date for which a valid period is to be retrieved
      Returns:
      The period valid at the specified date, or null if no such element exists
    • getPeriods

      public Vector<T> getPeriods()
      Provides the list of the periods in this chronology.
      Returns:
      The list of the periods in this chronology
      See Also:
    • marshalChildren

      public void marshalChildren(XMLOutputter output)
      Description copied from interface: IXMLMarshallable
      Gives an XML representation of the child objects of an object.
      Parameters:
      output - The XML output to marshal the child objects into
    • addChild

      public void addChild(String name, 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.
      Parameters:
      name - The name of tag for the child
      child - The child to be added
    • marshalAttributes

      public void marshalAttributes(XMLOutputter output)
      Description copied from interface: IXMLMarshallable
      Gives an XML representation of the attributes of an object.
      Parameters:
      output - The XML output to marshal the object attributes into
    • addCharacterData

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

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

      public String getTagName()
      Description copied from interface: ITagNameProvider
      Gets the XML tag name of the HCI model.
      Returns:
      The XML tag name