<!-- Copyright 2021 FIZ Karlsruhe - Leibniz-Institut fuer Informationsinfrastruktur GmbH Licensed under the Apache License, 
	Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the 
	License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software 
	distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
	or implied. See the License for the specific language governing permissions and limitations under the License. -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns="http://radar-service.eu/schemas/contract-technical-metadata/v12" targetNamespace="http://radar-service.eu/schemas/contract-technical-metadata/v12" elementFormDefault="qualified" attributeFormDefault="unqualified" jaxb:version="2.1">
	<xs:element name="contract">
		<xs:annotation>
			<xs:appinfo>
				<jaxb:class name="ContractTechnicalMetadata"/>
			</xs:appinfo>
		</xs:annotation>
		<xs:complexType>
			<xs:all>
				<xs:element name="publicationQuota" type="xs:integer" minOccurs="1" maxOccurs="1"/>
				<xs:element name="diskQuota" type="xs:integer" minOccurs="1" maxOccurs="1"/>
				<xs:element name="archiveQuota" type="xs:integer" minOccurs="1" maxOccurs="1"/>
				<xs:element name="defaultWorkspaceDiskQuota" type="xs:integer" minOccurs="1" maxOccurs="1"/>
				<xs:element name="defaultWorkspaceArchiveQuota" type="xs:integer" minOccurs="1" maxOccurs="1"/>
				<xs:element name="defaultWorkspacePublicationQuota" type="xs:integer" minOccurs="1" maxOccurs="1"/>
				<xs:element name="categories" type="categories" minOccurs="0" maxOccurs="1"/>
				<xs:element name="quotaHistory" type="quotaHistory" minOccurs="0" maxOccurs="1"/>
				<xs:element name="branding" type="branding" minOccurs="0" maxOccurs="1"/>
				<xs:element name="customization" type="customization" minOccurs="0" maxOccurs="1"/>
				<xs:element name="billing" type="billingEnum" minOccurs="1" maxOccurs="1"/>
				<xs:element name="forcingCustomizedUploadTerms" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
				<xs:element name="oaiUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
				<xs:element name="webdavSupport" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
				<xs:element name="gitSupport" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
				<xs:element name="forcingCustomizedRestrictedSearch" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
				<xs:element name="aiSupport" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
				<xs:element name="ontologies" type="ontologies" minOccurs="0" maxOccurs="1"/>
				<xs:element name="ontologyCollections" type="ontologyCollections" minOccurs="0" maxOccurs="1"/>
			</xs:all>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="ontologies">
		<xs:sequence>
			<xs:element name="ontology" type="ontology" minOccurs="1" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="ontology">
		<xs:sequence>
			<xs:element name="id" type="xs:string" minOccurs="1" maxOccurs="1"/>
			<xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
			<xs:element name="uri" type="xs:string" minOccurs="1" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="ontologyCollections">
		<xs:sequence>
			<xs:element name="ontologyCollection" type="ontologyCollection" minOccurs="1" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="ontologyCollection">
		<xs:sequence>
			<xs:element name="id" type="xs:string" minOccurs="1" maxOccurs="1"/>
			<xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
			<xs:element name="uri" type="xs:string" minOccurs="1" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="quotaHistory">
		<xs:sequence>
			<xs:element name="quotaValues" type="quotaValues" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="quotaValues">
		<xs:sequence>
			<xs:element name="diskQuota" type="xs:integer" minOccurs="1" maxOccurs="1"/>
			<xs:element name="archiveQuota" type="xs:integer" minOccurs="1" maxOccurs="1"/>
			<xs:element name="publicationQuota" type="xs:integer" minOccurs="1" maxOccurs="1"/>
			<xs:element name="endOfValidity" type="xs:dateTime" minOccurs="1" maxOccurs="1"/>
			<xs:element name="changedBy" type="xs:string" minOccurs="0" maxOccurs="1"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="categories">
		<xs:sequence>
			<xs:element name="category" type="category" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="category">
		<xs:sequence>
			<xs:element name="title" type="xs:string"/>
			<xs:element name="value" type="categoryValue" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="id" type="xs:string" use="required"/>
	</xs:complexType>
	<xs:complexType name="categoryValue">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute name="id" type="xs:string" use="required"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="branding">
		<xs:all>
			<xs:element name="institutionalWebsiteUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="institutionalWebsiteName" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="institutionalColor" minOccurs="0" maxOccurs="1">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:pattern value="#([0-9a-fA-F]{6})"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:element>
		</xs:all>
	</xs:complexType>
	<xs:complexType name="customization">
		<xs:all>
			<xs:element name="startPageUrl" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="emailSender" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="sendPendingMailDays" type="xs:integer" minOccurs="0" maxOccurs="1"/>
			<xs:element name="termsUploadGerman" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="termsUploadEnglish" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="termsDownloadGerman" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="termsDownloadEnglish" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="faqUrlGerman" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="faqUrlEnglish" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="termsAndConditionUrlGerman" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="termsAndConditionUrlEnglish" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="privacyStatementUrlGerman" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="privacyStatementUrlEnglish" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="legalNoticeUrlGerman" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="legalNoticeUrlEnglish" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="accessibilityDeclarationUrlGerman" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="accessibilityDeclarationUrlEnglish" type="xs:string" minOccurs="0" maxOccurs="1"/>
			<xs:element name="images" type="images" minOccurs="0" maxOccurs="1"/>
		</xs:all>
	</xs:complexType>
	<xs:simpleType name="billingEnum">
		<xs:restriction base="xs:string">
			<xs:enumeration value="one-time"/>
			<xs:enumeration value="year-by-year"/>
		</xs:restriction>
	</xs:simpleType>
	
    <xs:complexType name="image">
        <xs:sequence>
            <xs:element name="image-file" type="xs:string"/>
            <xs:element name="image-description" type="xs:string"/>
            <xs:element name="target-url" type="xs:string"/>
            <xs:element name="target-description" type="xs:string"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="images">
        <xs:sequence>
            <xs:element name="image" type="image" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

</xs:schema>