<?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/cbm/1.1.0" xmlns:cap="http://lpis.jrc.ec.europa.eu/registry/cbm/1.1.0" xmlns="http://lpis.jrc.ec.europa.eu/registry/cbm/1.1.0" elementFormDefault="qualified">
	<xs:include schemaLocation="CbmCommonTypes.xsd"/>
	<xs:annotation>
		<xs:documentation xml:lang="en">A schema for storing the final status of FOIs in the CbM QA sample pre-selection. Note: R1= FOI already inspected for the same phenomena, R2= image artefacts present, R3= cannot interpret.</xs:documentation>
	</xs:annotation>
	<xs:element name="samplePreselectionStatus">
		<xs:complexType>
			<xs:sequence maxOccurs="unbounded">
				<xs:element name="featureOfInterest">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="ordinalNumber">
								<xs:simpleType>
									<xs:restriction base="xs:integer">
										<xs:minInclusive value="1"/>
										<xs:maxInclusive value="1095"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:element>
							<xs:element name="skippingReasonR1" type="xs:boolean"/>
							<xs:element name="skippingReasonR2" type="xs:boolean"/>
							<xs:element name="skippingReasonR3" type="xs:boolean"/>
							<xs:element name="wasSubjectToEts" type="xs:boolean"/>
						</xs:sequence>
						<xs:attribute name="foiID" type="cap:restr_minLength_string" use="required"/>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attributeGroup ref="cap:CbMReportIdentificationAttributeGroup"/>
			<xs:attribute name="samplePreselectionCreationDate" type="xs:date" use="required"/>
		</xs:complexType>
		<xs:unique name="unique_id">
			<xs:selector xpath="cap:featureOfInterest"/>
			<xs:field xpath="cap:foiID"/>
		</xs:unique>
		<xs:unique name="unique_ordinalNumber">
			<xs:selector xpath="cap:featureOfInterest"/>
			<xs:field xpath="cap:ordinalNumber"/>
		</xs:unique>
	</xs:element>
	<xs:simpleType name="restr_minLength_string">
		<xs:restriction base="xs:string">
			<xs:minLength value="1"/>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>

