<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.w3.org/2001/XMLSchema XMLSchema.xsd"
            xmlns:Deployment="http://www.omg.org/Deployment"
            targetNamespace="http://www.omg.org/Deployment">

  <xsd:include schemaLocation="Basic_Deployment_Data.xsd" />
  <xsd:include schemaLocation="ccd.xsd" />
  <xsd:include schemaLocation="iad.xsd" />
  <xsd:include schemaLocation="pcd.xsd" />
  <xsd:include schemaLocation="cpd.xsd" />

  <xsd:complexType name="SubcomponentInstantiationDescription">
    <xsd:sequence>
      <xsd:element name="name" type="xsd:string"/>
      <xsd:element name="basePackage" type="Deployment:ComponentPackageDescription" minOccurs="0" />
      <xsd:element name="specializedConfig" type="Deployment:PackageConfiguration" minOccurs="0" />
      <xsd:element name="selectRequirement" type="Deployment:Requirement" minOccurs="0" maxOccurs="unbounded" />
      <xsd:element name="configProperty" type="Deployment:Property" minOccurs="0" maxOccurs="unbounded" />
      <xsd:element name="referencedPackage" type="Deployment:ComponentPackageReference" minOccurs="0"/>
      <xsd:element name="importedPackage" type="Deployment:ComponentPackageImport" minOccurs="0"/>
    </xsd:sequence>
    <xsd:attribute name="id" type="xsd:ID"/>
  </xsd:complexType>

  <xsd:complexType name="SubcomponentPropertyReference">
    <xsd:sequence>
      <xsd:element name="propertyName" type="xsd:string"/>
      <xsd:element name="instance" type="xsd:IDREF"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="AssemblyPropertyMapping">
    <xsd:sequence>
      <xsd:element name="name" type="xsd:string"/>
      <xsd:element name="externalName" type="xsd:string"/>
      <xsd:element name="delegatesTo" type="Deployment:SubcomponentPropertyReference" maxOccurs="unbounded" />
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="ComponentAssemblyDescription">
    <xsd:sequence>
      <xsd:element name="instance" type="Deployment:SubcomponentInstantiationDescription" maxOccurs="unbounded"/>
      <xsd:element name="connection" type="Deployment:AssemblyConnectionDescription" minOccurs="0" maxOccurs="unbounded"/>
      <!-- <xsd:element name="locality" type="Deployment:Locality" minOccurs="0" maxOccurs="unbounded" /> -->
      <xsd:element name="externalProperty" type="Deployment:AssemblyPropertyMapping" minOccurs="0" maxOccurs="unbounded" />
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="MonolithicImplementationDescription">
    <xsd:sequence>
      <xsd:element name="nodeExecParameter" type="Deployment:Property" minOccurs="0" maxOccurs="unbounded" />
      <xsd:element name="componentExecParameter" type="Deployment:Property" minOccurs="0" maxOccurs="unbounded" />
      <xsd:element name="deployRequirement" type="Deployment:ImplementationRequirement" minOccurs="0" maxOccurs="unbounded" />
      <xsd:element name="primaryArtifact" type="Deployment:NamedImplementationArtifact" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="ComponentImplementationDescription">
    <xsd:choice minOccurs="0" maxOccurs="1">
      <xsd:sequence>
        <xsd:element name="label" type="xsd:string" minOccurs="0" />
        <xsd:element name="UUID" type="xsd:string" minOccurs="0" />
        <!-- @@ MAJO : Hack: Implements should be required. -->
        <xsd:element name="implements" type="Deployment:ComponentInterfaceDescription" minOccurs="0" />
        <xsd:choice>
          <xsd:element name="assemblyImpl" type="Deployment:ComponentAssemblyDescription"/>
          <xsd:element name="monolithicImpl" type="Deployment:MonolithicImplementationDescription"/>
        </xsd:choice>
        <xsd:element name="configProperty" type="Deployment:Property" minOccurs="0" maxOccurs="unbounded" />
        <xsd:element name="capability" type="Deployment:Capability" minOccurs="0" maxOccurs="unbounded" />
        <xsd:element name="dependsOn" type="Deployment:ImplementationDependency" minOccurs="0" maxOccurs="unbounded" />
        <xsd:element name="infoProperty" type="Deployment:Property" minOccurs="0" maxOccurs="unbounded" />
      </xsd:sequence>
      <xsd:element name="contentLocation" type="xsd:string"/>
    </xsd:choice>
    <xsd:attribute name="href" type="xsd:string" use="optional"/>
  </xsd:complexType>


</xsd:schema>
