<?xml version="1.0" encoding="UTF-8"?>
<!--
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - JaDOrT: JASMINe Deployment Orchestration Tool
  - Copyright (C) 2008-2009 Bull S.A.S.
  - Copyright (C) 2008-2009 France Telecom R&D
  - Contact: jasmine@ow2.org
  -
  - This library is free software; you can redistribute it and/or
  - modify it under the terms of the GNU Lesser General Public
  - License as published by the Free Software Foundation; either
  - version 2.1 of the License, or any later version.
  -
  - This library is distributed in the hope that it will be useful,
  - but WITHOUT ANY WARRANTY; without even the implied warranty of
  - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  - Lesser General Public License for more details.
  -
  - You should have received a copy of the GNU Lesser General Public
  - License along with this library; if not, write to the Free Software
  - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  - USA
  -
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - $Id: topology_JadortSpecific.xsd 3786 2009-05-29 16:42:04Z ardaaydin $
  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified" attributeFormDefault="unqualified">
  <xs:element name="topology">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="VMM" minOccurs="0" maxOccurs="unbounded" />
        <xs:element ref="worker" minOccurs="0" maxOccurs="unbounded" />
        <xs:element name="group" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:sequence maxOccurs="unbounded">
              <xs:element ref="server" />
            </xs:sequence>
            <xs:attribute name="name" type="xs:string" use="required" />
            <xs:attribute name="clustered" type="xs:boolean" use="required" />
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="server">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="URLConnector" minOccurs="1" maxOccurs="1" />
        <xs:element ref="VM" minOccurs="0" maxOccurs="1" />
        <xs:element ref="balancer" minOccurs="0" maxOccurs="unbounded" />
        <xs:element ref="manager" minOccurs="0" maxOccurs="1" />
        <xs:element ref="target" minOccurs="0" maxOccurs="1" />
      </xs:sequence>
      <xs:attribute name="name" type="xs:string" use="required" />
      <xs:attribute name="capacity" type="xs:int" use="optional" />
      <xs:attribute name="type" type="serverType" use="required" />
    </xs:complexType>
  </xs:element>
  <xs:element name="target">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="URLConnector" minOccurs="1" maxOccurs="1" />
        <xs:element ref="manager" minOccurs="0" maxOccurs="1" />
      </xs:sequence>
      <xs:attribute name="name" type="xs:string" use="required" />
      <xs:attribute name="type" type="serverType" use="required" />
    </xs:complexType>
  </xs:element>
  <xs:element name="worker">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="URLConnector" minOccurs="1" maxOccurs="1" />
      </xs:sequence>
      <xs:attribute name="name" type="xs:string" use="required" />
      <xs:attribute name="type" type="workerType" use="required" />
    </xs:complexType>
  </xs:element>
  <xs:element name="VMM">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="URLConnector" minOccurs="1" maxOccurs="1" />
      </xs:sequence>
      <xs:attribute name="name" type="xs:string" use="required" />
      <xs:attribute name="type" type="vmmType" use="required" />
    </xs:complexType>
  </xs:element>
  <xs:element name="manager">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="URLConnector" minOccurs="1" maxOccurs="1" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="balancer">
    <xs:complexType>
      <xs:attribute name="worker" type="xs:string" use="required" />
      <xs:attribute name="server" type="xs:string" use="required" />
    </xs:complexType>
  </xs:element>
  <xs:element name="VM">
    <xs:complexType>
      <xs:attribute name="name" type="xs:string" use="required" />
      <xs:attribute name="vmm" type="xs:string" use="required" />
    </xs:complexType>
  </xs:element>
  <xs:element name="URLConnector">
    <xs:complexType>
      <xs:attribute name="URL" type="xs:anyURI" use="required" />
      <xs:attribute name="username" type="xs:string" use="optional" />
      <xs:attribute name="password" type="xs:string" use="optional" />
    </xs:complexType>
  </xs:element>
  <xs:simpleType name="workerType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="mod_jk" />
      <xs:enumeration value="mod_proxy_balancer" />
      <xs:enumeration value="dummy" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="serverType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="jonas" />
      <xs:enumeration value="jboss" />
      <xs:enumeration value="glassfish" />
      <xs:enumeration value="osgi" />
      <xs:enumeration value="weblogic" />
      <xs:enumeration value="websphere" />
      <xs:enumeration value="dummy" />
    </xs:restriction>
  </xs:simpleType>
    <xs:simpleType name="vmmType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="jasmineVMM" />
    </xs:restriction>
  </xs:simpleType>
</xs:schema>
