<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" vc:minVersion="1.1" elementFormDefault="qualified" targetNamespace="https://schema.ccmm.cz/research-data/2.0" xmlns:ccmm="https://schema.ccmm.cz/research-data/2.0" xmlns:sawsdl="http://www.w3.org/ns/sawsdl">
  <xs:include schemaLocation="../file/schema.xsd"/>
  <xs:include schemaLocation="../application-profile/schema.xsd"/>
  <xs:include schemaLocation="../format/schema.xsd"/>
  <xs:include schemaLocation="../media-type/schema.xsd"/>
  <xs:include schemaLocation="../checksum/schema.xsd"/>
  <xs:include schemaLocation="../access-rights/schema.xsd"/>
  <xs:include schemaLocation="../licence-document/schema.xsd"/>
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
  <xs:complexType name="distribution_downloadable_file" sawsdl:modelReference="https://model.ccmm.cz/vocabulary/ccmm#Distribution-DownloadableFile">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        Distribution - downloadable file - Physical embodiment of the dataset in a particular format. 
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element minOccurs="0" name="iri" type="xs:anyURI"/>
      <xs:element maxOccurs="unbounded" name="title" type="xs:string" sawsdl:modelReference="http://purl.org/dc/terms/title">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            title - A name given to the distribution.
            This property can be repeated for parallel language versions of the description. The main title of a distribution is the one in the primary language of the dataset.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element maxOccurs="unbounded" name="access_url" type="xs:anyURI" sawsdl:modelReference="http://www.w3.org/ns/dcat#accessURL">
        <xs:annotation>
          <xs:documentation xml:lang="ar">
            رابط وصول - أي رابط يتيح الوصول إلى البيانات. إذا كان الرابط هو ربط مباشر لملف يمكن تحميله استخدم الخاصية downloadURL
          </xs:documentation>
          <xs:documentation xml:lang="cs">
            přístupová adresa - URL zdroje, přes které je přístupná distribuce datové sady. Příkladem může být vstupní stránka, RSS kanál či SPARQL endpoint. Použijte ve všech případech kromě URL souboru ke stažení, pro které je lepší použít dcat:downloadURL.
          </xs:documentation>
          <xs:documentation xml:lang="da">
            adgangsadresse - En URL for en ressource som giver adgang til en repræsentation af datsættet. Fx destinationsside, feed, SPARQL-endpoint. Anvendes i alle sammenhænge undtagen til angivelse af et simpelt download link hvor anvendelse af egenskaben downloadURL foretrækkes.
          </xs:documentation>
          <xs:documentation xml:lang="el">
            URL πρόσβασης - Μπορεί να είναι οποιουδήποτε είδους URL που δίνει πρόσβαση στη διανομή ενός συνόλου δεδομένων. Π.χ. ιστοσελίδα αρχικής πρόσβασης, μεταφόρτωση, feed URL, σημείο διάθεσης SPARQL. Να χρησιμοποιείται όταν ο κατάλογος δεν περιέχει πληροφορίες εαν πρόκειται ή όχι για μεταφορτώσιμο αρχείο.
          </xs:documentation>
          <xs:documentation xml:lang="en">
            access URL - A URL that gives access to a Distribution of the Dataset.
            The resource at the access URL may contain information about how to get the Dataset. It shall be the web page (not a document file).
          </xs:documentation>
          <xs:documentation xml:lang="es">
            URL de acceso - Puede ser cualquier tipo de URL que de acceso a una distribución del conjunto de datos, e.g., página de destino, descarga, URL feed, punto de acceso SPARQL. Esta propriedad se debe usar cuando su catálogo de datos no tiene información sobre donde está o cuando no se puede descargar.
          </xs:documentation>
          <xs:documentation xml:lang="fr">
            URL d'accès - Ceci peut être tout type d'URL qui donne accès à une distribution du jeu de données. Par exemple, un lien à une page HTML contenant un lien au jeu de données, un Flux RSS, un point d'accès SPARQL. Utilisez le lorsque votre catalogue ne contient pas d'information sur quoi il est ou quand ce n'est pas téléchargeable.
          </xs:documentation>
          <xs:documentation xml:lang="it">
            indirizzo di accesso - Un URL di una risorsa che consente di accedere a una distribuzione del set di dati. Per esempio, pagina di destinazione, feed, endpoint SPARQL. Da utilizzare per tutti i casi, tranne  quando  si tratta di un semplice link per il download nel qual caso è preferito downloadURL.
          </xs:documentation>
          <xs:documentation xml:lang="ja">
            アクセスURL - データセットの配信にアクセス権を与えるランディング・ページ、フィード、SPARQLエンドポイント、その他の種類の資源。
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="download_url" type="ccmm:file" sawsdl:modelReference="http://www.w3.org/ns/dcat#downloadURL">
        <xs:annotation>
          <xs:documentation xml:lang="ar">
            رابط مباشر لملف يمكن تحميله. نوع الملف يتم توصيفه باستخدام الخاصية dcterms:format dcat:mediaType 
          </xs:documentation>
          <xs:documentation xml:lang="cs">
            URL souboru ke stažení v daném formátu, například CSV nebo RDF soubor. Formát je popsán vlastností distribuce dcterms:format a/nebo dcat:mediaType.
          </xs:documentation>
          <xs:documentation xml:lang="da">
            URL til fil der kan downloades i et bestemt format. Fx en CSV-fil eller en RDF-fil. Formatet for distributionen angives ved hjælp af egenskaberne dcterms:format og/eller dcat:mediaType.
          </xs:documentation>
          <xs:documentation xml:lang="el">
            Είναι ένας σύνδεσμος άμεσης μεταφόρτωσης ενός αρχείου σε μια δεδομένη μορφή. Π.χ. ένα αρχείο CSV ή RDF. Η μορφη αρχείου περιγράφεται από τις ιδιότητες dcterms:format ή/και dcat:mediaType της διανομής.
          </xs:documentation>
          <xs:documentation xml:lang="en">
            download URL - A URL that is a direct link to a downloadable file in a given format.
            A download URL SHOULD BE used for the URL at which this distribution is available directly, typically through an HTTP Get request.
          </xs:documentation>
          <xs:documentation xml:lang="es">
            La URL de un archivo descargable en el formato dato. Por ejemplo, archivo CSV o archivo RDF. El formato se describe con las propiedades de la distribución dcterms:format y/o dcat:mediaType.
          </xs:documentation>
          <xs:documentation xml:lang="fr">
            Ceci est un lien direct à un fichier téléchargeable en un format donnée. Exple fichier CSV ou RDF. Le format est décrit par les propriétés de distribution dcterms:format et/ou dcat:mediaType.
          </xs:documentation>
          <xs:documentation xml:lang="it">
            Questo è un link diretto al file scaricabile in un dato formato. E.g. un file CSV o un file RDF. Il formato è descritto dal dcterms:format e/o dal dcat:mediaType della distribuzione.
          </xs:documentation>
          <xs:documentation xml:lang="ja">
            dcat:downloadURLはdcat:accessURLの特定の形式です。しかし、DCATプロファイルが非ダウンロード・ロケーションに対してのみaccessURLを用いる場合には、より強い分離を課すことを望む可能性があるため、この含意を強化しないように、DCATは、dcat:downloadURLをdcat:accessURLのサブプロパティーであると定義しません。
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="conforms_to" type="ccmm:application_profile" sawsdl:modelReference="http://purl.org/dc/terms/conformsTo">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            conforms to - An established schema to which the described Distribution conforms.
            This property should be used to indicate the model, schema, ontology, view, or profile that this representation of a dataset conforms to. This is (generally) a complementary concern to the media type, service standard, or format.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="format" type="ccmm:format" sawsdl:modelReference="http://purl.org/dc/terms/format">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            has format - The file format of the distribution.
            This property refers to the instance of format represented by IRI identifier from the register http://publications.europa.eu/resource/dataset/file-type. Human readable code list representation is here: https://op.europa.eu/en/web/eu-vocabularies/concept-scheme/-/resource?uri=http://publications.europa.eu/resource/authority/file-type.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="media_type" type="ccmm:media_type" sawsdl:modelReference="http://www.w3.org/ns/dcat#mediaType">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            has media type - The media type of the Distribution as defined in the official register of media types managed by IANA.
            This property SHOULD be used when the media type of the distribution is defined in IANA (using value from https://www.iana.org/assignments/media-types/media-types.xhtml), otherwise Format MAY be used with values from Publication Office of the EU File type code list http://publications.europa.eu/resource/dataset/file-type.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="packaging_format" type="ccmm:media_type" sawsdl:modelReference="http://www.w3.org/ns/dcat#packageFormat">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            has packaging format - The format of the file in which one or more data files are grouped together, e.g., to enable a set of related files to be downloaded together.
            This property SHOULD be used when the files in the distribution are packaged, e.g., in a TAR file, a ZIP file, a Frictionless Data Package or a Bagit file. If available, record the media type as a value from the IANA registry (using value from https://www.iana.org/assignments/media-types/media-types.xhtml).
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="compression_format" type="ccmm:media_type" sawsdl:modelReference="http://www.w3.org/ns/dcat#compressFormat">
        <xs:annotation>
          <xs:documentation xml:lang="cs">
            Formát komprese souboru, ve kterém jsou data poskytována v komprimované podobě, např. ke snížení velikosti souboru ke stažení.
          </xs:documentation>
          <xs:documentation xml:lang="da">
            Kompressionsformatet for distributionen som indeholder data i et komprimeret format, fx for at reducere størrelsen af downloadfilen.
          </xs:documentation>
          <xs:documentation xml:lang="en">
            has compression format - The format of the file in which the data is contained in a compressed form, e.g., to reduce the size of the downloadable file.
            It SHOULD be expressed using a media type as defined in the official register of media types managed by IANA (using value from https://www.iana.org/assignments/media-types/media-types.xhtml).
          </xs:documentation>
          <xs:documentation xml:lang="es">
            El formato de la distribución en el que los datos están en forma comprimida, e.g. para reducir el tamaño del archivo a bajar.
          </xs:documentation>
          <xs:documentation xml:lang="it">
            Il formato di compressione della distribuzione nel quale i dati sono in forma compressa, ad es. per ridurre le dimensioni del file da scaricare.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="byte_size" type="xs:integer" sawsdl:modelReference="http://www.w3.org/ns/dcat#byteSize">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            byte size - The size of a Distribution in bytes. 
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="checksum" type="ccmm:checksum" sawsdl:modelReference="http://spdx.org/rdf/terms#checksum">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            has checksum - A mechanism that can be used to verify that the contents of a distribution have not changed.
            The checksum is related to the download URL.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="rights" type="ccmm:access_rights" sawsdl:modelReference="http://purl.org/dc/terms/rights">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            has rights - A statement that specifies rights associated with the Distribution.
            Use IRI identifier from the register http://purl.org/coar/access_right/. Recommended mapping of values from COAR to https://semiceu.github.io/DCAT-AP/drafts/latest/#properties-with-a-recommended-use-of-controlled-vocabularies is:
            - embargoed access, metadata only access mapped to :NON_PUBLIC,
            - open access mapped to :PUBLIC,
            - restricted access mapped to :RESTRICTED.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="licence" type="ccmm:licence_document" sawsdl:modelReference="http://purl.org/dc/terms/license">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            has licence - A licence under which the Distribution is made available.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="description" sawsdl:modelReference="http://purl.org/dc/terms/description">
        <xs:annotation>
          <xs:documentation xml:lang="en">
            description - A free-text account of the Distribution.
            This property can be repeated for parallel language versions of the description. 
          </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:simpleContent>
            <xs:extension base="xs:string">
              <xs:attribute ref="xml:lang" use="required"/>
              <xs:assert test="@xml:lang != ''"/>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
      <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax" namespace="##other"/>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="distribution-downloadable-file" type="ccmm:distribution_downloadable_file"/>
</xs:schema>
