<?xml version="1.0" encoding="utf-8"?>
<!--
        
        ** OAGIS® Revision: 9.1  **
        ** Date: 11 May 2007 **
        ** Copyright 1997-2007, All Rights Reserved **
        
        This is an OAGIS® BOD XML Schema (XSD) Definition.
        
       License information for this file is provided in the file **OAGi License Agreement.txt** that is provided with this download package.
        
        For support, more information, or to report implementation bugs, please contact the Open Applications Group at xml@openapplications.org.
        
        XML Schema 
        
-->
 
<!--
© Copyright 2007 Infor Global Solutions Technology GmbH and/or its affiliates and subsidiaries. All rights reserved. The 
word and design marks set forth herein are trademarks and/or registered trademarks of Infor Global Solutions 
Technology GmbH and/or its affiliates and subsidiaries. All rights reserved. All other trademarks listed herein 
are the property of their respective owners.
 
-->
 
<!--    *****     Update Log     *****
 
Date          By      Note
10 Apr 2008   JB      Added correct Copyright and update comments to schema.
04 Aug 2010   NO      Moved the RecurrenceRuleType defition the Common area.
15 Jun 2018   LA      Changes to include Holiday schedule, BOD-3368
18 Jun 2018   LA      CalendarLocation added to header, BOD-3368
        *****     Update End     *****
 
-->





<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schema.infor.com/InforOAGIS/2"
    targetNamespace="http://schema.infor.com/InforOAGIS/2" elementFormDefault="qualified"
    attributeFormDefault="unqualified">

    <xsd:include schemaLocation="../Components/Common/Components.xsd"/>

    <xsd:element name="Calendar" type="CalendarType">
        <xsd:annotation>
            <xsd:documentation > The calendar schema is
                used to associate people and objects to a period of time. </xsd:documentation>
        </xsd:annotation>
    </xsd:element>

    <xsd:complexType name="CalendarType">
        <xsd:annotation>
            <xsd:documentation> The calendar type is based on the iCalendar specification.
                Currently, only the event type is defined, but the ToDo and the Journal type can be
                added in the future as business requirements dictate. The model was extended to
                allow objects other than people to be associated with an event. 
            As of 2.13.8, Calendar is used as a Master Data noun to also specify
            HR holiday schedules
            </xsd:documentation>
        </xsd:annotation>
        <xsd:complexContent>
            <xsd:extension base="StatusEnabledHeaderType">
                <xsd:sequence>
                    <xsd:element ref="CalendarLocation" minOccurs="0"/>
                    <xsd:element ref="CalendarEvent" minOccurs="0" maxOccurs="unbounded"/>
                    <xsd:element ref="UserArea" minOccurs="0"/>
                </xsd:sequence>
                <xsd:attribute name="type" type="NormalizedStringType" use="optional">
                    <xsd:annotation>
                        <xsd:documentation>
                            To specify the type of calendar
                        </xsd:documentation>
                    </xsd:annotation>
                </xsd:attribute>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>

    <xsd:complexType name="CalendarEventType">
        <xsd:sequence>
            <xsd:element ref="Organizer" minOccurs="0"/>
            <xsd:element ref="Attendee" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:choice>
                <xsd:element ref="EventTimePeriod" minOccurs="0"/>
                <xsd:element ref="EventDate" minOccurs="0"/>
            </xsd:choice>
            
            <xsd:element ref="RecurrenceRule" minOccurs="0"/>
            <xsd:element ref="EventLocation" minOccurs="0"/>
            <xsd:element ref="Description" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element ref="Summary" minOccurs="0"/>
            <xsd:element ref="Priority" minOccurs="0"/>
            <xsd:element ref="Alarm" minOccurs="0"/>
            <xsd:element ref="UserArea" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="type" type="NormalizedStringType">
            <xsd:annotation>
                <xsd:documentation> This attribute is used to define the purpose of the calendar.
                </xsd:documentation>
            </xsd:annotation>
        </xsd:attribute>
    </xsd:complexType>

    <xsd:complexType name="AttendeeType">
        <xsd:sequence>
        	<xsd:choice>
            	<xsd:element ref="ConstrainedResourceReference" minOccurs="0"/>
        		<xsd:element ref="PersonReference" minOccurs="0"/>
        		<xsd:element ref="Location" minOccurs="0"/>
        	</xsd:choice>
            <xsd:element ref="Name" minOccurs="0"/>
            <xsd:element ref="URI" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation> The email address for the person. </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="Description" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element ref="EventRole" minOccurs="0"/>
            <xsd:element ref="ConfirmedIndicator" minOccurs="0"/>
            <xsd:element ref="FreeBusy" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="sequence" type="PositiveIntegerNumericType"/>
    </xsd:complexType>

    <xsd:complexType name="OrganizerType">
        <xsd:sequence>
            <xsd:element ref="PersonReference" minOccurs="0"/>
            <xsd:element ref="Name" minOccurs="0"/>
            <xsd:element ref="URI" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation> The email address for the person. </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element ref="EventRole" minOccurs="0"/>
            <xsd:element ref="ConfirmedIndicator" minOccurs="0"/>
            <xsd:element ref="FreeBusy" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="sequence" type="PositiveIntegerNumericType"/>
    </xsd:complexType>

    <xsd:complexType name="AlarmType">
        <xsd:sequence>
            <xsd:element ref="AlarmDateTime"/>
            <xsd:element ref="Count" minOccurs="0"/>
            <xsd:element ref="SleepMinutes" minOccurs="0"/>
            <xsd:element ref="Method" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:element name="Alarm" type="AlarmType"/>
    <xsd:element name="AlarmDateTime" type="DateTimeType"/>
    <xsd:element name="ConfirmedIndicator" type="IndicatorType"/>
    <xsd:element name="EventLocation" type="LocationType"/>
    <xsd:element name="EventRole" type="NormalizedStringType">
        <xsd:annotation>
            <xsd:documentation> EventRole should be 'Organizer', 'Mandatory' or 'Optional'. This may
                become an enumeration at a later period. These are the people that are associated
                with the event. </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="EventTimePeriod" type="TimePeriodType"/>
    <xsd:element name="FreeBusy" type="NormalizedStringType">
        <xsd:annotation>
            <xsd:documentation> Values should be limited to FREE, BUSY, BUSY-UNAVAILABLE, and
                BUSY-TENTATIVE </xsd:documentation>
        </xsd:annotation>
    </xsd:element>

    <xsd:element name="Method" type="NormalizedStringType">
        <xsd:annotation>
            <xsd:documentation> This identifies the notification method. </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="Organizer" type="OrganizerType">
        <xsd:annotation>
            <xsd:documentation> This element is used to identify an organizer when the organizer is
                not a participantin the event. </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
   
    <xsd:element name="SleepMinutes" type="PositiveIntegerNumericType"/>
    <xsd:element name="Summary" type="StringType"/>
    <xsd:element name="Attendee" type="AttendeeType"/>
   
    <xsd:element name="ObjectClass" type="ObjectClassType"/>

    <xsd:element name="CalendarEvent" type="CalendarEventType"/>
    <xsd:element name="EventDate" type="DateType"/>
    
    <xsd:element name="CalendarLocation" type="LocationReferenceType"/>

</xsd:schema>
