<?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: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"/>
    <include schemaLocation="utilities.xsd"/>

    <!-- ESPAS_CompositeObservedProperty -->
    <element name="ESPAS_CompositeObservedProperty" substitutionGroup="espas:ESPAS_AbstractObservedProperty"
             type="espas:ESPAS_CompositeObservedPropertyType">
        <annotation>
            <documentation>-- Definition --
                Observed property consisting of two or more simple observed properties.
            </documentation>
        </annotation>
    </element>
    <complexType name="ESPAS_CompositeObservedPropertyType">
        <complexContent>
            <extension base="espas:ESPAS_AbstractObservedPropertyType">
                <sequence>
                    <element maxOccurs="unbounded" minOccurs="2" name="component"
                             type="espas:ESPAS_SimpleObservedProperty_ExtendedPropertyType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <complexType name="ESPAS_CompositeObservedPropertyPropertyType">
        <sequence>
            <element ref="espas:ESPAS_CompositeObservedProperty"/>
        </sequence>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>

    <!-- ESPAS_SimpleObservedProperty -->
    <element name="ESPAS_SimpleObservedProperty" substitutionGroup="espas:ESPAS_AbstractObservedProperty"
             type="espas:ESPAS_SimpleObservedPropertyType">
        <annotation>
            <documentation>-- Definition --
                Observed property which cannot split further into components.

                -- Description --
                EXAMPLE temperature, total cloud cover, wind direction.
            </documentation>
        </annotation>
    </element>
    <complexType name="ESPAS_SimpleObservedPropertyType">
        <complexContent>
            <extension base="espas:ESPAS_AbstractObservedPropertyType">
                <sequence>
                    <element name="basePhenomenon" type="gml:ReferenceType">
                        <annotation>
                            <documentation>-- Definition --
                                Name of a simple observed property from a controlled vocabulary or Ontology.

                            </documentation>
                        </annotation>
                    </element>
                    <element maxOccurs="1" minOccurs="0" name="constraint"
                             type="espas:ESPAS_ObservedPropertyConstraintPropertyType">
                        <annotation>
                            <documentation>-- Definition --
                                If present, it shall provide further detail required for an instance of the
                                SimpleObservedProperty.

                                -- Description --
                                NOTE It is used when a description of an instance of SimpleObservedProperty from a
                                controlled vocabulary or Ontology is not sufficient.

                                EXAMPLE For an observation of time series of daily maximum temperature:
                                &lt;ul&gt;
                                &lt;li&gt;basePhenomenon&amp;gt;temperature&lt;/li&gt;
                                &lt;li&gt;constraint&amp;gt;ObservablePropertyConstraint.label&amp;gt;Daily maximum&lt;/li&gt;
                                &lt;li&gt;constraint&amp;gt;ObservablePropertyConstraint.description&amp;gt;Maximum
                                temperature recorded for each day.&lt;/li&gt;
                                &lt;/ul&gt;

                            </documentation>
                        </annotation>
                    </element>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <complexType name="ESPAS_SimpleObservedPropertyPropertyType">
        <sequence>
            <element ref="espas:ESPAS_SimpleObservedProperty"/>
        </sequence>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>

    <!-- ESPAS_ObservedPropertyConstraint -->
    <element name="ESPAS_ObservedPropertyConstraint" substitutionGroup="gml:AbstractObject"
             type="espas:ESPAS_ObservedPropertyConstraintType">
        <annotation>
            <documentation>-- Definition --
                Describion of further detail for an instance of the SimpleObservedProperty, required when the
                description provided by a controlled vocabulary/ontology is not sufficient.
            </documentation>
        </annotation>
    </element>
    <complexType name="ESPAS_ObservedPropertyConstraintType">
        <sequence>
            <element maxOccurs="1" minOccurs="0" name="description" type="string">
                <annotation>
                    <documentation>-- Definition --
                        Meaning added to an instance of SimpleObservedProperty by the value of attribute&lt;i&gt; label.&lt;/i&gt;


                    </documentation>
                </annotation>
            </element>
            <element name="label" type="string">
                <annotation>
                    <documentation>-- Definition --
                        Text added to the name of an instance of SimpleObservedProperty.

                        -- Description --
                        EXAMPLE For an observation of Mean Temperature, where meanTempearture is not available from a
                        controlled vocabulary (so basePhenomenon=temperature):
                        label&amp;gt;Mean.

                    </documentation>
                </annotation>
            </element>
            <element maxOccurs="unbounded" minOccurs="0" name="subConstraint"
                     type="espas:ESPAS_ObservedPropertyConstraint_ExtendedPropertyType"/>
        </sequence>
    </complexType>
    <complexType name="ESPAS_ObservedPropertyConstraintPropertyType">
        <sequence>
            <element ref="espas:ESPAS_ObservedPropertyConstraint"/>
        </sequence>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>

    <!-- ESPAS_AbstractObservedProperty -->
    <element abstract="true" name="ESPAS_AbstractObservedProperty" substitutionGroup="gml:AbstractObject"
             type="espas:ESPAS_AbstractObservedPropertyType">
        <annotation>
            <documentation>-- Definition --
                Generalisation of more specific observed property classes: simple observable property, composite
                observed property.
            </documentation>
        </annotation>
    </element>
    <complexType abstract="true" name="ESPAS_AbstractObservedPropertyType">
        <sequence>
            <element maxOccurs="1" minOccurs="0" name="description" type="string">
                <annotation>
                    <documentation>-- Definition --
                        Human readable description of AbsractObservedProperty .
                    </documentation>
                </annotation>
            </element>
            <element maxOccurs="unbounded" minOccurs="0" name="label" type="espas:string_Extended">
                <annotation>
                    <documentation>-- Definition --
                        Human readable name by which an instance of AbsractObservedProperty is known.

                        -- Description --
                        NOTE label can be a long name as in CF conventions.
                        EXAMPLE label can be: rain rate or rainfall rate whereas basePhenomenon shall be
                        :precipitationIntensity.
                    </documentation>
                </annotation>
            </element>
        </sequence>
    </complexType>
    <complexType name="ESPAS_AbstractObservedPropertyPropertyType">
        <sequence>
            <element ref="espas:ESPAS_AbstractObservedProperty"/>
        </sequence>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>

    <!-- Extensions -->
    <complexType name="ESPAS_SimpleObservedProperty_ExtendedPropertyType">
        <complexContent>
            <extension base="espas:ESPAS_SimpleObservedPropertyPropertyType">
                <attribute name="deleted" type="espas:deleteType"/>
            </extension>
        </complexContent>
    </complexType>
    <complexType name="ESPAS_ObservedPropertyConstraint_ExtendedPropertyType">
        <complexContent>
            <extension base="espas:ESPAS_ObservedPropertyConstraintPropertyType">
                <attribute name="deleted" type="espas:deleteType"/>
            </extension>
        </complexContent>
    </complexType>
    <complexType name="string_Extended">
        <simpleContent>
            <extension base="string">
                <attribute name="deleted" type="espas:deleteType"/>
            </extension>
        </simpleContent>
    </complexType>

</schema>