<?xml version="1.0" encoding="UTF-8"?>
<!--
 - Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors.
 - 
 - Licensed under the Apache License, Version 2.0 (the "License");
 - you may not use this file except in compliance with the License.
 - You may obtain a copy of the License at
 - http://www.apache.org/licenses/LICENSE-2.0
 - Unless required by applicable law or agreed to in writing, software
 - distributed under the License is distributed on an "AS IS" BASIS,
 - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 - See the License for the specific language governing permissions and
 - limitations under the License.
 -->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="urn:switchyard-component-camel-quartz:config:2.0"
    xmlns:tns="urn:switchyard-component-camel-quartz:config:2.0"
    xmlns:common="urn:switchyard-component-camel-common:config:2.0"
    xmlns:switchyard="urn:switchyard-config:switchyard:2.0"
    elementFormDefault="qualified">

    <import namespace="urn:switchyard-config:switchyard:2.0"/>
    <include schemaLocation="camel-common_2_0.xsd" />

    <group name="crongroup">
        <sequence>
        <element name="cron" type="string" minOccurs="1" maxOccurs="1"/>
        </sequence>
    </group>

    <group name="triggergroup">
        <sequence>
        <element name="trigger.repeatCount" type="switchyard:propInteger" minOccurs="0" maxOccurs="1" />
        <element name="trigger.repeatInterval" type="switchyard:propLong" minOccurs="0" maxOccurs="1" />
        </sequence>
    </group>

    <element name="binding.quartz" type="tns:CamelQuartzBindingType" substitutionGroup="switchyard:binding.switchyard"/>
    <complexType name="CamelQuartzBindingType">
        <complexContent>
            <extension base="tns:BaseCamelBinding">
                <sequence>
                    <element name="name" type="string" />
                    <choice minOccurs="1" maxOccurs="1">
			<group ref="tns:crongroup"/>
                        <group ref="tns:triggergroup"/>
                    </choice>
                    <element name="stateful" type="boolean" minOccurs="0" maxOccurs="1" />
                    <element name="trigger.startTime" type="dateTime" minOccurs="0" maxOccurs="1" />
                    <element name="trigger.endTime" type="dateTime" minOccurs="0" maxOccurs="1" />
                    <element name="trigger.timeZone" type="string" minOccurs="0" maxOccurs="1" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
</schema>
