<?xml version="1.0" encoding="UTF-8"?>
<schema
    targetNamespace="http://xml.fmi.fi/namespace/meteorology/conceptual-model/meteorological-objects/2009/11/09"
    xmlns:metobj="http://xml.fmi.fi/namespace/meteorology/conceptual-model/meteorological-objects/2009/11/09"
    xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:html="http://www.w3.org/1999/xhtml"
    xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sch="http://www.ascc.net/xml/schematron" elementFormDefault="qualified" version="1.0">

    <annotation>
        <appinfo>
            <sch:title>Schematron validation</sch:title>
            <sch:ns prefix="gml" uri="http://www.opengis.net/gml" />
            <sch:ns prefix="xlink" uri="http://www.w3.org/1999/xlink" />
            <sch:pattern name="Check either href or content not both">
                <sch:rule abstract="true" id="hrefOrContent">
                    <sch:report test="@xlink:href and (*|text())"
                        >Property element may not carry both a reference to an object and contain an object.</sch:report>
                    <sch:assert test="@xlink:href | (*|text())"
                        >Property element must either carry a reference to an object or contain an object.</sch:assert>
                </sch:rule>
            </sch:pattern>
        </appinfo>
        <documentation>
            <html:div xmlns="http://www.w3.org/1999/xhtml">
                <p>This document describes the common helper objects and properties used 
                in meteorological Conceptual Model objects schemas.</p>
                
                <p>For detailed info see <a href="http://xml.fmi.fi/namespace/meteorology/conceptual-model/meteorological-objects/2009/11/09">documentation</a></p>
                
                <p>Author: Ilkka Rinne / FMI 2009.</p>
            </html:div>
        </documentation>
    </annotation>

    <import namespace="http://www.opengis.net/gml" schemaLocation="gml311-part.xsd" />
    <import namespace="http://www.w3.org/XML/1998/namespace"
        schemaLocation="http://www.w3.org/2001/03/xml.xsd" />

    <import namespace="http://purl.org/dc/elements/1.1/"
        schemaLocation="http://dublincore.org/schemas/xmls/simpledc20021212.xsd" />


    <!-- ================================================= -->
    <element name="Approval" type="metobj:ApprovalType" substitutionGroup="gml:_Object" />
    <!-- ================================================= -->
    <complexType name="ApprovalType">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p />
                </html:div>
            </documentation>
        </annotation>
        <complexContent>
            <extension base="gml:AbstractGMLType">
                <sequence>
                    <element name="approvedBy" type="metobj:UserPropertyType" minOccurs="1" maxOccurs="1" />
                    <element name="approvalTime" type="dateTime" minOccurs="1" maxOccurs="1" />
                    <element name="approvedFor" type="metobj:shortStringType" minOccurs="0"
                        maxOccurs="unbounded" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <!-- ================================================================= -->
    <element name="approvalProperty" type="metobj:ApprovalPropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:approvalProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ================================================================= -->
    <complexType name="ApprovalPropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>

        <sequence minOccurs="0">
            <element ref="metobj:Approval" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />
    </complexType>

    <!-- ================================================= -->
    <element name="GeographicRegion" type="metobj:GeographicRegionType" substitutionGroup="gml:_Feature" />
    <!-- ================================================= -->
    <complexType name="GeographicRegionType">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p />
                </html:div>
            </documentation>
        </annotation>
        <complexContent>
            <extension base="gml:AbstractFeatureType">
                <sequence>
                    <element name="boundary" type="gml:LinearRingPropertyType" minOccurs="0" maxOccurs="1"/>
                    <element name="regionId" type="metobj:regionIdType" minOccurs="1" maxOccurs="unbounded"/>
                    <element name="localizedName" type="metobj:shortLocalizedStringType"
                        minOccurs="0" maxOccurs="unbounded" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <!-- ================================================================= -->
    <element name="geographicRegionProperty" type="metobj:GeographicRegionPropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:geographicRegionProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ================================================================= -->
    <complexType name="GeographicRegionPropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>

        <sequence minOccurs="0">
            <element ref="metobj:GeographicRegion" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />
    </complexType>
    
    <!-- ========================================================================= -->
    <element name="geographicRegionArrayMembers" type="metobj:GeographicRegionArrayAssociationType" />
    <!-- ========================================================================= -->
    <complexType name="GeographicRegionArrayAssociationType">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p />
                </html:div>
            </documentation>
        </annotation>
        <sequence>
            <element ref="metobj:GeographicRegion" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
    </complexType>
    
    <!-- ========================================================================= -->
    <element name="geographicRegionReference" type="metobj:GeographicRegionReferenceType" />
    <!-- ========================================================================= -->
    <complexType name="GeographicRegionReferenceType">
        <attributeGroup ref="gml:AssociationAttributeGroup" />
    </complexType>


    <!-- ================================================= -->
    <element name="Elevation" type="metobj:ElevationType" substitutionGroup="gml:_Object" />
    <!-- ================================================= -->
    <complexType name="ElevationType">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p />
                </html:div>
            </documentation>
        </annotation>
        <complexContent>
            <extension base="gml:AbstractGMLType">
                <sequence>
                    <choice>
                        <element name="coordinateReferenceSystem" type="anyURI" minOccurs="1" maxOccurs="1"/>
                        <element name="modelReference" type="metobj:NumericalModelHeightReferencePropertyType" minOccurs="1" maxOccurs="1"/>
                    </choice>
                    <element name="value" type="gml:MeasureType" minOccurs="1" maxOccurs="1" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <!-- ================================================================= -->
    <element name="elevationProperty" type="metobj:ElevationPropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:elevationProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ================================================================= -->
    <complexType name="ElevationPropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>
        <sequence minOccurs="0">
            <element ref="metobj:Elevation" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />
    </complexType>

    <!-- ================================================= -->
    <element name="NumericalModelHeightReference" type="metobj:NumericalModelHeightReferenceType" substitutionGroup="gml:_Object" />
    <!-- ================================================= -->
    <complexType name="NumericalModelHeightReferenceType">
        <complexContent>
            <extension base="gml:AbstractGMLType">
                <sequence>
                    <element name="type">
                        <simpleType>
                            <restriction base="string">
                                <enumeration value="distanceFromGround" />
                                <enumeration value="distanceFromSeaLevel" />
                                <enumeration value="pressureLevel" />
                                <enumeration value="modelLevel" />
                                <enumeration value="hybridLevel" />
                            </restriction>
                        </simpleType>
                    </element>
                    <element name="numericalModel" type="metobj:NumericalWeatherModelPropertyType"
                        minOccurs="1" maxOccurs="1" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <!-- ================================================================= -->
    <element name="numericalModelHeightReferenceProperty" type="metobj:NumericalModelHeightReferencePropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:numericalModelHeightReferenceProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ================================================================= -->
    <complexType name="NumericalModelHeightReferencePropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>
        <sequence minOccurs="0">
            <element ref="metobj:NumericalModelHeightReference" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />
    </complexType>
    
    <!-- ======================================================================================================== -->
    <element name="GeophysicalParameterValue"
        type="metobj:GeophysicalParameterValueType" substitutionGroup="gml:_Object" />
    <!-- ======================================================================================================== -->
    <complexType name="GeophysicalParameterValueType">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p>Value of a geophysical parameter (temperature, pressure, humidity,..). The main
                        intention for objects of this type is to represent observed and forecast parameter
                        values on a map.</p>
                </html:div>
            </documentation>
        </annotation>
        <complexContent>
            <extension base="gml:AbstractGMLType">
                <sequence>
                    <element name="parameter" type="metobj:GeophysicalParameterPropertyType"
                        minOccurs="1" maxOccurs="1" />
                    <element name="value" type="gml:MeasureType" minOccurs="1" maxOccurs="1" />
                    <element name="elevation" type="metobj:ElevationPropertyType" minOccurs="0" maxOccurs="1"/>
                    <element name="symbol" type="metobj:MeteorologicalSymbolPropertyType" minOccurs="0" maxOccurs="1"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <!-- ============================================================================= -->
    <element name="geophysicalParameterValueProperty" type="metobj:GeophysicalParameterValuePropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:geophysicalParameterValueProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ============================================================================= -->
    <complexType name="GeophysicalParameterValuePropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>
        
        <sequence minOccurs="0">
            <element ref="metobj:GeophysicalParameterValue" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />
        
    </complexType>
    
    <!-- ======================================================================================================== -->
    <element name="GeophysicalParameterValueRange"
        type="metobj:GeophysicalParameterValueRangeType" substitutionGroup="gml:_Object" />
    <!-- ======================================================================================================== -->
    <complexType name="GeophysicalParameterValueRangeType">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p>Value range of a geophysical parameter (temperature, pressure,
                        humidity,..) at some point-like location and at a specific time. The truth value of
                        this statement is not considered here, value may be speculative (forecast). The main
                        intention for objects of this type is to represent forecast parameter value ranges on a
                        map.</p> 
                    
                    <p>Preferred font size in points for the label can specified with the
                        preferredRenderingSize property by using "pt" as the uom (Unit Of Measure) attribute
                        of "value".</p>
                </html:div>
            </documentation>
        </annotation>
        <complexContent>
            <extension base="gml:AbstractGMLType">
                <sequence>
                    <element name="parameter" type="metobj:GeophysicalParameterPropertyType"
                        minOccurs="1" maxOccurs="1" />
                    <element name="lowerLimit" type="gml:MeasureType" minOccurs="1" maxOccurs="1" />
                    <element name="upperLimit" type="gml:MeasureType" minOccurs="1" maxOccurs="1" />
                    <element name="elevation" type="metobj:ElevationPropertyType" minOccurs="0" maxOccurs="1"/>
                    <element name="symbol" type="metobj:MeteorologicalSymbolPropertyType" minOccurs="0" maxOccurs="1"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <!-- ============================================================================= -->
    <element name="geophysicalParameterValueRangeProperty" type="metobj:GeophysicalParameterValueRangePropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:geophysicalParameterValueRangeProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ============================================================================= -->
    <complexType name="GeophysicalParameterValueRangePropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>
        
        <sequence minOccurs="0">
            <element ref="metobj:GeophysicalParameterValueRange" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />
    </complexType>
    
    <!-- ======================================================================================================== -->
    <element name="GeophysicalParameterValueSet"
        type="metobj:GeophysicalParameterValueSetType" substitutionGroup="gml:_Object" />
    <!-- ======================================================================================================== -->
    <complexType name="GeophysicalParameterValueSetType">
        <complexContent>
            <extension base="gml:AbstractGMLType">
                <sequence>
                     <element name="singleValue" type="metobj:GeophysicalParameterValuePropertyType" minOccurs="0" maxOccurs="unbounded"/>
                     <element name="valueRange" type="metobj:GeophysicalParameterValueRangePropertyType" minOccurs="0" maxOccurs="unbounded"/>
                    <element name="elevation" type="metobj:ElevationPropertyType" minOccurs="0" maxOccurs="1"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <!-- ============================================================================= -->
    <element name="geophysicalParameterValueSetProperty" type="metobj:GeophysicalParameterValueSetPropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:geophysicalParameterValueSetProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ============================================================================= -->
    <complexType name="GeophysicalParameterValueSetPropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>
        
        <sequence minOccurs="0">
            <element ref="metobj:GeophysicalParameterValueSet" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />
    </complexType>
    
    <!-- ============================================================= -->
    <element name="GeophysicalParameter" type="metobj:GeophysicalParameterType"
        substitutionGroup="gml:_Object" />
    <!-- ============================================================= -->
    <complexType name="GeophysicalParameterType">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p />
                </html:div>
            </documentation>
        </annotation>
        <complexContent>
            <extension base="gml:AbstractGMLType">
                <sequence>
                    <element name="localizedName" type="metobj:longLocalizedStringType"
                        minOccurs="1" maxOccurs="unbounded" />
                    <element name="abbreviation" type="metobj:shortStringType" minOccurs="0"
                        maxOccurs="1" />
                    <element name="reference" type="metobj:catalogReferenceType" minOccurs="0"
                        maxOccurs="unbounded" />
                    <element name="aggregation" type="metobj:TimeAggregationPropertyType" minOccurs="0"
                        maxOccurs="1" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <!-- ============================================================================= -->
    <element name="geophysicalParameterProperty" type="metobj:GeophysicalParameterPropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:geophysicalParameterProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ============================================================================= -->
    <complexType name="GeophysicalParameterPropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>

        <sequence minOccurs="0">
            <element ref="metobj:GeophysicalParameter" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />

    </complexType>

    <!-- =============================================================== -->
    <element name="ValidTimePeriod" type="metobj:SimpleTimePeriodType"
        substitutionGroup="gml:_TimeObject" />
    <!-- =============================================================== -->
    <complexType name="SimpleTimePeriodType">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p />
                </html:div>
            </documentation>
        </annotation>
        <complexContent>
            <extension base="gml:AbstractTimeObjectType">
                <sequence>
                    <element name="begin" type="dateTime" minOccurs="0" maxOccurs="1" />
                    <element name="end" type="dateTime" minOccurs="0" maxOccurs="1" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <!-- ============================================================================= -->
    <element name="validTimePeriodProperty" type="metobj:ValidTimePeriodPropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:validTimePeriodProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ============================================================================= -->
    <complexType name="ValidTimePeriodPropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>

        <sequence minOccurs="0">
            <element ref="metobj:ValidTimePeriod" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />

    </complexType>
        
    <!-- =============================================================== -->
    <element name="AbstractMeteorologicalSymbol" type="metobj:AbstractMeteorologicalSymbolType"
        abstract="true" substitutionGroup="gml:_Object" />
    <!-- =============================================================== -->
    <complexType name="AbstractMeteorologicalSymbolType" abstract="true">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p />
                </html:div>
            </documentation>
        </annotation>
        <complexContent>
            <extension base="gml:AbstractGMLType">
                <sequence>
                    <element name="knownSymbol" type="metobj:catalogReferenceType" minOccurs="0"
                        maxOccurs="unbounded" />
                    <element name="localizedSymbolName" type="metobj:shortLocalizedStringType"
                        minOccurs="0" maxOccurs="unbounded" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <!-- ============================================================================= -->
    <element name="meteorologicalSymbolProperty" type="metobj:MeteorologicalSymbolPropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:meteorologicalSymbolProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ============================================================================= -->
    <complexType name="MeteorologicalSymbolPropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of a GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>

        <sequence minOccurs="0">
            <element ref="metobj:AbstractMeteorologicalSymbol" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />

    </complexType>

    <!-- ========================================================= -->
    <element name="GraphicSymbol" type="metobj:GraphicSymbolType"
        substitutionGroup="metobj:AbstractMeteorologicalSymbol" />
    <!-- ========================================================= -->
    <complexType name="GraphicSymbolType">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p />
                </html:div>
            </documentation>
        </annotation>
        <complexContent>
            <extension base="metobj:AbstractMeteorologicalSymbolType">
                <sequence>
                    <element name="image" type="metobj:ResourceReferencePropertyType" minOccurs="0"
                        maxOccurs="unbounded" />
                    <element name="scaleFactor" type="float" minOccurs="0" maxOccurs="1" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <!-- ========================================================= -->
    <element name="FontSymbol" type="metobj:FontSymbolType"
        substitutionGroup="metobj:AbstractMeteorologicalSymbol" />
    <!-- ========================================================= -->
    <complexType name="FontSymbolType">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p />
                </html:div>
            </documentation>
        </annotation>
        <complexContent>
            <extension base="metobj:AbstractMeteorologicalSymbolType">
                <sequence>
                    <element name="fontName" type="string" minOccurs="1" maxOccurs="1" />
                    <element name="symbolIndex" type="int" minOccurs="1" maxOccurs="1" />
                    <element name="fontSizePoints" type="float" minOccurs="1" maxOccurs="1" />
                    <element name="color" type="metobj:SRGBColorPropertyType" minOccurs="0" maxOccurs="1"/>
                    <element name="fontResource" type="metobj:ResourceReferencePropertyType"
                        minOccurs="0" maxOccurs="1" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    

    <!-- =================================================== -->
    <element name="KnownPlace" type="metobj:KnownPlaceType" substitutionGroup="gml:_Object" />
    <!-- =================================================== -->
    <complexType name="KnownPlaceType">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p />
                </html:div>
            </documentation>
        </annotation>
        <complexContent>
            <extension base="gml:AbstractGMLType">
                <sequence>
                    <element name="localizedName" type="metobj:shortLocalizedStringType"
                        minOccurs="0" maxOccurs="unbounded" />
                    <element name="locationId" type="metobj:locationIdType" minOccurs="0"
                        maxOccurs="unbounded" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <!-- =========================================================================== -->
    <element name="knownPlaceProperty" type="metobj:KnownPlacePropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:knownPlaceProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- =========================================================================== -->
    <complexType name="KnownPlacePropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>

        <sequence minOccurs="0">
            <element ref="metobj:KnownPlace" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />

    </complexType>

    <!-- =========================================================================== -->
    <element name="MeteorologicalObjectMetaData" type="metobj:MeteorologicalObjectMetaDataType" />
    <!-- =========================================================================== -->
    <complexType name="MeteorologicalObjectMetaDataType" mixed="true">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p />
                </html:div>
            </documentation>
        </annotation>
                <sequence>
                    <element ref="dc:title" minOccurs="0" />
                    <element ref="dc:creator" minOccurs="0" />
                    <element ref="dc:subject" minOccurs="0" />
                    <element ref="dc:description" minOccurs="0" />
                    <element ref="dc:publisher" minOccurs="0" />
                    <element ref="dc:contributor" minOccurs="0" />
                    <element ref="dc:date" minOccurs="0" />
                    <element ref="dc:type" minOccurs="0" />
                    <element ref="dc:format" minOccurs="0" />
                    <element ref="dc:identifier" minOccurs="0" />
                    <element ref="dc:source" minOccurs="0" />
                    <element ref="dc:language" minOccurs="0" />
                    <element ref="dc:relation" minOccurs="0" />
                    <element ref="dc:coverage" minOccurs="0" />
                    <element ref="dc:rights" minOccurs="0" />
                    <element name="keyword" type="metobj:meteorologicalKeywordType" minOccurs="0"
                        maxOccurs="unbounded" />
                </sequence>
           
    </complexType>
    <!-- =========================================================================== -->
    <element name="meteorologicalObjectMetaDataProperty"
        type="metobj:MeteorologicalObjectMetaDataPropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:meteorologicalObjectMeataDataProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- =========================================================================== -->
    <complexType name="MeteorologicalObjectMetaDataPropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>

        <sequence minOccurs="0">
            <element ref="metobj:MeteorologicalObjectMetaData" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />

    </complexType>


    <!-- =================================================== -->
    <element name="NumericalModelRun" type="metobj:NumericalModelRunType"
        substitutionGroup="gml:_Object" />
    <!-- =================================================== -->
    <complexType name="NumericalModelRunType">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p />
                </html:div>
            </documentation>
        </annotation>
        <complexContent>
            <extension base="gml:AbstractGMLType">
                <sequence>
                    <element name="model" type="metobj:NumericalWeatherModelPropertyType" minOccurs="1"
                        maxOccurs="1" />
                    <element name="originTime" type="dateTime" minOccurs="1" maxOccurs="1" />
                    <element name="successful" type="boolean" minOccurs="0" maxOccurs="1" />
                    <element name="analysisTime" type="dateTime" minOccurs="0" maxOccurs="1" />
                    <element name="validTime" type="metobj:ValidTimePeriodPropertyType"
                        minOccurs="0" maxOccurs="1" />
                    <element name="availableSince" type="dateTime" minOccurs="0" maxOccurs="1" />
                    <element name="availableUntil" type="dateTime" minOccurs="0" maxOccurs="1" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <!-- ========================================================================= -->
    <element name="numericalModelRunProperty" type="metobj:NumericalModelRunPropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:dataSourceProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ========================================================================= -->
    <complexType name="NumericalModelRunPropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>

        <sequence minOccurs="0">
            <element ref="metobj:NumericalModelRun" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />

    </complexType>
    
    <!-- ================================================================= -->
    <element name="ResourceReference" type="metobj:ResourceReferenceType"
        substitutionGroup="gml:_Object" />
    <!-- ================================================================= -->
    <complexType name="ResourceReferenceType">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p />
                </html:div>
            </documentation>
        </annotation>
        <complexContent>
            <extension base="gml:AbstractGMLType">
                <sequence>
                    <element name="mimeType" type="anyURI" minOccurs="0" maxOccurs="1" />
                    <element name="uri" type="anyURI" minOccurs="0" maxOccurs="1" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <!-- ================================================================================= -->
    <element name="resourceReferenceProperty" type="metobj:ResourceReferencePropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:resourceReferenceProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ================================================================================= -->
    <complexType name="ResourceReferencePropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>
        
        <sequence minOccurs="0">
            <element ref="metobj:ResourceReference" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />
        
    </complexType>
    
    <!-- ================================================================= -->
    <element name="ForecastTextSection" type="metobj:ForecastTextSectionType"
        substitutionGroup="gml:_Object" />
    <!-- ================================================================= -->
    <complexType name="ForecastTextSectionType">
        <complexContent>
            <extension base="gml:AbstractGMLType">
                <sequence>
                    <element name="title" type="metobj:shortLocalizedStringType" minOccurs="1" maxOccurs="unbounded"/>
                    <element name="content" type="metobj:longLocalizedStringType" minOccurs="1" maxOccurs="unbounded"/>
                    <element name="context" minOccurs="0" maxOccurs="1">
                        <simpleType>
                            <restriction base="string">
                                <enumeration value="land"/>
                                <enumeration value="sea"/>
                                <enumeration value="lake"/>
                                <enumeration value="coast"/>
                                <enumeration value="highland"/>
                                <enumeration value="lowland"/>
                            </restriction>
                        </simpleType>
                    </element>
                    <element name="audience" minOccurs="0" maxOccurs="unbounded">
                      <simpleType>
                        <restriction base="string">
                          <enumeration value="forecaster"/>
                          <enumeration value="professional"/>
                          <enumeration value="general public"/>
                        </restriction>
                      </simpleType>
                    </element>
                    <element name="referenceData" type="metobj:DataSourceType" minOccurs="0" maxOccurs="unbounded"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    
    <!-- ================================================================================= -->
    <element name="forecastTextSectionProperty" type="metobj:ForecastTextSectionPropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:forecastTextSectionProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ================================================================================= -->
    <complexType name="ForecastTextSectionPropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>
        <sequence minOccurs="0">
            <element ref="metobj:ForecastTextSection" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />
    </complexType>
    
    <!-- ================================================================= -->
    <element name="WarningTextSection" type="metobj:WarningTextSectionType"
        substitutionGroup="metobj:ForecastTextSection" />
    <!-- ================================================================= -->
    <complexType name="WarningTextSectionType">
        <complexContent>
            <extension base="metobj:ForecastTextSectionType">
              <sequence>
                <element name="alertnessLevel" minOccurs="0" maxOccurs="1">
                  <simpleType>
                    <restriction base="string">
                      <enumeration value="normal"/>
                      <enumeration value="low"/>
                      <enumeration value="medium"/>
                      <enumeration value="high"/>
                      <enumeration value="conditional"/>
                    </restriction>
                  </simpleType>
                </element>
                <element name="warningReference" type="metobj:ResourceReferencePropertyType" minOccurs="0" maxOccurs="unbounded"/>
              </sequence>
            </extension>
        </complexContent>
    </complexType>
    
    <!-- ================================================================= -->
    <element name="TemperatureTextSection" type="metobj:TemperatureTextSectionType"
        substitutionGroup="metobj:ForecastTextSection" />
    <!-- ================================================================= -->
    <complexType name="TemperatureTextSectionType">
        <complexContent>
            <extension base="metobj:ForecastTextSectionType"/>
        </complexContent>
    </complexType>
    
    <!-- ================================================================= -->
    <element name="RainTextSection" type="metobj:RainTextSectionType"
        substitutionGroup="metobj:ForecastTextSection" />
    <!-- ================================================================= -->
    <complexType name="RainTextSectionType">
        <complexContent>
            <extension base="metobj:ForecastTextSectionType"/>
        </complexContent>
    </complexType>
    
    <!-- ================================================================= -->
    <element name="WindTextSection" type="metobj:WindTextSectionType"
        substitutionGroup="metobj:ForecastTextSection" />
    <!-- ================================================================= -->
    <complexType name="WindTextSectionType">
        <complexContent>
            <extension base="metobj:ForecastTextSectionType">
              <sequence>
                
              </sequence>
            </extension>
        </complexContent>
    </complexType>
    
    <!-- ================================================================= -->
    <element name="CloudinessTextSection" type="metobj:CloudinessTextSectionType"
        substitutionGroup="metobj:ForecastTextSection" />
    <!-- ================================================================= -->
    <complexType name="CloudinessTextSectionType">
        <complexContent>
            <extension base="metobj:ForecastTextSectionType"/>
        </complexContent>
    </complexType>
    
    <!-- =================================================== -->
    <element name="DataSource" type="metobj:DataSourceType" substitutionGroup="gml:_Object" />
    <!-- =================================================== -->
    <complexType name="DataSourceType">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p />
                </html:div>
            </documentation>
        </annotation>
        <complexContent>
            <extension base="gml:AbstractGMLType">
                <choice>
                    <element name="numericalModelRun" type="metobj:NumericalModelRunPropertyType"
                        minOccurs="1" maxOccurs="1" />
                    <element name="observationsCollectedUntil" type="dateTime" minOccurs="1"
                        maxOccurs="1" />
                    <element name="meteorologicalAnalysis"
                        type="metobj:MeteorologicalAnalysisReferencePropertyType" minOccurs="1"
                        maxOccurs="1" />
                    <element name="weatherForecast"
                        type="metobj:WeatherForecastReferencePropertyType" minOccurs="1"
                        maxOccurs="1" />
                    <element name="satelliteImage" type="metobj:SatelliteImageReferencePropertyType"
                        minOccurs="1" maxOccurs="1" />
                    <element name="radarImage" type="metobj:RadarImageReferencePropertyType"
                        minOccurs="1" maxOccurs="1" />
                </choice>
            </extension>
        </complexContent>
    </complexType>
    <!-- ========================================================================= -->
    <element name="dataSourceProperty" type="metobj:DataSourcePropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:dataSourceProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ========================================================================= -->
    <complexType name="DataSourcePropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>
        
        <sequence minOccurs="0">
            <element ref="metobj:DataSource" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />
        
    </complexType>
    <!-- ================================================================= -->
    <element name="SatelliteImageReference" type="metobj:SatelliteImageReferenceType"
        substitutionGroup="gml:_Feature" />
    <!-- ================================================================= -->
    <complexType name="SatelliteImageReferenceType">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                <p />
            </html:div>
            </documentation>
        </annotation>
        <complexContent>
            <extension base="gml:AbstractFeatureType">
                <sequence>
                    <element name="instrument" type="metobj:shortStringType" minOccurs="1"
                        maxOccurs="1" />
                    <element name="channel" type="metobj:shortStringType" minOccurs="0"
                        maxOccurs="unbounded" />
                    <element name="referenceTime" type="dateTime" minOccurs="1" maxOccurs="1" />
                    <element name="metaData" minOccurs="0" maxOccurs="1">
                        <complexType>
                            <sequence>
                                <any minOccurs="0" maxOccurs="unbounded" />
                            </sequence>
                        </complexType>
                    </element>
                    <element name="data" type="metobj:ResourceReferenceType" minOccurs="1"
                        maxOccurs="unbounded" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <!-- ================================================================================= -->
    <element name="satelliteImageReferenceProperty"
        type="metobj:SatelliteImageReferencePropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:satelliteImageReferenceProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ================================================================================= -->
    <complexType name="SatelliteImageReferencePropertyType">
        <annotation>
            <documentation>Container for sat image reference - follow gml:ArrayAssociationType pattern.</documentation>
        </annotation>
        <sequence minOccurs="0">
            <element ref="metobj:SatelliteImageReference" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />
    </complexType>

    <!-- ================================================================= -->
    <element name="RadarImageReference" type="metobj:RadarImageReferenceType"
        substitutionGroup="gml:_Feature" />
    <!-- ================================================================= -->
    <complexType name="RadarImageReferenceType">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p />
                </html:div>
            </documentation>
        </annotation>
        <complexContent>
            <extension base="gml:AbstractFeatureType">
                <sequence>
                    <element name="instrument" type="metobj:shortStringType" minOccurs="1"
                        maxOccurs="1" />
                    <choice>
                        <element ref="gml:pointProperty" minOccurs="1" maxOccurs="1" />
                        <element ref="metobj:knownPlaceProperty" minOccurs="1" maxOccurs="1" />
                    </choice>
                    <element name="metaData" minOccurs="0" maxOccurs="1">
                        <complexType>
                            <sequence>
                                <any minOccurs="0" maxOccurs="unbounded" />
                            </sequence>
                        </complexType>
                    </element>
                    <element name="data" type="metobj:ResourceReferenceType" minOccurs="1"
                        maxOccurs="unbounded" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <!-- ================================================================================= -->
    <element name="radarImageReferenceProperty" type="metobj:RadarImageReferencePropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:radarImageReferenceProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ================================================================================= -->
    <complexType name="RadarImageReferencePropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>

        <sequence minOccurs="0">
            <element ref="metobj:RadarImageReference" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />

    </complexType>

    <!-- ================================================================= -->
    <element name="WeatherForecastReference" type="metobj:WeatherForecastReferenceType"
        substitutionGroup="gml:_Feature" />
    <!-- ================================================================= -->
    <complexType name="WeatherForecastReferenceType">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p />
                </html:div>
            </documentation>
        </annotation>
        <complexContent>
            <extension base="gml:AbstractFeatureType">
                <sequence>
                    <element name="targetRegion" type="metobj:GeographicRegionPropertyType" minOccurs="1"
                        maxOccurs="unbounded" />
                    <element name="analysisTime" type="dateTime" minOccurs="0" maxOccurs="1" />
                    <element name="forecastTime" type="dateTime" minOccurs="1" maxOccurs="1" />
                    <element name="metaData" minOccurs="0" maxOccurs="1">
                        <complexType>
                            <sequence>
                                <any minOccurs="0" maxOccurs="unbounded" />
                            </sequence>
                        </complexType>
                    </element>
                    <element name="data" type="metobj:ResourceReferenceType" minOccurs="1"
                        maxOccurs="unbounded" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <!-- ================================================================================= -->
    <element name="weatherForecastReferenceProperty"
        type="metobj:WeatherForecastReferencePropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:weatherForecastReferenceProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ================================================================================= -->
    <complexType name="WeatherForecastReferencePropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>

        <sequence minOccurs="0">
            <element ref="metobj:WeatherForecastReference" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />
    </complexType>


    <!-- ================================================================= -->
    <element name="MeteorologicalAnalysisReference"
        type="metobj:MeteorologicalAnalysisReferenceType" substitutionGroup="gml:_Feature" />
    <!-- ================================================================= -->
    <complexType name="MeteorologicalAnalysisReferenceType">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p />
                </html:div>
            </documentation>
        </annotation>
        <complexContent>
            <extension base="gml:AbstractFeatureType">
                <sequence>
                    <element name="targetRegion" type="metobj:GeographicRegionPropertyType" minOccurs="1"
                        maxOccurs="unbounded" />
                    <element name="analysisTime" type="dateTime" minOccurs="0" maxOccurs="1" />
                    <element name="metaData" minOccurs="0" maxOccurs="1">
                        <complexType>
                            <sequence>
                                <any minOccurs="0" maxOccurs="unbounded" />
                            </sequence>
                        </complexType>
                    </element>
                    <element name="data" type="metobj:ResourceReferenceType" minOccurs="1"
                        maxOccurs="unbounded" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <!-- ================================================================================= -->
    <element name="meteorologicalAnalysisReferenceProperty"
        type="metobj:MeteorologicalAnalysisReferencePropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:meteorologicalAnalysisReferenceProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ================================================================================= -->
    <complexType name="MeteorologicalAnalysisReferencePropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>

        <sequence minOccurs="0">
            <element ref="metobj:MeteorologicalAnalysisReference" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />
    </complexType>
    
    
    <!-- ================================================================= -->
    <element name="TimeInterpolation"
        type="metobj:TimeInterpolationType" substitutionGroup="gml:_Object" />
    <!-- ================================================================= -->
    <complexType name="TimeInterpolationType">
        <complexContent>
            <extension base="gml:AbstractGMLType">
                <sequence>
                    <element name="method" type="metobj:timeInterpolationMethodType" minOccurs="1"
                        maxOccurs="1" />
                    <element name="maxResolution" type="gml:TimeIntervalLengthType" minOccurs="0" maxOccurs="1"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    
    <!-- ================================================================================= -->
    <element name="timeInterpolationProperty"
        type="metobj:TimeInterpolationPropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:timeInterpolationProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ================================================================================= -->
    <complexType name="TimeInterpolationPropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>
        
        <sequence minOccurs="0">
            <element ref="metobj:TimeInterpolation" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />
    </complexType>
    
    <!-- ================================================================= -->
    <element name="TimeAggregation"
        type="metobj:TimeAggregationType" substitutionGroup="gml:_Object" />
    <!-- ================================================================================= -->
    <complexType name="TimeAggregationType">
        <complexContent>
            <extension base="gml:AbstractGMLType">
        <sequence>
            <element name="function" minOccurs="1" maxOccurs="1">
                <simpleType>
                    <restriction base="string">
                        <enumeration value="avg" />
                        <enumeration value="slidingAvg" />
                        <enumeration value="mean" />
                        <enumeration value="min" />
                        <enumeration value="max" />
                        <enumeration value="count" />
                        <enumeration value="sum" />
                    </restriction>
                </simpleType>
            </element>
            <element name="aggregationTime" type="gml:TimeIntervalLengthType" minOccurs="1" maxOccurs="1"/>
        </sequence>
            </extension>
            </complexContent>
    </complexType>
    <!-- ================================================================================= -->
    <element name="timeAggregationProperty"
        type="metobj:TimeAggregationPropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:timeAggregationProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ================================================================================= -->
    <complexType name="TimeAggregationPropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>
        
        <sequence minOccurs="0">
            <element ref="metobj:TimeAggregation" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />
    </complexType>
    
    <!-- ================================================================= -->
    <element name="User"
        type="metobj:UserType" substitutionGroup="gml:_Object" />
    <!-- ================================================================================= -->
    <complexType name="UserType">
        <complexContent>
            <extension base="gml:AbstractGMLType">
        <sequence>
            <element name="userId" minOccurs="1" maxOccurs="1">
                <complexType>
                    <simpleContent>
                        <extension base="metobj:shortStringType">
                            <attribute name="scheme" type="anyURI" use="required" />
                        </extension>
                    </simpleContent>
                </complexType>
            </element>
            <element name="role" minOccurs="0" maxOccurs="1">
                <complexType>
                    <simpleContent>
                        <extension base="metobj:shortStringType">
                            <attribute name="scheme" type="anyURI" use="required" />
                        </extension>
                    </simpleContent>
                </complexType>
            </element>
            <element name="firstName" type="metobj:shortStringType" minOccurs="0" maxOccurs="1" />
            <element name="middleName" type="metobj:shortStringType" minOccurs="0" maxOccurs="1" />
            <element name="lastName" type="metobj:shortStringType" minOccurs="0" maxOccurs="1" />
        </sequence>
            </extension>
            </complexContent>
    </complexType>
    <!-- ================================================================================= -->
    <element name="userProperty"
        type="metobj:UserPropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:userProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ================================================================================= -->
    <complexType name="UserPropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>
        
        <sequence minOccurs="0">
            <element ref="metobj:User" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />
    </complexType>
    
    <!-- ================================================================= -->
    <element name="NumericalWeatherModel"
        type="metobj:NumericalWeatherModelType" substitutionGroup="gml:_Object" />
    <!-- ================================================================================= -->
    <complexType name="NumericalWeatherModelType">
        <complexContent>
            <extension base="gml:AbstractGMLType">
        <sequence>
            <element name="model" type="metobj:numericalWeatherModelId" minOccurs="1" maxOccurs="1"/>
            <element name="specifier" type="metobj:shortStringType" minOccurs="0" maxOccurs="1" />
        </sequence>
            </extension>
            </complexContent>
    </complexType>
    
    <!-- ================================================================================= -->
    <element name="numericalWeatherModelProperty"
        type="metobj:UserPropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:numericalWeatherModelProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ================================================================================= -->
    <complexType name="NumericalWeatherModelPropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>
        
        <sequence minOccurs="0">
            <element ref="metobj:NumericalWeatherModel" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />
    </complexType>
    
    <!-- ================================================================= -->
    <element name="SRGBColor" type="metobj:SRGBColorType" substitutionGroup="gml:_Object"/>
    <!-- ================================================================= -->
    <complexType name="SRGBColorType">
        <complexContent>
            <extension base="gml:AbstractGMLType">
                <sequence>
                    <element name="red" minOccurs="1" maxOccurs="1">
                        <simpleType>
                            <restriction base="int">
                                <minInclusive value="0"/>
                                <maxInclusive value="255"/>
                            </restriction>
                        </simpleType>
                    </element>
                    <element name="green" minOccurs="1" maxOccurs="1">
                        <simpleType>
                            <restriction base="int">
                                <minInclusive value="0"/>
                                <maxInclusive value="255"/>
                            </restriction>
                        </simpleType>
                    </element>
                    <element name="blue" minOccurs="1" maxOccurs="1">
                        <simpleType>
                            <restriction base="int">
                                <minInclusive value="0"/>
                                <maxInclusive value="255"/>
                            </restriction>
                        </simpleType>
                    </element>
                    <element name="alpha" minOccurs="0" maxOccurs="1">
                        <simpleType>
                            <restriction base="int">
                                <minInclusive value="0"/>
                                <maxInclusive value="255"/>
                            </restriction>
                        </simpleType>
                    </element>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <!-- ================================================================================= -->
    <element name="sRGBColorProperty"
        type="metobj:SRGBColorPropertyType">
        <annotation>
            <appinfo>
                <sch:pattern name="refAndContent co-occurence prohibited">
                    <sch:rule context="metobj:sRGBColorProperty">
                        <sch:extends rule="hrefOrContent" />
                    </sch:rule>
                </sch:pattern>
            </appinfo>
        </annotation>
    </element>
    <!-- ================================================================================= -->
    <complexType name="SRGBColorPropertyType">
        <annotation>
            <documentation>To be used when using this object type as property of n GML object
                type according to the GML object-property-association model (it is not allowed for
                GML Objects to contain other GML Objects as direct children). Enables referencing to
                an existing object using xlink:href attribute.</documentation>
        </annotation>
        
        <sequence minOccurs="0">
            <element ref="metobj:SRGBColor" />
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup" />
    </complexType>
    
    <!-- General helper types -->

    <complexType name="shortLocalizedStringType">
        <annotation>
            <documentation>A short string-valued text designed to be able to fit into a single
                varchar type field in a database.</documentation>
        </annotation>
        <simpleContent>
            <extension base="metobj:shortStringType">
                <attribute ref="xml:lang" use="required" />
            </extension>
        </simpleContent>
    </complexType>
    
    

    <simpleType name="shortStringType">
        <annotation>
            <documentation />
        </annotation>
        <restriction base="string">
            <minLength value="0" />
            <maxLength value="128" />
        </restriction>
    </simpleType>

    <complexType name="longLocalizedStringType">
        <annotation>
            <documentation>A short string-valued text designed to be able to fit into a single
                varchar type field in a database.</documentation>
        </annotation>
        <simpleContent>
            <extension base="metobj:longStringType">
                <attribute ref="xml:lang" use="required" />
            </extension>
        </simpleContent>
    </complexType>

    <simpleType name="longStringType">
        <annotation>
            <documentation />
        </annotation>
        <restriction base="string">
            <minLength value="0" />
            <maxLength value="4096" />
        </restriction>
    </simpleType>

    <simpleType name="percentageType">
        <annotation>
            <documentation />
        </annotation>
        <restriction base="float">
            <minInclusive value="0" />
            <maxInclusive value="1" />
        </restriction>
    </simpleType>

    <complexType name="locationIdType">
        <simpleContent>
            <extension base="metobj:shortStringType">
                <attribute name="scheme" use="required">
                    <simpleType>
                        <restriction base="string">
                            <enumeration value="wmocode" />
                            <enumeration value="lpnn" />
                            <enumeration value="icao" />
                            <enumeration value="other" />
                            <!-- Enumerate administrative region authority codes here, from INSPIRE? -->
                        </restriction>
                    </simpleType>
                </attribute>
            </extension>
        </simpleContent>
    </complexType>
    
    <complexType name="regionIdType">
        <simpleContent>
            <extension base="metobj:shortStringType">
                <attribute name="scheme" use="required">
                    <simpleType>
                        <restriction base="string">
                            <!-- Enumerate administrative region authority codes here, from INSPIRE? -->
                        </restriction>
                    </simpleType>
                </attribute>
            </extension>
        </simpleContent>
    </complexType>

    <complexType name="meteorologicalKeywordType">
        <simpleContent>
            <extension base="metobj:shortStringType">
                <attribute name="fixedVocabulary" use="optional">
                    <simpleType>
                        <restriction base="string">
                            <enumeration value="generic" />
                            <enumeration value="satellite" />
                            <enumeration value="radar" />
                            <enumeration value="nwm" />
                            <enumeration value="observation" />
                            <enumeration value="forecast" />
                        </restriction>
                    </simpleType>
                </attribute>
            </extension>
        </simpleContent>
    </complexType>

    <complexType name="catalogReferenceType">
        <simpleContent>
            <extension base="anyURI">
                <attribute name="scheme" use="required">
                    <simpleType>
                        <restriction base="string">
                            <enumeration value="wmo" />
                            <enumeration value="fmi" />
                            <enumeration value="icao" />
                            <enumeration value="ogc" />
                            <enumeration value="other" />
                        </restriction>
                    </simpleType>
                </attribute>
            </extension>
        </simpleContent>
    </complexType>

    
    
    <simpleType name="numericalWeatherModelId">
        <union>
            <simpleType>
                <restriction base="string">
                    <enumeration value="HirlamRCR" />
                    <enumeration value="HirlamMBE" />
                    <enumeration value="GFS"/>
                    <enumeration value="GFS Ensamble"/>
                    <enumeration value="ECMWF"/>
                    <enumeration value="ECMWF Ensamble"/>
                    <enumeration value="GME" />
                    <enumeration value="JMA" />
                    <enumeration value="GEM" />
                    <enumeration value="NOGAPS" />
                    <enumeration value="UKMO" />
                    <enumeration value="Arome" />
                </restriction>
            </simpleType>
            <simpleType>
                <restriction base="string">
                    <pattern value="other:\w{2,}"/>
                </restriction>
            </simpleType>
        </union>
    </simpleType>
    
    <simpleType name="rainPhaseType">
        <restriction base="string">
            <enumeration value="rain" />
            <enumeration value="snow" />
            <enumeration value="fog" />
            <enumeration value="sleet" />
            <enumeration value="hail" />
            <enumeration value="freezing-precipitation" />
            <enumeration value="drizzle" />
            <enumeration value="mixed" />
            <enumeration value="unknown" />
        </restriction>
    </simpleType>

    <simpleType name="cloudTypeAnnex3Type">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p>From the ICAO's "Annex 3 to the Convention on 
                        International Civil Aviation: Meteorological Service 
                        for International Air Navigation", Appendix 1, page 16. 
                    </p>
                    <dl>
                        <dt>CI</dt><dd>Cirrus</dd>
                        <dt>CC</dt><dd>Cirrocumulus</dd>
                        <dt>CS</dt><dd>Cirrostratus</dd>
                        <dt>AC</dt><dd>Altocumulus</dd>
                        <dt>AS</dt><dd>Altostratus</dd>
                        <dt>NS</dt><dd>Nimbostratus</dd>
                        <dt>SC</dt><dd>Stratocumulus</dd>
                        <dt>ST</dt><dd>Stratus</dd>
                        <dt>CU</dt><dd>Cumulus</dd>
                        <dt>CB</dt><dd>Cumulonimbus</dd>
                        <dt>UNKNOWN</dt><dd>Unknown type</dd>
                    </dl>
                </html:div>
            </documentation>
        </annotation>
        <restriction base="string">
            <enumeration value="CI" />
            <enumeration value="CC" />
            <enumeration value="CS" />
            <enumeration value="AC" />
            <enumeration value="AS" />
            <enumeration value="NS" />
            <enumeration value="SC" />
            <enumeration value="ST" />
            <enumeration value="CU" />
            <enumeration value="CB" />
            <enumeration value="UNKNOWN" />
        </restriction>
    </simpleType>

    <simpleType name="cloudCoverEighthsType">
        <restriction base="string">
            <!-- 9/8 = undetermined -->
            <pattern value="[0-9]{1}/8" />
        </restriction>
    </simpleType>

    <simpleType name="cloudCoverAnnex3Type">
        <annotation>
            <documentation>
                <html:div xmlns="http://www.w3.org/1999/xhtml">
                    <p>From the ICAO's "Annex 3 to the Convention on 
                        International Civil Aviation: Meteorological Service 
                        for International Air Navigation", Appendix 1, page 16. 
                    </p>
                    <dl>
                        <dt>SKC</dt><dd>sky clear (0/8)</dd>
                        <dt>FEW</dt><dd>few (1/8 to 2/8)</dd>
                        <dt>SCT</dt><dd>scattered (3/8 to 4/8)</dd>
                        <dt>BKN</dt><dd>broken (5/8 to 7/8)</dd>
                        <dt>OVC</dt><dd>overcast (8/8)</dd>
                        <dt>ISOL</dt><dd>individual CBs (isolated, CB only)</dd>
                        <dt>OCNL</dt><dd>well-separated CBs (occasional, CB only)</dd>
                        <dt>FRQ</dt><dd>CBs with little or no separation (frequent, CB only)</dd>
                        <dt>EMBD</dt><dd>CBs embedded in layers of other clouds or concealed by haze (embedded, CB only)</dd>
                    </dl>
                </html:div>
            </documentation>
        </annotation>
        <restriction base="string">
            <enumeration value="SKC" />
            <enumeration value="FEW" />
            <enumeration value="SCT" />
            <enumeration value="BKN" />
            <enumeration value="OVC" />
            <enumeration value="ISOL" />
            <enumeration value="OCNL" />
            <enumeration value="FRQ" />
            <enumeration value="EMBD" />
        </restriction>
    </simpleType>

    <simpleType name="timeInterpolationMethodType">
        <restriction base="string">
            <enumeration value="linear" />
            <enumeration value="nearest-neighbour" />
        </restriction>
    </simpleType>


    
</schema>