<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:annotation><xs:documentation>Schema contains Core and Submission schema. Use for package validation.</xs:documentation>
    </xs:annotation>
    <xs:include schemaLocation="Core.xsd"></xs:include>
    <xs:include schemaLocation="Submission.xsd"></xs:include>
    <xs:include schemaLocation="Links.xsd"></xs:include>
    <xs:include schemaLocation="Assembly.xsd"></xs:include>
    <xs:element name="PackageSet">
        <xs:annotation>
            <xs:documentation>
                Set of packages. 
            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence maxOccurs="unbounded">
                <xs:element name="Package" type="typePackage">
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:complexType name="typePackage">
        <xs:annotation>
            <xs:documentation>
                A container for project information that may be exchanged.
                May contain one or more single elements (i.e. one Project and one Submission)
            </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="Processing" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        Information about owner and what to do with the package
                    </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:attribute name="owner"  use="required" type="typeArchive">
                        <xs:annotation>
                            <xs:documentation> 
                                Owner of the package (host archive): NCBI, EMBL, DDBJ, .....
                            </xs:documentation>
                        </xs:annotation>
                    </xs:attribute>
                    <xs:attribute name="id" type="xs:positiveInteger">
                        <xs:annotation>
                            <xs:documentation>
                                Package ID; Optional
                            </xs:documentation>
                        </xs:annotation>
                    </xs:attribute>
                    <xs:attribute name="action" use="required">
                        <xs:annotation>
                            <xs:documentation>
                                What to do with the package. 
                                Is it just info (eUnchanged), new data (eAdded), update of the existing data (eUpdated) or data to be deleted (eDeleted)
                            </xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                            <xs:restriction base="xs:token">
                                <xs:enumeration value="eUnchanged">
                                </xs:enumeration>
                                <xs:enumeration value="eUpdated">
                                </xs:enumeration>
                                <xs:enumeration value="eAdded">
                                </xs:enumeration>
                                <xs:enumeration value="eDeleted">
                                </xs:enumeration>
                            </xs:restriction>
                        </xs:simpleType>
                    </xs:attribute>
                </xs:complexType>
            </xs:element>
            <xs:element name="Project" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        Project core XML (see corresponding schema)
                    </xs:documentation>
                </xs:annotation>
                <xs:complexType><xs:sequence>
<xs:element name="Project" type="typeProject">
    </xs:element>
                </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="Submission" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        Project submission XML (see corresponding schema)
                    </xs:documentation>
                </xs:annotation>
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="Submission"  type="typeSubmission">
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="ProjectAssembly" minOccurs="0">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="ProjectAssembly" minOccurs="1" maxOccurs="unbounded" type="typeProjectAssembly">
                        </xs:element>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="ProjectSubmission" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        Unique for BioProject submission information, that is indicated in element Path in the main submission XML. 
                        For instance comments for DB staff in web submission form, etc.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="ProjectLinks" minOccurs="0" type="typeProjectLinks">
                <xs:annotation>
                    <xs:documentation>
                        Project links XML (see corresponding schema)
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="ProjectPresentation" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        Project core XML. Currenty not used.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
        <!-- Types for submission XML -->
    <!-- submission xml File -->
    
    <!-- Generic address (postal) -->
    
    <!-- Name of a person -->
    
    <!-- Contact info - an address with email -->
    
    <!-- Account - a person with logon -->
    
    
    <!--
        Organization:
        we have people acting on behalf of organization (like lab or may be whole center or institute)
    -->
    
    <!--
        Center:
        Organization with known official contact. There are (several) managing accounts.
    -->
    
    <!-- 
        Object identificator : it conststs of 2 parts : database (where to look) and the obj id in this database.
        Note: for local objects Db is not specified
    --> 
</xs:schema>