<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:akv="http://akv.pcr.cz" targetNamespace="http://akv.pcr.cz" elementFormDefault="qualified" version="1.3.0">
	<xs:element name="AkvReport">
		<xs:annotation>
			<xs:documentation>Informace o prujezdu/zachytu vozidla</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Info">
					<xs:annotation>
						<xs:documentation>Informace k pruzjezdu/zachytu</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:attribute name="CameraId" type="akv:nonEmptyString" use="required">
							<xs:annotation>
								<xs:documentation>Id kamery, ktera zaznam poridla</xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="TimeStamp" type="xs:dateTime" use="required">
							<xs:annotation>
								<xs:documentation>Datum a cas prvniho zachytu/detekce RZ</xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="GPS" type="akv:nonEmptyString">
							<xs:annotation>
								<xs:documentation>GPS souradnice - polozka je povinna pro mobilni kamery. Desettinny format napr. 49.79518574848568 18.121363550926162 nebo 49.79518574848568N 18.121363550926162E</xs:documentation>
							</xs:annotation>
						</xs:attribute>
					</xs:complexType>
				</xs:element>
				<xs:element name="LicencePlate">
					<xs:annotation>
						<xs:documentation>Registracni znacka</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:attribute name="Value" type="akv:nonEmptyString" use="required">
							<xs:annotation>
								<xs:documentation>Text rozpoznane RZ</xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="Country" type="akv:nonEmptyString">
							<xs:annotation>
								<xs:documentation>MPZ</xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="MeanScore" type="xs:short">
							<xs:annotation>
								<xs:documentation>Skore kvalifikujici kvalitu ctení RZ (cele císlo)</xs:documentation>
							</xs:annotation>
						</xs:attribute>
					</xs:complexType>
				</xs:element>
				<xs:element name="Image" type="akv:ImageType" minOccurs="0" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation>Fotografie (velka fotografie obsahujici nejlepe cele vozidlo)</xs:documentation>
					</xs:annotation>
				</xs:element>
				<xs:choice>
					<xs:element name="ImageLicencePlate" type="akv:ImageType">
						<xs:annotation>
							<xs:documentation>Vyrez RZ (mala fotografie obsahujici pouze registracni znaku, pripadne jeji blizke okoli)</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="ImageWithLPCoordinates" type="akv:ImageWithLpCoordinatesType">
						<xs:annotation>
							<xs:documentation>Fotografie obsahujici RZ vcetne koordinatu pro realizaci vyrezu (velka fotografie obsahujici nejlepe cele vozidlo). Pokud budou poskytnuta data v tomto elementu, neni nutne znovu poskytovat shodnou fotografii v elementu "img"</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="ServerId" type="akv:nonEmptyString" use="required">
				<xs:annotation>
					<xs:documentation>Identifikace odesilajiciho serveru (koncentratoru). Pokud odesila primo kamera je mozne zadat Id kamery</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="ProducerId" type="akv:nonEmptyString" use="required">
				<xs:annotation>
					<xs:documentation>Identifikace odesilatele - dodavatele kameroveho reseni napr. "Hisys", "Nitta", "Camea" atd.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="TimeStamp" type="xs:dateTime" use="required">
				<xs:annotation>
					<xs:documentation>Datum a cas vytvoreni zpravy</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="Camera">
		<xs:annotation>
			<xs:documentation>Informace o kamere</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="AssociatedCameraId" type="akv:nonEmptyString" minOccurs="0" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation>Identifikatory kamer, ktere s kamerou vytvari tzv. "kamerovy rez". "Kamerovy rez" = skupina kamer na jednom miste (a napr. vice pruzich) zamerenych stejnym smerem. V pripade useku muze jit i o vstup a vystup z useku.</xs:documentation>
					</xs:annotation>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="CameraId" type="akv:nonEmptyString" use="required">
				<xs:annotation>
					<xs:documentation>Id kamery</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="Type" type="akv:typeEnum" use="required">
				<xs:annotation>
					<xs:documentation>Druh kamery</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="GPS" type="akv:nonEmptyString" use="required">
				<xs:annotation>
					<xs:documentation>GPS souradnice v desettinnem formatu napr. 49.79518574848568 18.121363550926162 nebo 49.79518574848568N 18.121363550926162E</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="Road" type="akv:nonEmptyString">
				<xs:annotation>
					<xs:documentation>Oznaceni silnice napr. D1, R35 atd.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="Direction" type="akv:nonEmptyString">
				<xs:annotation>
					<xs:documentation>Smer napr. Praha, Brno atd.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="DirectionGPS" type="akv:nonEmptyString">
				<xs:annotation>
					<xs:documentation>Smer urceny GPS souradnicemi bodu. GPS souradnice v desettinnem formatu napr. 49.79518574848568 18.121363550926162 nebo 49.79518574848568N 18.121363550926162E</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="Lane" type="xs:byte">
				<xs:annotation>
					<xs:documentation>Cislo pruhu 1-x, pocitano zleva ve smeru jizdy</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="Description" type="akv:nonEmptyString">
				<xs:annotation>
					<xs:documentation>Doplnujici informace ke kamere napr. "Praha, ulice Hybernska, u budovy Masarykova nadrazi"</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:simpleType name="typeEnum">
		<xs:restriction base="xs:string">
			<xs:enumeration value="stationary">
				<!--Stacionarni/nepohybliva kamera-->
			</xs:enumeration>
			<xs:enumeration value="mobile">
				<!--Mobilni kamera-->
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="nonEmptyString">
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="nonEmptyBase64Binary">
		<xs:restriction base="xs:base64Binary">
			<xs:minLength value="1"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="ImageType">
		<xs:sequence>
			<xs:element name="Data" type="akv:nonEmptyBase64Binary">
				<xs:annotation>
					<xs:documentation>Fotografie ve formatu JPG zakodovana pomoci BASE64</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="TimeStamp" type="xs:dateTime">
			<xs:annotation>
				<xs:documentation>Datum a cas porizeni fotografie</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="ImageWithLpCoordinatesType">
		<xs:sequence>
			<xs:element name="Image" type="akv:ImageType">
				<xs:annotation>
					<xs:documentation>Fotografie</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="Coordinates" type="akv:CoordinatesType">
				<xs:annotation>
					<xs:documentation>Souradnice</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="CoordinatesType">
		<xs:attribute name="x" type="xs:int" use="required">
			<xs:annotation>
				<xs:documentation>X souradnice leveho horniho rohu RZ v prilozene fotografii (v pixelech)</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="y" type="xs:int" use="required">
			<xs:annotation>
				<xs:documentation>Y souradnice leveho horniho rohu RZ v prilozene fotografii (v pixelech)</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="h" type="xs:int" use="required">
			<xs:annotation>
				<xs:documentation>Vyska RZ v prilozene fotografii (v pixelech)</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="w" type="xs:int" use="required">
			<xs:annotation>
				<xs:documentation>Sirka RZ v prilozene fotografii (v pixelech)</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
</xs:schema>
