<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://lpis.jrc.ec.europa.eu/registry/6.1.0" xmlns:cap="http://lpis.jrc.ec.europa.eu/registry/6.1.0" xmlns="http://lpis.jrc.ec.europa.eu/registry/6.1.0" elementFormDefault="qualified">
	<xs:include schemaLocation="LpisCommonTypes.xsd"/>
	<xs:simpleType name="CauseOfNonConformityValue">
		<xs:restriction base="xs:string">
			<xs:enumeration value="missedUpgrade"/>
			<xs:enumeration value="incompleteProcessing"/>
			<xs:enumeration value="processingError"/>
			<xs:enumeration value="incompatibleDesign"/>
			<xs:enumeration value="missedUpdate"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="CauseOfAnomalyValue">
		<xs:restriction base="xs:string">
			<xs:enumeration value="causeUnknown"/>
			<xs:enumeration value="notConfirmed"/>
			<xs:enumeration value="irreversibleConversionsOfAgriculturalLandCovers"/>
			<xs:enumeration value="appearanceOfPermanentConstruction"/>
			<xs:enumeration value="changeInThePerimeterAdditionOfAgriculturalLand"/>
			<xs:enumeration value="changeInThePerimeterExchangeOfAgriculturalLand"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="StatusOfAnomalyValue">
		<xs:restriction base="xs:string">
			<xs:enumeration value="open"/>
			<xs:enumeration value="inProgress"/>
			<xs:enumeration value="archived"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="StakeholderValue">
		<xs:restriction base="xs:string">
			<xs:enumeration value="farmer"/>
			<xs:enumeration value="inspector"/>
			<xs:enumeration value="photoInterpreter"/>
			<xs:enumeration value="fieldInspector"/>
			<xs:enumeration value="LPISCustodian"/>
			<xs:enumeration value="testingLaboratory"/>
			<xs:enumeration value="thirdParty"/>
			<xs:enumeration value="payingAgency"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="suspectedNonConformingValueValue">
		<xs:restriction base="xs:string">
			<xs:enumeration value="referenceParcelId"/>
			<xs:enumeration value="geometryShape"/>
			<xs:enumeration value="geometryType"/>
			<xs:enumeration value="etsReferenceArea"/>
			<xs:enumeration value="unitsOfMeasures"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="conformanceStatementValue">
		<xs:restriction base="xs:string">
			<xs:enumeration value="conforming"/>
			<xs:enumeration value="nonConforming"/>
			<xs:enumeration value="notApplicable"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="AncillaryValue">
		<xs:restriction base="xs:string">
			<xs:enumeration value="true"/>
			<xs:enumeration value="false"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="AnomalyType">
		<xs:sequence>
			<xs:element name="iacsId" type="xs:string" nillable="false"/>
			<xs:element name="anomalyId" type="xs:string" nillable="false"/>
			<xs:element name="referenceParcelId" type="xs:string" nillable="false"/>
			<xs:element name="causeOfNonConformity" type="CauseOfNonConformityValue" nillable="false"/>	
			<xs:element name="causeOfAnomaly" type="CauseOfAnomalyValue" nillable="false"/>			
			<xs:element name="statusOfAnomaly" type="StatusOfAnomalyValue" nillable="false"/>				
			<xs:element name="stakeholder" type="StakeholderValue" nillable="false"/>	
			<xs:element name="suspectedNonConformingValue" type="suspectedNonConformingValueValue" nillable="false"/>	
			<xs:element name="visualInspection" type="conformanceStatementValue" nillable="false"/>
			<xs:element name="congruencyTest" type="conformanceStatementValue"/>
			<xs:element name="beginLifeSpanVersion" type="xs:date" nillable="false"/>
			<xs:element name="validFrom" type="xs:date" nillable="false"/>
			<xs:element name="validTo" type="xs:date"/>
			<xs:element name="endLifeSpanVersion" type="xs:date"/>
			<xs:element name="supplementaryDataAsAncillary" type="AncillaryValue"/>
			<xs:element name="supplementaryData" type="xs:string"/>
			<xs:element name="comment" type="xs:string"/>	
		</xs:sequence>
	</xs:complexType>
	<xs:element name="AnomalySet" type="cap:AnomalySetType"/>
	<xs:complexType name="AnomalySetType">
		<xs:sequence>
			<xs:element name="Anomaly" type="cap:AnomalyType" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attributeGroup ref="cap:LpisAnnualReportIdentificationAttributeGroup"/>
	</xs:complexType>
</xs:schema>
