com.highdeal.chrono.hci
Class BaseChronologyModel<T extends AbstractPeriodObjectModel>

java.lang.Object
  extended by com.highdeal.hci.HCIModelAdapter
      extended by 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 Summary
BaseChronologyModel()
          Constructs an empty Chronology model.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String name, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 T getPeriod(java.util.Date d)
          Returns the valid period at the specified date, or null if there is no valid period.
 java.util.Vector<T> getPeriods()
          Provides the list of the periods in this chronology.
 java.lang.String getTagName()
          Gets the XML tag name of the HCI model.
 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.
 
Methods inherited from class com.highdeal.hci.HCIModelAdapter
marshal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseChronologyModel

public BaseChronologyModel()
Constructs an empty Chronology model.

Method Detail

getPeriod

public T getPeriod(java.util.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 java.util.Vector<T> getPeriods()
Provides the list of the periods in this chronology.

Returns:
The list of the periods in this chronology
See Also:
PeriodObjectModel

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(java.lang.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(java.lang.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 java.lang.String getTagName()
Description copied from interface: ITagNameProvider
Gets the XML tag name of the HCI model.

Returns:
The XML tag name

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)