<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.objectweb.org/jonas/ns"
            xmlns="http://www.w3.org/2001/XMLSchema"
            xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:jonas="http://www.objectweb.org/jonas/ns"
            elementFormDefault="qualified"
            attributeFormDefault="unqualified"
            version="0.1">
  <xsd:annotation>
    <xsd:documentation>
      @(#)jonas-deployment-plan_0_1.xsd  02/12/04
    </xsd:documentation>
  </xsd:annotation>
  <xsd:annotation>
    <xsd:documentation>
      <![CDATA[
      JOnAS: Java(TM) Open Application Server
      Copyright (C) 2004-2005 Bull S.A.
      Contact: jonas-team@objectweb.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

      Initial Author : Jerome Camilleri
      ]]>
   </xsd:documentation>
  </xsd:annotation>

  <xsd:annotation>
    <xsd:documentation>
      <![CDATA[
    This is XML Schema for jonas specific JSR 88 deployment descriptor information.

    All JOnAS Deployment Plans descriptors must indicate
    the jonas-deployment-plan schema by using the Jonas namespace:

    http://www.objectweb.org/jonas/ns

    and by indicating the version of the schema by
    using the version element as shown below:

    <jonas-deployment-plan xmlns="http://www.objectweb.org/jonas/ns"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://www.objectweb.org/jonas/ns
          http://www.objectweb.org/jonas/ns/jonas-deployment-plan_0_1.xsd">
    ...
    </jonas-deployment-plan>

    The instance documents may indicate the published version of
    the schema using the xsi:schemaLocation attribute for the
    Jonas namespace with the following location:

    http://www.objectweb.org/jonas/ns/jonas-deployment-plan_0_1.xsd

      ]]>
    </xsd:documentation>
  </xsd:annotation>

  <import namespace="http://java.sun.com/xml/ns/j2ee"
          schemaLocation="http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd"/>

  <xsd:element name="jonas-deployment-plan" type="jonas:jonas-deployment-planType">
    <xsd:annotation>
      <xsd:documentation>
        This is the root element of the JOnAS deployment plan.
      </xsd:documentation>
    </xsd:annotation>
  </xsd:element>

  <xsd:complexType name="jonas-deployment-planType">
    <xsd:annotation>
      <xsd:documentation>
    The jonas-deployment-planType defines the root element of the JOnAS specific
    deployment plan.
    It contains the JOnAS specific information necessary de deploy the application
    into the server using JSR88
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice maxOccurs="unbounded">
      <xsd:element name="archive-name" type="j2ee:string"
      	   minOccurs="0"
		   maxOccurs="1">
      </xsd:element>
      <xsd:element name="genic-properties" type="jonas:genic-propertiesType" 
		   minOccurs="0"
		   maxOccurs="unbounded">
      </xsd:element>
      <xsd:element name="mapping-specific-deployment"
                   type="jonas:mapping-specific-deploymentType"
		   minOccurs="0"
		   maxOccurs="unbounded">
      </xsd:element>
    </xsd:choice>
    <xsd:attribute name="id" type="xsd:ID" />
  </xsd:complexType>

  <xsd:complexType name="genic-propertiesType">
    <xsd:annotation>
      <xsd:documentation>
    The genic-propertiesType defines the JOnAS specific information for the genic
    properties. Name of the properties and value.
     </xsd:documentation>
    </xsd:annotation>
    <xsd:choice maxOccurs="unbounded">
      <xsd:element name="properties-name"
                   type="j2ee:string"
		   minOccurs="1"
		   maxOccurs="1">
      </xsd:element>
      <xsd:element name="properties-value"
                   type="j2ee:string"
		   minOccurs="1"
		   maxOccurs="1">
      </xsd:element>
    </xsd:choice>
  <xsd:attribute name="id" type="xsd:ID" />
  </xsd:complexType>

  <xsd:complexType name="mapping-specific-deploymentType">
    <xsd:annotation>
      <xsd:documentation>
    The mapping between archive include into deployment plan and specific deployment descriptor.
     </xsd:documentation>
    </xsd:annotation>
    <xsd:choice maxOccurs="unbounded">
      <xsd:element name="module-name"
                   type="j2ee:string"
		   minOccurs="1"
		   maxOccurs="1">
      </xsd:element>
      <xsd:element name="descriptor-name"
                   type="j2ee:string"
		   minOccurs="1"
		   maxOccurs="1">
      </xsd:element>
      <xsd:element name="descriptor-type"
                   type="jonas:descriptor-typeType"
		   minOccurs="1"
		   maxOccurs="1">
      </xsd:element>
    </xsd:choice>
  <xsd:attribute name="id" type="xsd:ID" />
  </xsd:complexType>

  <xsd:simpleType name="descriptor-typeType">
    <xsd:annotation>
      <xsd:documentation>
        Type of the JONAS specific descriptor file
     </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="jonas-ejb-jar" />
      <xsd:enumeration value="jonas-client" />
      <xsd:enumeration value="jonas-application" />
      <xsd:enumeration value="jonas-web" />
    </xsd:restriction>
  </xsd:simpleType>

</xsd:schema>
