<?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.
    
-->

<!--
Copyright (C) The Internet Society (1998).  All Rights Reserved.

This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works.  However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.

-->


<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:oa="http://www.openapplications.org/oagis/9"
    xmlns:qdt="http://www.openapplications.org/oagis/9/qualifieddatatypes/1.1"
    xmlns:in4f="http://schema.infor.com/Infor1.0/fieldlist"    
    xmlns="http://schema.infor.com/Infor1.0" targetNamespace="http://schema.infor.com/Infor1.0"
    elementFormDefault="qualified" attributeFormDefault="unqualified">

    <xsd:import namespace="http://www.openapplications.org/oagis/9/qualifieddatatypes/1.1"  schemaLocation="../../../9.0/Resources/Components/CoreComponents/QualifiedDataTypes.xsd"/>
    <xsd:import namespace="http://www.openapplications.org/oagis/9"  schemaLocation="../../../9.0/Resources/Components/Common/Components.xsd"/>
    <xsd:include schemaLocation="../Components/Common/Components.xsd"/>
    
    <xsd:element name="Calendar" type="CalendarType">
        <xsd:annotation>
            <xsd:documentation source="http://schema.infor.com/Infor1.0"> 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. </xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element ref="CalendarEvent"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="CalendarEventType">
        <xsd:sequence>
            <xsd:element ref="Organizer" minOccurs="0"/>
            <xsd:element ref="Attendee" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element ref="ScheduledObject" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element ref="EventTimePeriod" minOccurs="0"/>
            <xsd:element ref="RecurrenceRule" minOccurs="0"/>
            <xsd:element ref="EventLocation" minOccurs="0"/>
            <xsd:element ref="oa:Description" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element ref="Summary" minOccurs="0"/>
            <xsd:element ref="Priority" minOccurs="0"/>
            <xsd:element ref="Alarm" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="type" type="oa: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:element ref="oa:Name" minOccurs="0"/>
            <xsd:element ref="oa:URI" minOccurs="0"/>
            <xsd:element ref="EventRole" minOccurs="0"/>
            <xsd:element ref="Confirmed" minOccurs="0"/>
            <xsd:element ref="FreeBusy" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="sequence" type="oa:PositiveIntegerNumericType"/>
    </xsd:complexType>

    <xsd:complexType name="ScheduledObjectType">
        <xsd:sequence>
            <xsd:element ref="ObjectClass"/>
            <xsd:element ref="oa:DocumentReference"/>
            <xsd:element ref="oa:Description" minOccurs="0" maxOccurs="unbounded"/>
            <xsd:element ref="Confirmed" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="RecurrenceRuleType">
        <xsd:sequence>
            <xsd:element ref="Frequency"/>
            <xsd:element ref="Count" minOccurs="0"/>
            <xsd:element ref="Interval" minOccurs="0"/>
            <xsd:element ref="ByDay" minOccurs="0"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="AlarmType">
        <xsd:sequence>
            <xsd:element ref="AlarmTime"/>
            <xsd:element ref="Count" minOccurs="0"/>
            <xsd:element ref="SleepMinutes" minOccurs="0"/>
            <xsd:element ref="Method" maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="FreeBusyType">
        <xsd:sequence> </xsd:sequence>
    </xsd:complexType>

    <xsd:element name="Alarm" type="AlarmType"/>
    <xsd:element name="AlarmTime" type="oa:DateTimeType"/>
    <xsd:element name="ByDay" type="oa:StringType"/>
    <xsd:element name="Confirmed" type="oa:IndicatorType"/>
    <xsd:element name="Count" type="qdt:PositiveIntegerNumericType"/>
    <xsd:element name="EventLocation" type="oa:StringType"/>
    <xsd:element name="EventRole" type="oa: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="oa:TimePeriodType"/>
    <xsd:element name="FreeBusy" type="oa: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="Frequency" type="oa:NormalizedStringType"/>
    <xsd:element name="Interval" type="oa:NormalizedStringType"/>
    <xsd:element name="Method" type="oa:NormalizedStringType">
        <xsd:annotation>
            <xsd:documentation> This identifies the notification method. </xsd:documentation>
        </xsd:annotation>
    </xsd:element>
    <xsd:element name="Organizer" type="AttendeeType">
        <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="Priority" type="PriorityType"/>
    <xsd:element name="SleepMinutes" type="oa:PositiveIntegerNumericType"/>
    <xsd:element name="Summary" type="oa:StringType"/>
    <xsd:element name="Attendee" type="AttendeeType"/>
    <xsd:element name="RecurrenceRule" type="RecurrenceRuleType"/>
    <xsd:element name="ScheduledObject" type="ScheduledObjectType"/>
    <xsd:element name="ObjectClass" type="ObjectClassType"/>

        <xsd:element name="CalendarEvent" type="CalendarEventType"/>
    <xsd:element name="CalendarFreeBusy" type="FreeBusyType"/>
    <xsd:element name="CalendarAlarm" type="FreeBusyType"/>

</xsd:schema>
