<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2"
        xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:espas="http://schemas.espas-fp7.eu/2.1"
        targetNamespace="http://schemas.espas-fp7.eu/2.1" 
        elementFormDefault="qualified" attributeFormDefault="unqualified"
        version="1.0"><!-- Schema auto-generated by FullMoon, applying rule suite xmi11ea -->
    <annotation>
        <documentation>[WARN-A001] - No package description in UML model</documentation>
    </annotation>
    <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
    <import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
    <include schemaLocation="utilities.xsd"/>
    <include schemaLocation="observation.xsd"/>

    <element name="ESPAS_ObservationCollection" substitutionGroup="gml:AbstractFeature"
             type="espas:ESPAS_ObservationCollectionType">
        <annotation>
            <documentation>-- Definition --
                A collection of existing observations.

                -- Description --
                Observations can be aggregated in collections organised with significantly more flexibility than
                including only those observations conducted in support of the same project.

                EXAMPLE A collection including all the conducted observations under the project DIAS.
            </documentation>
        </annotation>
    </element>
    <complexType name="ESPAS_ObservationCollectionType">
        <complexContent>
            <extension base="gml:AbstractFeatureType">
                <sequence>
                    <element name="identifier" type="espas:ESPAS_IdentifierPropertyType">
                        <annotation>
                            <documentation>-- Definition --
                                External identifier of the observation collection.

                                -- Description --
                                NOTE The identifier may be used by an external application to reference an observation
                                collection.

                            </documentation>
                        </annotation>
                    </element>
                    <element name="name" type="string">
                        <annotation>
                            <documentation>-- Definition --
                                Name of the Observation Collection.

                            </documentation>
                        </annotation>
                    </element>
                    <element maxOccurs="1" minOccurs="0" name="description" type="string">
                        <annotation>
                            <documentation>-- Definition --
                                Description of the observation collection including the criteria for its creation.

                                -- Description --
                                Criteria could be a common observation process, an observable property etc.


                            </documentation>
                        </annotation>
                    </element>
                    <element maxOccurs="unbounded" minOccurs="0" name="relatedParty"
                             type="espas:ESPAS_ResponsiblePartyInfo_ExtendedPropertyType">
                        <annotation>
                            <documentation>-- Definition --
                                Individual or organisation related to the observation collection
                            </documentation>
                        </annotation>
                    </element>
                    <element maxOccurs="unbounded" minOccurs="0" name="additionalMetadata"
                             type="espas:CI_OnlineResource_ExtendedPropertyType">
                        <annotation>
                            <documentation>-- Definition --
                                Resources for any non ISO conformed metadata about the Observation Collection.
                            </documentation>
                        </annotation>
                    </element>
                    <element maxOccurs="unbounded" minOccurs="0" name="isoMetadata" type="gmd:MD_Metadata_PropertyType">
                        <annotation>
                            <documentation>-- Definition --
                                ISO metadata about the Observation Collection.
                            </documentation>
                        </annotation>
                    </element>
                    <element name="query" type="string">
                        <annotation>
                            <documentation>-- Definition --
                                The CQuery query that describes the observations that belong to this collection

                                -- Description --
                                The detailed query in CQuery format that describes the observations that belong to this
                                collection

                            </documentation>
                        </annotation>
                    </element>
                    <!-- we don't use this element, because we use the Query to describe which observations belong to this collection
                    <element maxOccurs="unbounded" minOccurs="0" name="member" type="espas:ESPAS_ObservationPropertyType"/>
                    -->
                    <element maxOccurs="1" minOccurs="0" name="permission" type="espas:xlinkHref_PropertyType">
                        <annotation>
                            <documentation>-- Definition --
                                Restrictions on the access and use of observation's result.

                                -- Desription --
                                Restrictions on the access and use of the observation result are known without
                                navigating from the obseravtion to the result.

                            </documentation>
                        </annotation>
                    </element>
                </sequence>
                <attribute name="deleted" type="espas:deleteType"/>
            </extension>
        </complexContent>
    </complexType>
    <complexType name="ESPAS_ObservationCollectionPropertyType">
        <sequence minOccurs="0">
            <element ref="espas:ESPAS_ObservationCollection"/>
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
</schema>