Package com.highdeal.chrono.hci
Class AbstractPeriodObjectModel
java.lang.Object
com.highdeal.hci.HCIModelAdapter
com.highdeal.chrono.hci.AbstractPeriodObjectModel
- All Implemented Interfaces:
IPeriodObjectModel,ITagNameProvider,IXMLMarshallable,XMLMarshallable
- Direct Known Subclasses:
RangeTablePeriodObjectModel
public abstract class AbstractPeriodObjectModel
extends HCIModelAdapter
implements IPeriodObjectModel
This
abstract Java class defines a period that represents an object that is valid upon a certain period of time;
It has an XML representation.
Important Note
The timestamps can
be null, meaning that the object has no defined starting and/or ending.
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:complexType name="AbstractPeriodObjectType"> <xs:attribute name="start" type="xs:dateTime"/> <xs:attribute name="end" type="xs:dateTime"/> </xs:complexType>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBuilds an empty period object.AbstractPeriodObjectModel(Date start, Date end) Builds a full period object. -
Method Summary
Modifier and TypeMethodDescriptioncom.highdeal.util.range.TimeFrameReturns this object asTimeFrameobject.getEnd()Returns the end date of the period.getStart()Returns the start date of the period.Gets the XML tag name of the HCI model.voidmarshalAttributes(XMLOutputter output) Gives an XML representation of the attributes of an object.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidSets the end date of the period.voidSets the start date of the period.Methods inherited from class com.highdeal.hci.HCIModelAdapter
marshalMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.highdeal.hci.IXMLMarshallable
marshalChildrenMethods inherited from interface com.highdeal.hci.XMLMarshallable
addCharacterData, addChild
-
Field Details
-
TAG_NAME
The XML tag name of the data model: "period"- See Also:
-
-
Constructor Details
-
AbstractPeriodObjectModel
public AbstractPeriodObjectModel()Builds an empty period object. -
AbstractPeriodObjectModel
Builds a full period object.- Parameters:
start- The start date for the elementend- The end date for the element
-
-
Method Details
-
getStart
Description copied from interface:IPeriodObjectModelReturns the start date of the period.- Specified by:
getStartin interfaceIPeriodObjectModel- Returns:
- The start date of the period, or
nullif theelementhas always been valid
-
setStart
Description copied from interface:IPeriodObjectModelSets the start date of the period.- Specified by:
setStartin interfaceIPeriodObjectModel- Parameters:
start- The possiblynullstart date of the period for theelement
-
getEnd
Description copied from interface:IPeriodObjectModelReturns the end date of the period.- Specified by:
getEndin interfaceIPeriodObjectModel- Returns:
- The end date of the period, or
nullif theelementwill always be valid
-
setEnd
Description copied from interface:IPeriodObjectModelSets the end date of the period.- Specified by:
setEndin interfaceIPeriodObjectModel- Parameters:
end- The end date of the period
-
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
-
marshalAttributes
Description copied from interface:IXMLMarshallableGives an XML representation of the attributes of an object.- Specified by:
marshalAttributesin interfaceIXMLMarshallable- Parameters:
output- TheXML outputto marshal the object attributes into
-
getTagName
Description copied from interface:ITagNameProviderGets the XML tag name of the HCI model.- Specified by:
getTagNamein interfaceITagNameProvider- Returns:
- The XML tag name
-
asTimeFrame
public com.highdeal.util.range.TimeFrame asTimeFrame()Description copied from interface:IPeriodObjectModelReturns this object asTimeFrameobject.- Specified by:
asTimeFramein interfaceIPeriodObjectModel- Returns:
- this object as
TimeFrameobject.
-