public abstract class AbstractPeriodObjectModel extends HCIModelAdapter implements IPeriodObjectModel
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.
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>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TAG_NAME
The XML tag name of the data model: "period"
|
| Constructor and Description |
|---|
AbstractPeriodObjectModel()
Builds an empty period object.
|
AbstractPeriodObjectModel(java.util.Date start,
java.util.Date end)
Builds a full period object.
|
| Modifier and Type | Method and Description |
|---|---|
com.highdeal.util.range.TimeFrame |
asTimeFrame()
Returns this object as
TimeFrame object. |
java.util.Date |
getEnd()
Returns the end date of the period.
|
java.util.Date |
getStart()
Returns the start date of the period.
|
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 |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setEnd(java.util.Date end)
Sets the end date of the period.
|
void |
setStart(java.util.Date start)
Sets the start date of the period.
|
marshalequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmarshalChildrenaddCharacterData, addChildpublic static final java.lang.String TAG_NAME
public AbstractPeriodObjectModel()
public AbstractPeriodObjectModel(java.util.Date start,
java.util.Date end)
start - The start date for the elementend - The end date for the elementpublic java.util.Date getStart()
IPeriodObjectModelgetStart in interface IPeriodObjectModelnull if
the element has always been validpublic void setStart(java.util.Date start)
IPeriodObjectModelsetStart in interface IPeriodObjectModelstart - The possibly null start date of the period for
the elementpublic java.util.Date getEnd()
IPeriodObjectModelgetEnd in interface IPeriodObjectModelnull if
the element will always be validpublic void setEnd(java.util.Date end)
IPeriodObjectModelsetEnd in interface IPeriodObjectModelend - The end date of the periodpublic void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void marshalAttributes(XMLOutputter output)
IXMLMarshallablemarshalAttributes in interface IXMLMarshallableoutput - The XML output to marshal the object attributes intopublic java.lang.String getTagName()
ITagNameProvidergetTagName in interface ITagNameProviderpublic com.highdeal.util.range.TimeFrame asTimeFrame()
IPeriodObjectModelTimeFrame object.asTimeFrame in interface IPeriodObjectModelTimeFrame object.