public class PublicHolidaysModel extends java.lang.Object implements XMLMarshallable
Java class represents the public holidays handled be the connected SAP CC system.
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="publicHolidays">
<xs:complexType>
<xs:sequence>
<xs:element ref="holiday" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="groupDescription" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="description" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="lang" type="xs:string"/>
<xs:attribute name="label" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="code" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
| Modifier and Type | Class and Description |
|---|---|
static class |
PublicHolidaysModel.HolidaysGroup
This
static Java class
A group is identified by a string code. |
| Modifier and Type | Field and Description |
|---|---|
static java.util.Comparator<HolidayModel> |
HOLIDAY_COMPARATOR |
static java.util.Comparator<PublicHolidaysModel.HolidaysGroup> |
HOLIDAYS_GROUP_COMPARATOR |
| Constructor and Description |
|---|
PublicHolidaysModel()
Builds an empty PublicHolidaysModel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element.
|
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
void |
checkValidity() |
java.util.List<PublicHolidaysModel.HolidaysGroup> |
getGroups()
Returns the groups.
|
java.util.List<HolidayModel> |
getHolidays()
Returns the list of HolidayModel objects.
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
public static final java.util.Comparator<HolidayModel> HOLIDAY_COMPARATOR
public static final java.util.Comparator<PublicHolidaysModel.HolidaysGroup> HOLIDAYS_GROUP_COMPARATOR
public PublicHolidaysModel()
public java.util.List<HolidayModel> getHolidays()
holidayspublic java.util.List<PublicHolidaysModel.HolidaysGroup> getGroups()
public void checkValidity()
throws InvalidHolidayException
InvalidHolidayExceptionpublic void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void addCharacterData(java.lang.String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object into