Package com.highdeal.chrono.hci
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
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String name, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.Returns the valid period at the specified date, ornullif there is no valid period.Provides the list of the periods in this chronology.Gets the XML tag name of the HCI model.voidmarshalAttributes(XMLOutputter output) Gives an XML representation of the attributes of an object.voidmarshalChildren(XMLOutputter output) Gives an XML representation of the child objects of an object.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.Methods inherited from class com.highdeal.hci.HCIModelAdapter
marshal
-
Constructor Details
-
BaseChronologyModel
public BaseChronologyModel()Constructs an emptyChronologymodel.
-
-
Method Details
-
getPeriod
Returns the valid period at the specified date, ornullif 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
nullif no such element exists
-
getPeriods
Provides the list of the periods in this chronology.- Returns:
- The list of the periods in this chronology
- See Also:
-
marshalChildren
Description copied from interface:IXMLMarshallableGives an XML representation of the child objects of an object.- Parameters:
output- TheXML outputto marshal the child objects into
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Parameters:
name- The name of tag for the childchild- The child to be added
-
marshalAttributes
Description copied from interface:IXMLMarshallableGives an XML representation of the attributes of an object.- Parameters:
output- TheXML outputto marshal the object attributes into
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Parameters:
cData- The character data to be added
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Parameters:
atts- TheXML attributesof the current element
-
getTagName
Description copied from interface:ITagNameProviderGets the XML tag name of the HCI model.- Returns:
- The XML tag name
-