<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://services.cuzk.cz/xsd/zpmz/1.0"
    xmlns:zpmz="http://services.cuzk.cz/xsd/zpmz/1.0"
    xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:cp-ext="http://services.cuzk.cz/xsd/inspire/cp-ext/4.0" elementFormDefault="qualified">
    <import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
    
    <element type="zpmz:ZPMZRecordType" substitutionGroup="gml:AbstractFeature" name="ZPMZRecord"/>
    <complexType name="ZPMZRecordType">
        <complexContent>
            <extension base="gml:AbstractFeatureType">
                <sequence>
                    <element name="downloadLink" type="gml:ReferenceType" minOccurs="0" maxOccurs="1">
                        <annotation>
                          <documentation xml:lang="cs">-- Definice -- Odkaz na stažení ZPMZ.</documentation>  
                          <documentation xml:lang="en">-- Definition -- ZPMZ file download link.</documentation>  
                        </annotation>
                    </element>
                    <element name="zpmzId">
                        <annotation>
                            <documentation xml:lang="cs">-- Definice -- Identifikátor ZPMZ - vychází z kódu katastrálního území a označení daného ZPMZ.</documentation>
                            <documentation xml:lang="en">-- Definition -- ZPMZ identifier - it consists of a cadastral zoning identifier and a label of the particular ZMPZ.</documentation>
                        </annotation>
                        <simpleType>
                            <restriction base="string">
                                <pattern value="\d{0,30}"/>
                            </restriction>
                        </simpleType>
                    </element>
                    <element name="recordNumber">
                        <annotation>
                            <documentation xml:lang="cs">-- Definice -- Číslo záznamu</documentation>
                            <documentation xml:lang="en">-- Definition -- Record number.</documentation>
                        </annotation>
                        <simpleType>
                            <restriction base="integer">
                                <pattern value="-?\d{0,5}"/>
                            </restriction>
                        </simpleType>
                    </element>
                    <element name="zoningIdentifier">
                        <annotation>
                            <documentation xml:lang="cs">-- Definice -- Kód katastrálního území.</documentation>
                            <documentation xml:lang="en">-- Definition -- Cadastral zoning identifier.</documentation>
                        </annotation>
                        <simpleType>
                            <restriction base="string">
                                <pattern value="\d{6}"/>
                            </restriction>
                        </simpleType>
                    </element>
                    <element name="zoning" type="gml:ReferenceType" nillable="true" minOccurs="0">
                        <annotation>
                            <documentation xml:lang="cs">-- Definice -- Odkaz na dané katastrální území do WFS pro Katastrální parcely - národní rozšíření.</documentation>
                            <documentation xml:lang="en">-- Definition -- A link to the particular cadastral zoning in WFS for Cadastral parcels - extended.</documentation>
                            <appinfo>
                                <targetElement xmlns="http://www.opengis.net/gml/3.2">cp-ext:Cadastralzoning</targetElement>
                            </appinfo>
                        </annotation>
                    </element>
                    <element name="coordinateSystem" type="zpmz:CoordinateSystemReferencePropertyType">
                        <annotation>
                            <documentation xml:lang="cs">-- Definice -- Souř. systém ZPMZ - obsahuje kód a odkaz do číselníku.</documentation>
                            <documentation xml:lang="en">-- Definition -- Coordinate system used in ZPMZ - it contains identifier and codelist value.</documentation>
                        </annotation>
                    </element>
                    <element name="text" type="string"/>
                    <element name="landSurveyingActivity" type="zpmz:LandSurveyingActivityReferencePropertyType">
                        <annotation>
                            <documentation xml:lang="cs">-- Definice -- Popisuje pro jaký typ zeměměřické činosti ZPMZ vzniklo.</documentation>
                            <documentation xml:lang="en">-- Definition -- It describes a type of land surveying activity ZPMZ was created for.</documentation>
                        </annotation>
                    </element>
                    <element name="scanExists" type="boolean">
                        <annotation>
                            <documentation xml:lang="cs">-- Definice -- Udává, zda jsou data uložená v DMS.</documentation>
                            <documentation xml:lang="en">-- Definition -- It states, whether the data are stored in DMS.</documentation>
                        </annotation>
                    </element>
                    <element name="referencePoint" type="gml:MultiPointPropertyType"/>
                    <element name="polygonGeometry" minOccurs="0" maxOccurs="1" type="gml:MultiSurfacePropertyType">
                        <annotation>
                            <documentation xml:lang="cs">-- Definice -- Popisuje oblast změny.</documentation>
                            <documentation xml:lang="en">-- Definition -- It describes the area of change.</documentation>
                        </annotation>
                    </element>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    <complexType name="CoordinateSystemReferencePropertyType">
        <sequence>
            <element ref="zpmz:CoordinateSystemReference"/>
        </sequence>
    </complexType>
    <element name="CoordinateSystemReference" type="zpmz:CoordinateSystemReferenceType"/>
    <complexType name="CoordinateSystemReferenceType">
        <sequence>
            <element type="gml:ReferenceType" name="systemType" />
            <element type="integer" name="systemId"/>
        </sequence>
    </complexType>
    <complexType name="LandSurveyingActivityReferencePropertyType">
        <sequence>
            <element ref="zpmz:LandSurveyingActivityReference"/>
        </sequence>
    </complexType>
    <element name="LandSurveyingActivityReference" type="zpmz:LandSurveyingActivityReferenceType"/>
    <complexType name="LandSurveyingActivityReferenceType">
        <sequence>
            <element type="gml:ReferenceType" name="activityType" />
            <element type="integer" name="activityId"/>
        </sequence>
    </complexType>
    <complexType name="ZPMZRecordPropertyType">
        <sequence>
            <element ref="zpmz:ZPMZRecord"/>
        </sequence>
        <attributeGroup ref="gml:AssociationAttributeGroup"/>
        <attributeGroup ref="gml:OwnershipAttributeGroup"/>
    </complexType>
    <!-- nový prvek ZPMZWOPolygon-->
    <element type="zpmz:ZPMZRecordWOPolygonType" substitutionGroup="gml:AbstractFeature" name="ZPMZRecordWOPolygon">
        <annotation>
            <documentation xml:lang="cs">-- Definice -- Typ objektu ZPMZRecordWOPolygon reprezentuje zpmz, ke kterým zatím nemohou být publikované polygony.</documentation>
            <documentation xml:lang="en">-- Definition -- Feature type ZPMZRecordWOPolygon represents zpmz, which is not possible to publish polygons for.</documentation>
        </annotation>
    </element>
    <complexType name="ZPMZRecordWOPolygonType">
        <complexContent>
            <extension base="gml:AbstractFeatureType">
                <sequence>
                    <element name="downloadLink" type="gml:ReferenceType" minOccurs="0" maxOccurs="1">
                        <annotation>
                            <documentation xml:lang="cs">-- Definice -- Odkaz na stažení ZPMZ.</documentation>  
                            <documentation xml:lang="en">-- Definition -- ZPMZ file download link.</documentation>  
                        </annotation>
                    </element>
                    <element name="zpmzId">
                        <annotation>
                            <documentation xml:lang="cs">-- Definice -- Identifikátor ZPMZ - vychází z kódu katastrálního území a označení daného ZPMZ.</documentation>
                            <documentation xml:lang="en">-- Definition -- ZPMZ identifier - it consists of a cadastral zoning identifier and a label of the particular ZMPZ.</documentation>
                        </annotation>
                        <simpleType>
                            <restriction base="string">
                                <pattern value="\d{0,30}"/>
                            </restriction>
                        </simpleType>
                    </element>
                    <element name="recordNumber">
                        <annotation>
                            <documentation xml:lang="cs">-- Definice -- Číslo záznamu</documentation>
                            <documentation xml:lang="en">-- Definition -- Record number.</documentation>
                        </annotation>
                        <simpleType>
                            <restriction base="integer">
                                <pattern value="-?\d{0,5}"/>
                            </restriction>
                        </simpleType>
                    </element>
                    <element name="zoningIdentifier">
                        <annotation>
                            <documentation xml:lang="cs">-- Definice -- Kód katastrálního území.</documentation>
                            <documentation xml:lang="en">-- Definition -- Cadastral zoning identifier.</documentation>
                        </annotation>
                        <simpleType>
                            <restriction base="string">
                                <pattern value="\d{6}"/>
                            </restriction>
                        </simpleType>
                    </element>
                    <element name="zoning" type="gml:ReferenceType" nillable="true" minOccurs="0">
                        <annotation>
                            <documentation xml:lang="cs">-- Definice -- Odkaz na dané katastrální území do WFS pro Katastrální parcely - národní rozšíření.</documentation>
                            <documentation xml:lang="en">-- Definition -- A link to the particular cadastral zoning in WFS for Cadastral parcels - extended.</documentation>
                            <appinfo>
                                <targetElement xmlns="http://www.opengis.net/gml/3.2">cp-ext:Cadastralzoning</targetElement>
                            </appinfo>
                        </annotation>
                    </element>
                    <element name="coordinateSystem" type="zpmz:CoordinateSystemReferencePropertyType">
                        <annotation>
                            <documentation xml:lang="cs">-- Definice -- Souř. systém ZPMZ - obsahuje kód a odkaz do číselníku.</documentation>
                            <documentation xml:lang="en">-- Definition -- Coordinate system used in ZPMZ - it contains identifier and codelist value.</documentation>
                        </annotation>
                    </element>
                    <element name="text" type="string"/>
                    <element name="scanExists" type="boolean">
                        <annotation>
                            <documentation xml:lang="cs">-- Definice -- Udává, zda jsou data uložená v DMS.</documentation>
                            <documentation xml:lang="en">-- Definition -- It states, whether the data are stored in DMS.</documentation>
                        </annotation>
                    </element>
                    <element name="referencePoint" type="gml:MultiPointPropertyType"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    
    
</schema>
