<?xml version="1.0" encoding="UTF-8"?>
<!--___INFO__MARK_BEGIN__
/*************************************************************************
 * 
 *  The Contents of this file are made available subject to the terms of
 *  the Sun Industry Standards Source License Version 1.2
 * 
 *  Sun Microsystems Inc., March, 2001
 * 
 * 
 *  Sun Industry Standards Source License Version 1.2
 *  =================================================
 *  The contents of this file are subject to the Sun Industry Standards
 *  Source License Version 1.2 (the "License"); You may not use this file
 *  except in compliance with the License. You may obtain a copy of the
 *  License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
 * 
 *  Software provided under this License is provided on an "AS IS" basis,
 *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
 *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
 *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
 *  See the License for the specific provisions governing your rights and
 *  obligations concerning the Software.
 * 
 *   The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 * 
 *   Copyright: 2001 by Sun Microsystems, Inc.
 * 
 *   All Rights Reserved.
 * 
 ************************************************************************/
___INFO__MARK_END__-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://arc.liv.ac.uk/repos/darcs/sge/source/dist/util/resources/schemas/qrstat/qrstat.xsd"
           xmlns="http://arc.liv.ac.uk/repos/darcs/sge/source/dist/util/resources/schemas/qrstat/qrstat.xsd"
           elementFormDefault="qualified">
   <xs:element name="detailed_ar_info">
      <xs:complexType>
         <xs:annotation>
            <xs:documentation>qrstat -ar number output</xs:documentation>
         </xs:annotation>
         <xs:sequence >
            <xs:element name="ar_summary" type="ar_summary_t" minOccurs="0" maxOccurs="unbounded"/>
         </xs:sequence>
      </xs:complexType>
   </xs:element>

   <xs:complexType name="ar_summary_t">
        <xs:sequence>
            <xs:element name="id" type="xs:unsignedInt"/>
            <xs:element name="name" type="xs:string" minOccurs="0"/>
            <xs:element name="account" type="xs:string" minOccurs="0"/>
            <xs:element name="owner" type="xs:string"/>

            <xs:element name="submission_time" type="xs:dateTime"/>
            <xs:element name="start_time" type="xs:dateTime"/>
            <xs:element name="end_time" type="xs:dateTime"/>
            <xs:element name="duration" type="xs:unsignedInt"/>

            <xs:element name="state" type="xs:string"/>
            <xs:element name="message" type="xs:string" minOccurs="0"/>

            <xs:element name="resource_list" type="resource_list_t"/>
            <xs:element name="granted_slots" type="granted_slots_list_t"/>
            <xs:element name="granted_parallel_environment" type="granted_pe_t" minOccurs="0"/>
            <xs:element name="checkpoint_name" type="xs:string" minOccurs="0"/>

            <xs:element name="mail_options" type="xs:string"/>
            <xs:element name="mail_list" type="mail_list_t" minOccurs="0"/>

            <xs:element name="acl_list" type="acl_list_t" minOccurs="0"/>
            <xs:element name="xacl_list" type="acl_list_t" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>

    <!-- ======================================= -->

    <xs:complexType name="resource_list_t">
        <xs:sequence> 
            <xs:element name="resource" type="resource_t" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="resource_t">
        <xs:attribute name="name" type="xs:string" use="required"/>
        <xs:attribute name="type" type="xs:string" use="required"/>
    </xs:complexType>

    <xs:complexType name="granted_slots_list_t">
        <xs:sequence>
            <xs:element name="granted_slots_list" type="granted_slots_t" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="granted_slots_t">
        <xs:attribute name="queue_instance" type="xs:string" use="required"/>
        <xs:attribute name="slots" type="xs:unsignedInt" use="required"/>
    </xs:complexType>

    <xs:complexType name="granted_pe_t">
        <xs:sequence>
            <xs:element name="parallel_environment" type="xs:string" minOccurs="1" maxOccurs="1"/>
            <xs:element name="slots" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="mail_list_t">
        <xs:sequence>
             <xs:element name="mail" type="mail_t" minOccurs="1" maxOccurs="unbounded"/>
         </xs:sequence>
    </xs:complexType>

    <xs:complexType name="mail_t">
        <xs:attribute name="user" type="xs:string" use="required"/>
        <xs:attribute name="host" type="xs:string" use="required"/>
    </xs:complexType>

    <xs:complexType name="acl_list_t">
         <xs:sequence>
        <xs:element name="acl" type="acl_t" minOccurs="1" maxOccurs="unbounded"/>
         </xs:sequence>
    </xs:complexType>

    <xs:complexType name="acl_t">
        <xs:attribute name="user" type="xs:string" use="required"/>
    </xs:complexType>

</xs:schema>
